Hi
I think i have answer for this.
there are 2 cases
a: if Bean A is Bean_Managed_TX no Question of starting another TX while
global
or local TX is not closed.
b: if it is a Container_Managed_TX it either commits or rollbacks the newly
started Transaction. my understanding is ,you would not have any control over
bean B's Transaction. because this is container-managed-Tx.
bye
Matthias David wrote:
> Hi,
>
> I have two questions on transactions.
>
> 1. Is it possible to remove Beans that are currently registered in a
> transaction? For example Bean A invokes Bean B, removes Bean B, invokes
> Bean C and finally commits the transaction. Is it an error to remove
> Bean B although the transaction has not yet been commited?
>
> 2. The Spec says that nested transactions are not supported by now. But
> I think that nested transactions can be simulated:
> a) Client calls Bean A. Bean A (e.g. the container) creates new TX
> TX1.
> b) Bean A does something then calls Bean B which creates new TX TX2.
> c) Bean B does something in TX2, commits or rolls back and then
> returns to Bean A indicating whether TX2 was commited or rolled back.
> d) Bean A checks if the "nested" Transaction TX2 was succesful. If
> not it calls setRollBackOnly().
>
> So from my understanding this is a nested transaction. TX1 only
> commits if TX2 was commited. But I guess there must be a mistake. So
> what's wrong here?
>
> Thanks,
> Matthias David, University of Karlsruhe, Germany.
>
> ===========================================================================
> 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".
--
-----------------------
Suneetha U.V.S
DevelopmentEngineer
[EMAIL PROTECTED]
Pramati Technologies
http://www.pramati.com
-----------------------
===========================================================================
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".