EJB3 - using 2 persistence units within a transaction (Exception: Local transaction already has 1 non-XA Resource)

前端 未结 2 1436
我在风中等你
我在风中等你 2021-02-08 16:44

I am trying to use 2 persistence units within the same transaction in a Java EE application deployed on Glassfish.

The 2 persistence units are defined in persistence.xml

2条回答
  •  感情败类
    2021-02-08 17:23

    Change configuration of connection pool in Glassfish:

    Connection Pool:
    Name: BEACHWATER_LIMS
    Datasource Classname: com.microsoft.sqlserver.jdbc.SQLServerXADataSource
    Resource Type: javax.sql.XADataSource
    

    Follow the steps on Senthil Balakrishnan's blog, "How to make MSSQL Server XA Datasource Work?" here, http://www.senthilb.com/2010/01/how-to-make-xa-datasource-work-in-mssql.html.

    Restart Glassfish.

提交回复
热议问题