It very much depends on how you configure it in
your deployment descriptor.
1) If you use the required attribute, this means
that the method in question will be called by
the container in a transaction context,
regardless the client was involved in
transaction or not.
2) If you use the requires new attribute, the
container always starts a new transaction, when
invoking this method.
3) if you use the not supported attribute,the
method cannot be called by the container in a
transaction context.This means if a client
involed in a transaction calls this method,
the container suspends the transaction before
calling that method.
4) If you use the supports attribute, it means
the container does not have to suspend
any transaction before calling this method.
If a calling method is not involved in a
transaction, the container does not have to
start a new transaction.
5) The mandatory attribute means any client
calling this method must be involved in
transaction before calling this
method.Otherwise the container will throw
an Exception.
6) The never attribute means that bean
is not expecting a transaction. If a client
calls this bean in a transaction, the container
throws an exception, othewise the container
simply invokes this method.
Ebage
SCJP SCEA [ December 10, 2002: Message edited by: Christian Ebage ]
[ December 10, 2002: Message edited by: Christian Ebage ]