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

Clustering Stateful Session Beans

Stateful Session Beans (SFSBs) deserve a bit more attention than their SLSB counterparts, as this component is able to retain client state between calls. In order to build a concrete example, we will use our BlackJackBean example that we introduced in Chapter 4.

Create a new EJB project named ClusteredSFSB and add a new Stateful Session Bean in it named com.packtpub.clustering.example1.BlackJack. This will include the BlackJack interface and the BlackJackBean implementation class in your project.

Tip

Don't rewrite it from scratch!

You can simply copy the sources from Chapter 4 into the source folder of your new project. Then simply refactor the sources, by moving them from the package com.packtpub.ejb.example2 ...

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