Hi Philippe

    From jonas mailing list i found this conversation

>>>>>>>             Santiago Gala wrote:
                  >
                  > I have a problem with the semantics of ejbCreate with CMP:
                  >
                  > Let's assume that, in the ejbCreate method of a CMP entit bean, we
                  > create some auxiliary entities.
                  > Let's assume that, after the ejbCreate method returns, Jonas 
receives
a
                  > SQL Exception due to a problem with the database (for example a
                  > DuplicateIndexException).
                  >
                  > Should not Jonas rollback a transaction covering all activity
(including
                  > any actions performed inside ejbCreate?
                  >
                  > I observe behaviour where the bean is not created, but the 
auxiliary
                  > objects remain in the system in Jonas 1.6.1
                  >
                  > Does the spec say something about that?
                  >
                  Hi Santiago,
                  I think that the correct behavior is described in the EJB1.1
                  Specification
                  in the § 12.3.1 and more precisly in the Table 8 page 191.
                  ejbCreate is considered to be a business method.
                  The behaviour of the container depends on:
                  - the nature of the exception raised (Application Exception or
                    System exception and errors)
                  - the transactional attribute.

                  You can see for example that the container must mark the transaction
                  for rollback and throw TransactionRolledBack exception when it is a
                  SystemException
                  or Error raised during the ejbCreate and if ejbcreate is running in 
the
                  context
                  of the caller's transcation (Required, mandatory, Supports).
                  But with the same transactional attributes, if the exception raised
                  is an application exception, the container re-throw the exception
                  and it's up to the client to decide to commit/rollback the 
transaction.

                  I think that JOnAS 2.0 follow strictly the behavior described in this
                  table.
                  Note that in the previous versions of JOnAS the methods defined in 
the
                  home interface was not considered to be business methods, and the
                  behavior
                  was incorrect in such situations. It is now fixed.

>>>>>>>>>>>>>>>>>>>>>


          As you have mentioned that exception occured while creating ther bean(
ejbcreate)
           is fixed in the JOnAS 2.0 ,
           but  I am getting the same exception in Jonas2.1.2
           because while creating a bean ( because of duplicate index value erorr in
database)
           i am getting EJBexception
           and the transaction is not getting rollback.
           which i thing shud be rollback .
           For more details abot my problem you can see
            mail with subject "Exception in Rollback"

            Thanks
              Ritesh.


----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to