Thanks for all of you, I'm really appreciate that.

But I still have some questions to ask.
Is anyone using BMP have there transaction working in Orion or Weblogic?
I've tried Orion but not success.  I want to have a "to go" signal from the
others to make sure it's not a bug.

The other question is if I use BMP, every create, update or remove function
has to have it's own connection, and when closing the connection within the
function, it'll be auto-committed.  What if the last function in a
transaction failed ? how does the system roll back the transaction if those
functions have already been committed.  Who is responsible for this.  Is the
container smart enought to handle this? Do I have to write some remove
function for this.  If this is the case, I don't think it's a transaction
anymore, right?


On Fri, 1 Dec 2000 10:50:57 -0500, Dave Wolf <[EMAIL PROTECTED]> wrote:

>Please donnt confuse Bean Managed Persistace (BMP) with Bean Managed
>Transactions (BMT).  In a BMP bean you do not have to begin and commit
>yourself.  You can still enroll in a BMT ad only need to express an opinion
>for a rollback.
>
>Dave Wolf
>Internet Applications Division
>
>----- Original Message -----
>From: "Thompson, Chris" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, December 01, 2000 8:35 AM
>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".

Reply via email to