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.


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

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.