Transactions with EJB and Spring

Discussions

EJB programming & troubleshooting: Transactions with EJB and Spring

  1. Transactions with EJB and Spring (2 messages)

    Hi, can the org.springframework.transaction.jta.JtaTransactionManager be used for handle following situation? Application 1-EJB1 starts a User Transaction. Application 1-EJB1 does DB actions, Application 2-EJB2 (uses spring framework pojos) does DB actions. Application 1-EJB1 commits => so Application 2-EJB2's actions are committed / or rollbacked. Or must EJB2 be configured to use CMT. thx.
  2. This snippet from this link may answer your question : http://www.springframework.org/docs/reference/transaction.html#transaction-declarative-first-example Use of the wrong transaction manager for a specific DataSource Developers should take care to use the correct PlatformTransactionManager implementation for their requirements. It is important to understand how the Spring transaction abstraction works with JTA global transactions. Used properly, there is no conflict here: Spring merely provides a straightforward and portable abstraction. If you are using global transactions, you must use the Spring org.springframework.transaction.jta.JtaTransactionManager class (or an application server-specific subclass of it) for all your transactional operations. Otherwise Spring will attempt to perform local transactions on resources such as container DataSource instances. Such local transactions don't make sense, and a good application server will treat them as errors Bhagvan K http://www.jroller.com/page/bhagvank
  3. This snippet from this link may answer your question : http://www.springframework.org/docs/reference/transaction.html#transaction-declarative-first-example Use of the wrong transaction manager for a specific DataSource Developers should take care to use the correct PlatformTransactionManager implementation for their requirements. It is important to understand how the Spring transaction abstraction works with JTA global transactions. Used properly, there is no conflict here: Spring merely provides a straightforward and portable abstraction. If you are using global transactions, you must use the Spring org.springframework.transaction.jta.JtaTransactionManager class (or an application server-specific subclass of it) for all your transactional operations. Otherwise Spring will attempt to perform local transactions on resources such as container DataSource instances. Such local transactions don't make sense, and a good application server will treat them as errors Bhagvan K http://www.jroller.com/page/bhagvank