I have created multiple persistence units/data sources in the
persistence.xml:
transaction mode="local" :
<non-jta-data-source>jdbc/fpa_datasource</non-jta-data-source>
transaction mode="managed"
<jta-data-source>jdbc/fpa_jtadatasource</jta-data-source>
<non-jta-data-source>jdbc/fpa_datasource</non-jta-data-source>
transaction mode="local" :
<jta-data-source>jdbc/wfdss_datasource</jta-data-source>
transaction mode="local" :
<jta-data-source>jdbc/wims_datasource</jta-data-source>
I configured Database Pools for each one with the same name and they connect
ok using the Geronimo (WAS CE) Admin Console.
I added the following to the deployment plan of the EAR. Note the artifactId
I got from the JNDI viewer:
<sys:dependency>
<groupId>console.dbpool</groupId>
<artifactId>jdbc_fpa_datasource</artifactId>
</sys:dependency>
<sys:dependency>
<groupId>console.dbpool</groupId>
<artifactId>jdbc_fpa_jtadatasource</artifactId>
</sys:dependency>
<sys:dependency>
<groupId>console.dbpool</groupId>
<artifactId>jdbc_wfdss_datasource</artifactId>
</sys:dependency>
<sys:dependency>
<groupId>console.dbpool</groupId>
<artifactId>jdbc_wims_datasource</artifactId>
</sys:dependency>
>From JNDI viewer:
jca:/console.dbpool/jdbc_fpa_datasource/JCAManagedConnectionFactory/jdbc/fpa_datasource
jca:/console.dbpool/jdbc_fpa_jtadatasource/JCAManagedConnectionFactory/jdbc/fpa_jtadatasource
jca:/console.dbpool/jdbc_wfdss_datasource/JCAManagedConnectionFactory/jdbc/wfdss_datasource
jca:/console.dbpool/jdbc_wims_datasource/JCAManagedConnectionFactory/jdbc/wims_datasource
The EAR deploys OK but I get an Exception that the URL is "null" when a JPA
call is made from the EAR. My Database pools use the TranQL XA Resource
Adapter for Oracle following this pattern and test ok from the console:
Database name: <db name>
• User Name: <user name>
• Password: <user password>
• Server Name: <host name>
• Driver Type: thin
• Description: <text>
• Login Timeout: default
• Port Number: 1521
• Service Name: <db name>
• Data Source Name:oracle.jdbc.xa.client.OracleXADataSource
• TNS Entry Name:
o (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host =kpnatsp6)(Port =
1521))(CONNECT_DATA = (SID = <db name>)))
• Max Statements: default
• Network Protocol: TCP
• Pool Size (min and Max): default
• Blocking Timeout: default
• Idle Timeout: default
Should the TranQL XA Resource Adapter for Oracle be used only for JPA
"managed" persistence units and
TranQL Generic JDBC Resource Adapter use for "local" persistence units ?
I will try this change but some helpfull pointers will be appreciated ...
--
View this message in context:
http://n2.nabble.com/Geronimo-WAS-CE-Oracle-OpenJPA-configuration-problem-tp4548923p4548923.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.