Yes, you are correct transactions and persistence are orthogonal. I wasn't
paying enough attention when I read your email the first time. I thought
you were adding onto the fuss about bean managed transactions in entity
beans.
Look at section 12.3.1 of the spec. Turns out if you throw an AppException
then you must also call setRollbackOnly() to rollback, if you throw another
type of exception it will be rolled back automatically. The long and short
of it is I believe that you should be catching the SQLException and wrapping
it in an EJBException. That should cause the container to rollback the
transaction.
Cheers
-----Original Message-----
From: Pooja Keswani [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 12:47 AM
To: [EMAIL PROTECTED]
Subject: Re: Container Managed Transactions in Entity Beans
Hi Jay,
what i think is , persistence and transactions are 2 different concepts
which can be container or bean managed
Correct me if i am wrong.
i am talking about transaction management .
i want to go for container managed transaction.
The 3 inserts should be part of single database transaction.
Waiting for response
Pooja
On Thu, 18 January 2001, Jay Walters wrote:
>
> I think you mean bean managed persistence rather than container managed
> transaction. Should the 3 inserts be part of a single database
transaction?
>
> Cheers
> Jay Walters
>
> -----Original Message-----
> From: Pooja Keswani [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 12:03 AM
> To: [EMAIL PROTECTED]
> Subject: Container Managed Transactions in Entity Beans
>
>
> Hi,
>
> I have an Entity bean and i want Container managed transaction for it. The
> create method of the bean performs 3 SQL Inserts.
>
> How do i go about writing the ejb-jar.xml for it ?
>
> and do i have to write rollback in the catch SQLException of the create
> method.
>
> Any help will be appreciated.
>
> Thanks
>
> Pooja
>
>
>
> Chequemail.com - a free web based e-mail service that also pays!!!
> http://www.chequemail.com
>
>
===========================================================================
> 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".
Chequemail.com - a free web based e-mail service that also pays!!!
http://www.chequemail.com
===========================================================================
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".