What is the difference between JTA and a local transaction?

前端 未结 4 1393
一向
一向 2020-12-12 10:14

What is the difference between JTA and a local transaction?

An example that shows when to use JTA and when to use a local transaction would be great.

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 11:15

    Transaction-type should be set to "RESOURCE_LOCAL" for Java SE application and to "JTA" for Java EE application. "RESOURCE_LOCAL" may work fine on some web application deployed on Tomcat, but may cause issues when you run your application under glassfish environment.

    If you are working on distributed transactions you must use "JTA" as your transaction manager.

提交回复
热议问题