There is a restriction only if the session bean implements the javax.ejb.SessionSynchronization interface. In this case, the allowed transaction attributes are: Required, RequiresNew, or Mandatory.This is to ensure that the enterprise bean is invoked only in a transaction. Note that only stateful session beans can implement the SessionSynchronization interface. Thanks Seema [ September 25, 2003: Message edited by: seema manivannan ]
IMHO, only Mandatory, Required, RequiresNew can be specified for Container-managed transaction demarcated session bean. In chapter 17.4.1, ejb spec 2.0:
For entity beans that use EJB 2.0 container-managed persistence, only the Required, RequiresNew, or Mandatory transaction attributes should be used for the methods defined in the bean�s component interface and all the direct and indirect superinterfaces of the component interface, excluding the getEJBHome, getEJBLocalHome, getHandle, getPrimaryKey, and isIdentical methods; and for the methods defined in the bean�s home interface and all the direct and indirect superinterfaces of the home interface, excluding the getEJBMetaData and getHomeHandle methods specific to the remote home interface. Containers may optionally support the use of the NotSupported, Supports, and Never transaction attributes for the methods of entity beans with container-managed persistence. However, entity beans with container-managed persistence that use these transaction attributes will not be portable.
So, the NotSupported, Supports and Never only apply for Entity Bean with CMP.
SCJP 91% SCJD 94% SCBCD 98% SCWCD1.4 86%<p>XML141 SCDWJS -- in progress<br />If you don't retreat, you are mostly among those who can surmount it.
You don't like waffles? Well, do you like this tiny ad?
a bit of art, as a gift, that will fit in a stocking