Service POJOs

Service POJOs are the new generation of JBoss services. While you can keep programming MBeans in the standard way (building an MBean interface, an implementation class, and XML descriptors), you can simplify the process of developing MBeans with service POJOs. Actually, service POJOs are plain Java classes with some annotations that denote the special nature of the component.

The way you define them is very similar to defining Stateless or Stateful Session Beans. One very important difference is that there will only be one instance of the service bean, that is, it is not pooled—the bean instance is a singleton. The singleton bean contains shared state, so data set by one client is accessible by other clients.

Let's see a concrete ...

Get JBoss AS 5 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.