Thanks for replying Dave,
I have been playing around with this and have some new information that
makes me think that indeed the context is getting lost.

For my Session bean the transaction setting are Required for both the Home
and Remote methods.
For the Entity bean it is Mandatory for all methods.

Given these settings I would assume that a New transaction is created when I
invoke the method on the Session bean
and then when I the Entity bean is created which occurs from a non-EJB java
object that was invoked from the original Session Bean, I would have assumed
the transaction context would have been passed to the Entity bean.
However, the Entity bean throws a TransactionRequiredException.
Given this information it would appear that the transaction context from the
Session bean was not passed as I expected.


Therefore, the EJB concept of propagating the transaction context only holds
true when a given Session Bean directly invokes another method on a Session
or Entity bean.  As opposed to carrying the context at the thread level or
something like that.

Is that the way everyone understands it ???

Thanks,
Ed

-----Original Message-----
From: Dave Wolf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 10:47 AM
To: [EMAIL PROTECTED]
Subject: Re: Transaction Rollback trouble


Ed,

What tx settings does the session bean and the entity bean have?

Dave Wolf
Internet Applications Division
Sybase

----- Original Message -----
From: "Lorenz, Ed" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 9:32 AM
Subject: Transaction Rollback trouble


> I'm having difficulty getting a rollback to occur after I throw an
> exception.
> Here is the scenario:
> I have a session bean that requires a transaction.
> Step 1 - My client invokes the session bean without a transaction
> established, which as I understand it will force the Session bean to
create
> one.
> Step 2 - The Session bean invokes a method on another regular java object
> Step 3 - This regular java object in turn invokes an ejbCreate method on
an
> Entity bean
> Step 4 - The Session bean does some additional processing and determines
it
> should throw an exceptionwhich extends from EJBException
> Step 5 - The Session bean throws the exception
>
> However, the original Entity bean crated in Step 3 is NOT rolled-back ???
> I using WLS 6.0 and Oracle with the standard OraclePool and data source.
>
> I wonder if the context of the transaction is lost as a result of the
> Session Bean invoking a method on a regular java class which in turn
invokes
> the creation of the Entity bean ???
>
> Is the transaction context thread specific ???  Or is it only passed
between
> EJB Entity and Session beans ???
>
> Please help,
> Thanks,
> Ed
>
>
===========================================================================
> 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