con.setTransactionIsolation(Connection.TRANSACTION_SERIALIZED);
Dave Wolf
Internet Applications Division
----- Original Message -----
From: "umesh sonavane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 01, 2000 10:31 AM
Subject: Re: Transaction Problem
> Is there a way by which i could make the isolation as serializable to
avoid
> the dirty reads of CMP
>
>
> ----- Original Message -----
> From: Thompson, Chris <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, December 01, 2000 7:05 PM
> Subject: Re: Transaction Problem
>
>
> > Hi Virgil,
> >
> > If you are using Bean Managed Persistence, the your beans needs to
manage
> > the overall transaction via begin, commit, and abort. With BMP, the
> > transaction attribute setting is likely only used by the container to
> verify
> > that the method call is in a transaction or not, not to do the commit or
> > abort for you at the right time. That would be CMP. One way to handle
> your
> > example would be to call the remove()s if the exception occurs.
> >
> > I have no financial interest or otherwise in his book, but I found
Chapter
> > 11 of Ed Roman's book,
> > http://theserverside.com/resources/ejb-book-roman.zip, helpful in
> > understanding more about transactions and isolation. I think your
example
> > is in there too.
> >
> > I hope this is helpful.
> > -Chris
> >
> > -----Original Message-----
> > From: Virgil Lee [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 30, 2000 8:47 PM
> > Subject: Re: Transaction Problem
> >
> >
> > Hi,
> >
> > I have a session bean function that calling three entity beans as a unit
> of
> > work.
> > The function simply calls the entity beans' create function one by one.
> > Suppose when calling the third one it throws an exception, that case the
> > whole transaction should be rolled back.
> > I got the remote exception from the client calling the session bean
> > function:
> > Transaction was rolled back: javax.ejb.EJBException; nested exception
is:
> > javax.ejb.EJBException
> >
> > which is normal I suppose. But the fact is when I check back the
> database,
> > nothing was rolled back, the newly inserted records for the first two
> entity
> > beans are there.
> >
> > The transaction type is container and I've set the session bean's
> > trans-attribute as Required and others as Supports.
> > I'm using BMP, and every call to the database I need to make a
connection
> > and close it afterward. It seems to me that when the connection has
been
> > closed, it commits everything and the container cannot roll anything
back.
> >
> > I'm struggling on this for a period of time already, any clues or help
are
> > much appreciated.
> >
> > Thanks and Regards
> > Virgil
> >
> >
>
===========================================================================
> > 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".
>
>
===========================================================================
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".