[jboss-user] [EJB3] - Clustered EJB3 Bean Serializable Requirements

Administrator Administrator do-not-reply at jboss.com
Thu Jan 20 11:00:09 EST 2011


Administrator Administrator [http://community.jboss.org/people/admin] modified the document:

"Clustered EJB3 Bean Serializable Requirements"

To view the document, visit: http://community.jboss.org/docs/DOC-13230

--------------------------------------------------------------
The aim of this wiki is to explain the clustered EJB3 bean serializable requirements that a developer must be aware of.

h2. Clustered Session Beans (SLSB & SFSB)
First of all, clustered EJB3 SLSBs or SFSBs do not need to implement Serializable. In fact, it's recommended that they don't. In the case of clustered SLSBs, no state replication occurs, so their instance variables do not even need to be Serializable. With clustered SFSBs though, the same serialization rules used for SFSB passivation apply to SFSB state replication. In other words, all non-transient instance variables that are not references to beans, sessions contexts or user transactions must be serializable, or null at replication time. For further information on the SFSB passivation (and by extension replication because in both cases the SFSB bean context needs to be serialized), please check section 4.2.1 of the EJB3 core specification.

h2. Clustered Entity Beans
These only need to be marked Serializable if the clustered entity instances are to be passed by value as a detached object (e.g., through a remote interface). Otherwise, there's no need to mark them as Serializable.

h2. Seam Booking Examples
Finally, please note that currently, clustered beans in Seam's Booking example implement Serializable but as mentioned above, there's no need to do that and in fact, it's not recommended.
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-13230]

Create a new document in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110120/6f628b97/attachment.html 


More information about the jboss-user mailing list