I believe this behavior you are seeing is correct. Keep in mind that
transactional contexts are propagated downward only. Therefore if one bean
starts a trancaction and keeps it open, then you (the client) open another bean
and do some work, this other bean will have its OWN transactional context, so
rolling back the first bean will not affect anything.
The only way to do what you are trying is to have the first bean (with the
bean-managed transactions) call the second bean, so the second bean will inherit
the transactional context. Calling it from the client directly will not work.
Without being able to get a UserTransaction from the client, there is NO WAY to
have the client control transaction demarcation. The only way is to have a bean
do it for you.
-Charles
Oscar Radio wrote:
> Hi all,
>
> Thanks to all the people that had helped me with my transactions
> problems, I hope this will be the last problem.
> I manually start a transaction in a stateful, bean managed transaction, like
> this, in the create method:
>
> transaccion = context.getUserTransaction();
> this.transaccion.begin();
>
>
> So then from the client part I call another bean, this one is
> stateful and container manage transaction with all of it's methods
> "required". And that bean access a entity bean that create a new record in a
> table, but when I do a rollback into the first bean where I manually start
> the transaction, the rollback, rollbacks all the data of its bean, but not
> the transactions made in the other bean created after I manually begin the
> transaction.
>
> My question is how can I start a transaction and all the other beans that I
> crate from the client part became port of this transaction.
>
> Thanks oscar.
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]