In a nested transaction, rollback of the parent implies rollback of the child. Otherwise why would one call them nested? Anyways, as you have observed requires new causes suspension of any transaction in process, it does not create a nested transaction. I don't think most RDBMS products support nested transactions, which is at least some of the reason I think Sun figured not to try and put them into J2EE.
Cheers -----Original Message----- From: Inderjit Singh Kalsi To: [EMAIL PROTECTED] Sent: 10/30/01 7:46 AM Subject: Re: Nested Transaction & Requires Attribute Shelly, >From what I have read, Nested TXs run independent of each other with a Main TX. Rollback of one will have no impact on the other. Reference : ED roman Mastering EJB. My question is related to Requires and RequiresNew TX. When meth1, Bean A has Requires TX attribute and meth2, Bean B has RequiresNew TX attribute Then the TX for meth1 in Bean A is suspended and New TX is started for meth2 in Bean B. If these 2 transactions are different then how is this situation different from Nested TX? ----- Original Message ----- From: "Aggrawal, Shelly (Cognizant)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 3:28 PM Subject: Re: Nested Transaction & Requires Attribute > Hi, > > Considering the same scenario that is: A method meth1 in Bean A is executing > with Required Tx attribute. Its makes a call to method meth2 in Bean B which > has RequiresNew Tx Attrubute. > > Now, if there is an error in meth1 ( requiring a rollback ) at some point > after successful completion of meth2, meth2 is not Rollbacked back. > > But, had the transactions been nested, meth2 would also have got rolled > back. > > Please confirm if my interpretation is right .. and also correct me if I am > wrong > > Regards > Shelly. > > > -----Original Message----- > > From: Inderjit Singh Kalsi [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, October 30, 2001 2:58 PM > > To: [EMAIL PROTECTED] > > Subject: Nested Transaction & Requires Attribute > > > > > > Consider this scenario. > > > > A method meth1 in Bean A is executing with Required Tx attribute. > > Its makes a call a call to method meth2 in Bean B which has > > RequiresNew Tx > > Attrubute. > > > > I understand that Transaction for meth1 is suspended and New > > TX is started > > for meth2 in Bean B. > > How different is this from Nested Transaction? > > > > Practically speaking what happens, is BeanA notified of > > rollback in BeanB? > > If not, than 2 TX are running independently of each other > > which is similar > > to Nested Transactions. > > > > Please throw some light. > > > > If possible please share your opinion with examples. > > > > I appreciate your help. > > > > Thanks > > Inder. > > > > ============================================================== > > ============= > > 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".
