You are right, but in my case its an entity bean. I have searched the spec,but
it is underexplained for entity beans.

Assuming "unspecified txn context" is the same for entity beans, if i have my
bean declared TXN Required in the DD, and if the bean is in a txn context,
will the container suspend the txn and invoke ejbRemove() or ?

thanks
ramji

Manisha Umbarje <[EMAIL PROTECTED]> wrote:
According to  EJB 1.1 specifications 11.6.3 section that is as follows:

11.6.3 Handling of methods that run with �an unspecified transaction context�

The term �an unspecified transaction context� is used in the EJB
specification
to refer to the cases in
which the EJB architecture does not fully define the transaction semantics of
an
enterprise bean method
execution.
This includes the following cases:
  The execution of a method of an enterprise bean with container-managed
transaction demarca-tion
for which the value of the transaction attribute is NotSupported,
Never,orSup-ports
  The execution of the ejbCreate, ejbRemove, ejbPassivate, and ejbActivate
methods of a session bean with container-managed transaction demarcation.

The EJB specification does not prescribe how the Container should manage the
execution of a method
with an unspecified transaction context�the transaction semantics are left to
the Container implemen-tation.

The container that you are using might not be executing ejbRemove() method in
the Transaction Context.



Ram Ji wrote:

> can i call setRollbackOnly() in ejbRemove of a bean-managed Entity Bean..?
> i have declared the txn attribute as Required in the xml-DD for the remote
> interface methods as well as Home-intf methods. but my container complains
> that IllegalStateException, bean method not participating in a txn....
>
> how do i check whether my bean is participating in a txn or not, thou i
have
> declared Required as my txn attribute.
>
> actually, i have an entity bean, that has an object, which is a root of a
> tree
> of objects. so whenever ejbremove is called on my entity bean, i would call
> the delete method on root of the tree, which in turn traverses the tree and
> deletes each and every node.
> if any of the nodes failes to delete itself, then i throw an user defined
> exception. upon catching the exception the ejbRemove has to rollback so
that
> all deleted nodes are brought back. any suggestions?
>
> thanks
> ramji
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

> ---------------------------------------------
>       Attachment: manisha.vcf
>       MIME Type: text/x-vcard
> ---------------------------------------------

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to