I'm trying to use JPOX framework (www.jpox.org) with geronimo 2-M6.
I have a test case (all packaged in a ear) that is working with JBOSS 4.2
and I want ot make it working with geronimo.
First problem: in the rar file provided in jpox distrib the ra.xml doesn't
contain available properties (config-property elements are empty). With
Jboss I defined all properties in a jpox-ds.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
<tx-connection-factory>
<jndi-name>eis/jdo/JpoxPersistenceManagerFactory</jndi-name>
<rar-name>MyApplication.ear#jpox-jca-1.2-SNAPSHOT.rar</rar-name>
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
<config-property name="ConnectionFactoryName"
type="java.lang.String">java:/tamsDS</config-property>
<config-property name="ConnectionFactory2Name"
type="java.lang.String">java:/tamsDS2</config-property>
...
</tx-connection-factory>
</connection-factories>
With geronimo I defined the properties in a jpox.xml file like this:
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
<dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>console.dbpool</dep:groupId>
<dep:artifactId>jpox</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>rar</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>oracle</dep:groupId>
<dep:artifactId>ojdbc14</dep:artifactId>
<dep:version>10.2.0.1.0</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>
<resourceadapter>
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jpox</name>
<!--<config-property-setting
name="ConnectionFactoryName">tamsDS</config-property-setting>
<config-property-setting
name="ConnectionFactory2Name">tamsDS2</config-property-setting>-->
<config-property-setting
name="ConnectionDriverName">oracle.jdbc.OracleDriver</config-property-setting>
<config-property-setting
name="ConnectionURL">jdbc:oracle:thin:@localhost:1521/XE</config-property-setting>
<config-property-setting
name="ConnectionUserName">sa</config-property-setting>
<config-property-setting
name="ConnectionPassword">hagar</config-property-setting>
<config-property-setting
name="Schema">SA</config-property-setting>
<config-property-setting
name="FixedDatastore">true</config-property-setting>
<config-property-setting
name="ValidateTables">false</config-property-setting>
<config-property-setting
name="ValidateConstraints">false</config-property-setting>
<config-property-setting
name="Optimistic">true</config-property-setting>
<config-property-setting
name="Multithreaded">true</config-property-setting>
<config-property-setting
name="IgnoreCache">true</config-property-setting>
<config-property-setting
name="RestoreValues">true</config-property-setting>
<config-property-setting
name="DetachAllOnCommit">true</config-property-setting>
<config-property-setting
name="NontransactionalRead">false</config-property-setting>
<connectionmanager>
<no-transaction/>
<no-pool/>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
</connector>
the jpox.xml file is referred in geronimo-application like this :
<module>
<connector>jpox-jca-1.2-SNAPSHOT.rar</connector>
<alt-dd>META-INF/jpox.xml</alt-dd>
</module>
Whe I deploy my ear file in geronimo I receive :
Unable to deploy: org.apache.geronimo.common.DeploymentException: The plan
is trying to set attributes: [ConnectionDriverName, ConnectionURL,
ConnectionUserName, ConnectionPassword, Schema, FixedDatastore,
ValidateTables, ValidateConstraints, Optimistic, Multithreaded, IgnoreCache,
RestoreValues, DetachAllOnCommit, NontransactionalRead]
I think it is because these properties are not define in the ra.xml provided
by jpox. If I manually add them it works.
Is it possible to define properties somewhere else ? I don't want to "patch"
standard jpox distrib (jpox-jca-1.2-SNAPSHOT.rar) to make it working with
geronimo.
My second problem: I want that jpox use a geronimo connection pool. I have
created 2 connection pools via the geronimo console. I need a transactional
one and a non-transactional one, how can I specify this ?. Jpox needs 2
properties to use app server connection pool : ConnectionFactoryName
(transactional) and ConnectionFactory2Name (non transactional). As you see
in the jpox-ds.xml the connections are refered with a global jndi name
(java:/tamsDS and java:/tamsDS2). How can I refer this in geronimo ?
following config doesn't work :
<config-property-setting
name="ConnectionFactoryName">java:/tamsDS</config-property-setting>
<config-property-setting
name="ConnectionFactory2Name">java:/tamsDS2</config-property-setting>
Pools created in geronimo are defined like this :
console.dbpool/tamsDS/1.0/rar
console.dbpool/tamsDS2/1.0/rar
How can I make the link between them ?
Thanks
Frédéric.
--
View this message in context:
http://www.nabble.com/geronimo-using-JPOX-JDO-tf4240920s134.html#a12067391
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.