O'Reilly logo

JBoss AS 5 Development by Francesco Marchioni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required