background preloader

Java

Facebook Twitter

Synchronized Methods (The Java™ Tutorials > Essential Classes > Concurrency) The Java programming language provides two basic synchronization idioms: synchronized methods and synchronized statements.

Synchronized Methods (The Java™ Tutorials > Essential Classes > Concurrency)

The more complex of the two, synchronized statements, are described in the next section. This section is about synchronized methods. To make a method synchronized, simply add the synchronized keyword to its declaration: public class SynchronizedCounter { private int c = 0; public synchronized void increment() { c++; } public synchronized void decrement() { c--; } public synchronized int value() { return c; } } If count is an instance of SynchronizedCounter, then making these methods synchronized has two effects: First, it is not possible for two invocations of synchronized methods on the same object to interleave.

RTSJ Main Page. JSR-000914 Java Message Service (JMS) API - Maintenance Release. Logback Home. Computational Model. The implemented computational model has been "inspired" by Petri-Nets.

Computational Model

Thus, the components are implemented through a collection of places, transitions and directed arcs. Data are moving through the component are embedded in objects called tokens. Places can be considered buffers of tokens. Figure 1 - The Petri-Net like computational model Each transition (block) works with data that are expressed through a specific data type. Before executing the component, it is necessary to parametrize the transitions (blocks). Main / OSGi Alliance. We are excited to announce that OSGi DevCon 2014 will be taking place in New York, June 11 to 13, 2014.

Main / OSGi Alliance

This year we are co-locating with QCon New York which not only gives us the opportunity for a new location but also the chance to share OSGi DevCon with the QCon attendees. The Call For Presentations (CFP) is now closed and we expect to announce the conference program in early April. Registration is open. The price for attending increases each month in the run up to the event so its best to secure your registration as soon as you can. The next price increase is on March 15. Further details about the event including location, hotel, registration and questions are available from the DevCon home page. Follow us on Twitter to stay up to date with OSGi DevCon 2014 and all other OSGi news. THANK YOU FOR ATTENDING THE OSGi COMMUNITY EVENT 2013 The OSGi Community Event 2013 was held Oct. 29-31, 2013 in Ludwigsburg, Germany and was co-located with EclipseCon Europe.

Eclipse Web Starter Kit. Plugin Ready Java Application. Preface Everything started with the need of adding plugin support to some Java/SWT application.

Plugin Ready Java Application

Plugin support is far from being easy to implement, unless you use a plugin framework to help. We first looked at the Eclipse Equinox plugin framework (implementing the OSGi framework specification). Document List. Les collections. Les collections sont des objets qui permettent de gérer des ensembles d'objets.

Les collections

Ces ensembles de données peuvent être définis avec plusieurs caractéristiques : la possibilité de gérer des doublons, de gérer un ordre de tri, etc. ... A Regular Expression Test Applet. The point of this applet is to provide a convenient means of testing regular expressions before embedding them in a Java program.

A Regular Expression Test Applet

The buttons represent calls to the Java methods with the same name. WindowBuilder User Guide - Google Web Toolkit - Google Code. Lesson: Generics (The Java™ Tutorials > Learning the Java Language) In any nontrivial software project, bugs are simply a fact of life.

Lesson: Generics (The Java™ Tutorials > Learning the Java Language)

Careful planning, programming, and testing can help reduce their pervasiveness, but somehow, somewhere, they'll always find a way to creep into your code. This becomes especially apparent as new features are introduced and your code base grows in size and complexity. Log4J. Copyright 2005 The University Of Birmingham The use of log4j revolves around 3 main things: The logger is the core component of the logging process.

Log4J

In log4j, there are 5 normal levels Levels of logger available (not including custom Levels), the following is borrowed from the log4j API ( static Level DEBUG The DEBUG Level designates fine-grained informational events that are most useful to debug an application. static Level INFO The INFO level designates informational messages that highlight the progress of the application at coarse-grained level. static Level WARNThe WARN level designates potentially harmful situations.static Level ERRORThe ERROR level designates error events that might still allow the application to continue running.static Level FATAL The FATAL level designates very severe error events that will presumably lead the application to abort.

In addition, there are two special levels of logging available: (descriptions borrowed from the log4j API. Apache log4j 1.2 - Short introduction to log4j. Log4j has three main components: loggers, appenders and layouts.

Apache log4j 1.2 - Short introduction to log4j

These three types of components work together to enable developers to log messages according to message type and level, and to control at runtime how these messages are formatted and where they are reported. Logger hierarchy The first and foremost advantage of any logging API over plain System.out.println resides in its ability to disable certain log statements while allowing others to print unhindered. This capability assumes that the logging space, that is, the space of all possible logging statements, is categorized according to some developer-chosen criteria. Java en Production – Les fichiers de logs.

Tout a déjà été dit sur les logs.

Java en Production – Les fichiers de logs

Pour preuve, ce n’est plus un sujet chaud, les équipes d’exploitation sont très contentes avec les logs de nos applications :-) . D’accord, l’envers du décor est moins reluisant et il reste une marge de progression. ModelGoon UML4Java. Welcome to NetBeans. Java User Interface Design. Jdom.pdf (Objet application/pdf) Les meilleures API Java. L’API baptisée «Interactive Spaces » est écrite en Java, et est disponible sous les termes de la licence Apache permissive. Elle peut être utilisée pour l’instant sur les systèmes d’exploitation Linux et Mac OS X.

La version Windows sera bientôt disponible. L’API fournit une architecture de haut niveau pour la construction d'« activités » qui répondent à des événements dans un espace physique. Dans le billet de blog qui annonce l’API, Google présente comme exemple une salle avec un écran intégré dans le plancher, et des caméras dans le plafond qui suivent les personnes au sein de cette surface. Supports de cours et articles de Mickael BARON. Free Cheat Sheets for Developers.

Pattern

Eclipse.