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