users@glassfish.java.net

XADataSource

From: Martin, Ray <armart3_at_tycho.ncsc.mil>
Date: Mon, 8 Mar 2010 19:21:39 -0500

 
Using Glassfish v2, Netbeans6.8

Have an Oracle database and a MySQL database for a starter - eventually there will be multiples of each.

In my first use case, I do not care about transactions across both data sources.

In Glassfish, I have set both connection pools to javax.sql.XADataSource
Restarted Glassfish
Deploy and run my EJBModule project.
Get the Toplink 4002 - cannot have more than one non-XA.

I don't.

I have two XA data sources.

I got the EclipseLink jars from Glassfish v3 modules directory and placed into Glassfish v2 lib directory.

Selected EclipseLink for persistence.xml - get EclipseLink error same as Toplink error.

Any suggestions on how to proceed?

The session bean has two "Façade" beans injected with @EJB. Each "Façade" bean has an EntityManager using one of the PUs in persistence.xml. Calling the first "Façade" bean's create method is okay. Calling the second "Façade" bean's create method blows the error.

Commenting out the call to the second "Façade" beans's create method - no error.
Put that one back
And comment the call to the first "Façade" bean's create method - a call to the second "Façade" bean's create method still blows error.

First and second are the order of the PU in persistence.xml and also happens to be the order they are called in the code.

I have no clue how to fix this problem.