According to section 11.3.3 of the EJB 1.1 Specification, a bean may NOT control the transaction via the Connection (e.g., may not invoke commit() or rollback() on the java.sql.Connection interface). For bean-managed transaction demarcation, you must use the UserTransaction interface. I may be mis-interpreting the post below, but it seems to imply that you can use the Connection interface to control and demarcate transactions in an EJB. I don't know the implications of doing commit/rollback on the Connection itself in the case of one data source only. Laurel -----Original Message----- From: Krishnan Subramanian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 9:42 AM To: [EMAIL PROTECTED] Subject: Re: Is it mandatory to have XADataSource for EJB transactional suppor t? satya, xa drivers are primarily for: - 2P Commit & recoverable transactions - monitoring & managing transactions - updates spanning multiple (possibly heterogenous) databases of course you need a transaction manager that can take advantage of the XA features of jdbc 2.0 if you do not need the above features, you might be better off with jdbc 1.x drivers (& datasources). (which do support transactions and 1PC) to answer your question, if you have the autoCommit turned on (Connection.setAutoCommit/getAutoCommit), then your updates will be executed & committed as individual transactions. If auto commit is turned off, then you need to explicitly commit/rollback a group of transactions. by default, the autoCommit is turned on for new connections. the jdbc topic is quite vast, and i would suggest you read up on articles/tips on the java sun site. -krish ----- Original Message ----- From: Komatineni, Satya <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 15, 2001 2:07 PM Subject: Is it mandatory to have XADataSource for EJB transactional suppor t? > If I am manipulating a database through SLSBs via non-xa datasources, would > the transaction automatically commited by the EJB container (assuming I have > the transaction required attribute set)? > > Or do I need to have XA driver supporting the datasource to have this > functionality. > > Your help is much appreciated > Satya > > =========================================================================== > 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".
