-
1. Re: JCA config-property causes corruption to standalone.xml
jaikiran Jul 16, 2011 7:04 AM (in response to fastroller)Is this against AS 7.0 Final? If yes, please open a JIRA here https://issues.jboss.org/browse/AS7
-
2. Re: JCA config-property causes corruption to standalone.xml
fastroller Jul 16, 2011 7:41 PM (in response to jaikiran) -
3. Re: JCA config-property causes corruption to standalone.xml
gmkumar2005 Jul 27, 2011 8:20 AM (in response to fastroller)Jai Kiran ! I have downloaded theJBoss-AS-7.0.x Build #1448 (Jul 27, 2011 2:42:03 AM) the above issue did not find its way into this build.
This issue still exists.
Can u please confirm if this fix is part of todays build ?
-
4. Re: JCA config-property causes corruption to standalone.xml
jaikiran Jul 27, 2011 8:44 AM (in response to gmkumar2005)The commit log shows that it's available in AS7 upstream https://source.jboss.org/changelog/JBossAS?cs=604ea95b0a1340bf920b695b2644ef94dbfe6c08. But if you are still running into this issue with the nightly build, then please add more details and the steps that you followed to reproduce this.
-
5. Re: JCA config-property causes corruption to standalone.xml
gmkumar2005 Jul 28, 2011 12:26 AM (in response to jaikiran)I have configired datanucleus-jca as below inside standalone.xml
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
datanucleus-jca-3.0.0-m6.rar
</archive>
<config-property name="PersistenceUnitName">
pu
</config-property>
<connection-definitions>
<connection-definition class-name="org.datanucleus.jdo.connector.ManagedConnectionFactoryImpl" jndi-name="java:/TraderDB-PU" enabled="true" use-java-context="true" pool-name="DNConnectionFactory" use-ccm="true"/>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
The PersistanceUnitName above is pu , the ManagedConnectionFactoryImpl tries to locate pu inside ra.xml and jdoconfig.xml. The pu never matches with the one defined inside ra.xml. As a workaround i am using <config-property-value>("PersistenceUnitName" => "pu")</config-property-value> inside ra.xml and jdoconfig.xml.
When I change the ("PersistenceUnitName" => "pu") to pu datanucleus fails to load.
-
6. Re: JCA config-property causes corruption to standalone.xml
jesper.pedersen Jul 28, 2011 8:50 AM (in response to gmkumar2005)Please, attach your ra.xml file -- also if the config-property is on the MCF you need to move the <config-property> tag under the <connection-definition>.
Currently it looks for "PersistenceUnitName" on the ResourceAdapter instance.
-
7. Re: JCA config-property causes corruption to standalone.xml
gmkumar2005 Jul 29, 2011 1:45 PM (in response to jesper.pedersen)plz give me a hint how to attach a file in this forum. Nevertheless here are the relavent sections in respective files
ra.xml
<config-property>
<config-property-name>PersistenceUnitName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>("PersistenceUnitName" => "pu")</config-property-value>
</config-property>
<config-property>
<config-property-name>PersistenceXmlFilename</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>file:///data1/home/kiran/jboss-as-7.1.0.Alpha1-SNAPSHOT/standalone/deployments/jdopersistence.xml</config-property-value>
jdopersistence.xml
<persistence-unit name="("PersistenceUnitName" => "pu")">
<properties>
<property name="datanucleus.connection.resourceType" value="JTA"/>
<property name="datanucleus.storeManagerType" value="rdbms"/>
<property name="datanucleus.autoCreateSchema" value="false"/>
<property name="datanucleus.ConnectionFactoryName" value="java:jboss/datasources/TradeDBDSJTA"/>
<property name="datanucleus.ConnectionFactory2Name" value="java:jboss/datasources/TradeDBDS"/>
<property name="datanucleus.autoStartClassNames" value="com.blogspot.jkook.daytrader.jdo.JDOOrderData"/>
<property name="datanucleus.autoStartMechanism" value="Classes"/>
<property name="datanucleus.autoStartMechanismMode" value="Ignored"/>
<property name="datanucleus.jtaLocator" value="custom_jndi"/>
<property name="datanucleus.jtaJndiLocation" value="java:jboss/TransactionManager"/>
</properties>
</persistence-unit>
standalone.xml
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
datanucleus-jca-3.0.0-m6.rar
</archive>
<config-property name="PersistenceUnitName">
pu
</config-property>
<connection-definitions>
aderDB-PU" enabled="true" use-java-context="true" pool-name="DNConnectionFactory" use-ccm="true"/>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
-
8. Re: JCA config-property causes corruption to standalone.xml
jesper.pedersen Jul 29, 2011 1:52 PM (in response to gmkumar2005)Move <config-property> in standalone.xml under the <connection-definition> element, like
<connection-definition ....>
<config-property ...>
</connection-definiton>
-
9. Re: JCA config-property causes corruption to standalone.xml
gmkumar2005 Jul 30, 2011 10:59 AM (in response to jesper.pedersen)Thanks Jesper , It works with the changes you suggested the altered section in standalone.xml looks as below. I am happy with instant responses from you and your team. Your commitment to even a very small issue like this proves again that Jboss is a real server for real people. I will continue to promote jboss as where ever possible.
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
datanucleus-jca-3.0.0-m6.rar
</archive>
<connection-definitions>
<connection-definition class-name="org.datanucleus.jdo.connector.ManagedConnectionFactoryImpl" jndi-name="java:/TraderDB-PU" enabled="true" use-java-context="true" pool-name="DNConnectionFactory" use-ccm="true">
<config-property name="PersistenceUnitName">
pu
</config-property>
</connection-definitions>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>