If I use "NotSupported" then I will run into an "unspecified transaction context" as well. "NotSupported" is defined as fallows:
If the method is called with an existing transaction context, the caller's transaction is suspended.
Regardless of whether there is an existing transaction, the method will run in an "unspecified transaction context".
Reading the spec. I wonder if I ever would like to use any attribute appart from Required, RequiresNew, or Mandatory.
Obviously the others are dangers, up to the vendor implementation or whatever...
The EJB2.0 Spec say:
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[....]
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.
The Application Assembler should avoid use of the NotSupported, Supports, and Never transaction attributes for
the methods of entity beans with container-managed persistence because it may lead to inconsistent results or
to the inconsistent and/or to the partial updating of persistent state and relationships in the event of concurrent use.