If enabled, checkpointing generally occurs after the bean completes any transaction, even if the transaction rolls back. To specify additional optional checkpointing of SFSBs at the end of non-transactional business methods that cause important modifications to the bean’s state, use the checkpoint-at-end-of-method element in the ejb element of the sun-ejb-jar.xml deployment descriptor file.
The non-transactional methods in the checkpoint-at-end-of-method element can be:
create() methods defined in the home interface of the SFSB, if you want to checkpoint the initial state of the SFSB immediately after creation
For SFSBs using container managed transactions only, methods in the remote interface of the bean marked with the transaction attribute TX_NOT_SUPPORTED or TX_NEVER
For SFSBs using bean managed transactions only, methods in which a bean managed transaction is neither started nor committed
Any other methods mentioned in this list are ignored. At the end of invocation of each of these methods, the EJB container saves the state of the SFSB to persistent store.
If an SFSB does not participate in any transaction, and if none of its methods are explicitly specified in the checkpoint-at-end-of-method element, the bean’s state is not checkpointed at all even if availability-enabled="true" for this bean.
For better performance, specify a small subset of methods. The methods should accomplish a significant amount of work or result in important modification to the bean’s state.
<sun-ejb-jar> ... <enterprise-beans> ... <ejb availability-enabled="true"> <ejb-name>ShoppingCartEJB</ejb-name> <checkpoint-at-end-of-method> <method> <method-name>addToCart</method-name> </method> </checkpoint-at-end-of-method> </ejb> ... </enterprise-beans> </sun-ejb-jar>