-
1. Re: NameNotFoundException for a RAR in an EAR
jaikiran Jun 21, 2012 1:09 AM (in response to slowdive)Welcome to the forums!
slowdive wrote:
In my jboss-app.xml, I have
<connection-definition class-name="com.ex.connector.ra.outbound.ExampleConnectionFactoryImpl"
jndi-name="java:/jca/exampleCon" enabled="true" use-java-context="true" pool-name="exampleConPool" use-ccm="true">
jboss-app.xml does not support that element. What exactly does that file look like?
-
2. Re: NameNotFoundException for a RAR in an EAR
slowdive Jun 21, 2012 8:45 AM (in response to jaikiran)Thanks for the reply jaikiran! Sorry, that should say jboss-ra.xml.
jboss-ra.xml:
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>example-app-7.1.0.ear#example-resource-adapter-jboss-7.1.0.rar</archive>
<!-- Resource adapter level config-property -->
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="com.ex.connector.ra.outbound.ExampleConnectionFactoryImpl"
jndi-name="java:/jca/exampleCon" enabled="true" use-java-context="true" pool-name="exampleConPool" use-ccm="true">
<pool>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<config-property name="databaseFileName">test</config-property>
<config-property name="database">test</config-property>
<config-property name="user">un</config-property>
<config-property name="password">pass</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
In ra.xml:
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java/sun.com/xml/ns/j2ee/connector_1_5.xsd" version="1.5">
<display-name>ExampleConnector</display-name>
<eis-type>EXAPI</eis-type>
<resourceadapter-version>1.0</resourceadapter-version>
<license>
<license-required>false</license-required>
</license>
<resourceadapter>
<resourceadapter-class>com.ex.connector.ra.ExampleResourceAdapterImpl</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>com.ex.connector.ra.outbound.ExampleConnectionFactoryImpl</managedconnectionfactory-class>
<config-property>
<config-property-name>databaseFileName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>database</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>user</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>com.ex.connector.ra.outbound.ExampleConnectionFactoryImpl</connectionfactory-impl-class>
<connection-interface>javax.resource.cci.Connection</connection-interface>
<connection-impl-class>com.ex.connector.ra.outbound.ExampleConnectionImpl</connection-impl-class>
</connection-definition>
<transaction-support>NoTransaction</transaction-support>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
</resourceadapter>
</connector>
-
3. Re: NameNotFoundException for a RAR in an EAR
sergiu_pienar Jun 26, 2012 9:57 AM (in response to slowdive)Does it say in the JBoss console that is had deployed the resource adapter and bound it to the correct name ?
Sergiu
-
4. Re: NameNotFoundException for a RAR in an EAR
slowdive Jun 26, 2012 10:23 AM (in response to sergiu_pienar)Thanks for the reply! I cannot remember for sure, but I do not believe it was registering. I changed a bunch of things since then, and I can't remember how I had it set up to recreate . I switched to using Ironjacamar, and it is registering now. I'm experiencing different errors now. If I cannot get them resolved, I will post another thread.