> All,
>
> I have the following situation:
>
> Stateless session bean A has a method called updateClient(). The bean is
> declared as using container-managed transactions and the method has a
> transaction attribute of TXN_REQUIRED.
>
> Stateless session bean B has a method called getNextClientId(). The bean
is
> declared as using container-managed transactions and the method has a
> transaction attribute of TXN_REQUIRES_NEW.
>
> My client program calls the updateCLient() method on bean A, which in turn
> calls the getNextClientId() method on bean B. Based on my interpretation
of
> the EJB spec, the txn started by bean A should be suspended when the call
to
> the method on bean B is made. Is this correct?
>
> My EJB server returns an exception of the form "Transaction Manager
> Exception - Session Beans participating in a transaction cannot execute a
> method in a different transaction context". Is this correct?

That is correct A's tx should have been suspended while the container
created a new tx for B.  When B's work was complete, A tx continues on
unaffected by votes generated by B (setRollbackOnly())

The mentioend error is incorrect.

Dave Wolf
Internet Applications Division


>
> On a slightly different subject, how are people dealing with getting
unique
> key values when they insert records using entity beans? We're trying to
use
> an entity bean with two fields (keyname and keyvalue). So when a business
> service (held in a stateless session bean) requires a new key it makes a
> call to the entity bean to get the next key value, analogous to Oracle
> sequences. Does anyone have any views on this approach, will it work ??
>
> regards
>
>
> Bhupesh Wagjiani
> GamCom Solutions Limited
> [EMAIL PROTECTED]
>
>
===========================================================================
> 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