The requirement is carried from EJB 1.1 specs.

A call EJBContext.setRollbackOnly() make sense only in a transaction. But
the transaction attribute Supports does not guarantee a transaction.

Spec says
"The Supports transaction attribute must be used with caution. This is
because of the different transactional
semantics provided by the two possible modes of execution. Only the
enterprise beans that will
execute correctly in both modes should use the Supports transaction
attribute."

Hemant
Server Team
Pramati Technologies
www.pramati.com

----- Original Message -----
From: "Rahul Sawhney" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 12:14 PM
Subject: java.lang.IllegalStateException in EJBContext.setRollbackOnly()


Hi,
Following sentence is from the EJB2.0 specs (pg331):
"The Container must throw the java.lang.IllegalStateException if the
EJBContext.setRollbackOnly() method is invoked from a business
method executing with the Supports, NotSupported, or Never
transaction attribute."
It is clear that IllegalStateException should be thrown by the container
in case of NotSupported, or Never transaction attributes for the bean.
but i am not able to understand why it should be thrown in case
the transaction attr of the method is "Supports".
Can someone pls explain the reason for the same??
thanx!!
=== Rahul ===
[EMAIL PROTECTED]
-----------------------------------------

===========================================================================
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".

===========================================================================
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