Geronimo now has some basic support for SFSB clustering. If you would like to give it a try then here are some instructions.
Create a clustered EJB module.
- SFSBs must implement Serializable even if they are EJB3 SFSBs.
- In the geronimo-openejb DD, include the 'openejb-clustering-wadi' element.
I have done some testing with an OpenEJB example, namely CounterImpl, that you can co from https://svn.apache.org/repos/asf/openejb/trunk/openejb3/examples/simple-stateful. Note that you need to update CounterImpl so that it implements Serializable.
And here is the geronimo-opejnejb.xml plan I am using:
Deploy clustering EJB Module
Create and start an additional Geronimo Server
- To create another instance, say NODE2, you can execute the following commands from the Geronimo install dir:
- To start this instance, within gshell type:
Test the clustered SFSBs
If you are also using CounterImpl, then you can use this snippet:
To actually trial the clustering:
- put a breakpoint on the last increment;
- kill -9 the 'default' Geronimo Server
- continue your debug session. 3 should be printed.
This is a test demonstrating replication.