resource-adapter and connection-definition problems
lafr Mar 21, 2012 5:49 PMI'm still struggling a bit with Resource Adapters and Connection Definitions.
My standard-full.xml contains the resource adapter without any connections on a clean startup.
<resource-adapter> | |
<archive>controller.rar</archive> | |
</resource-adapter> |
When deploying my app, the cli is used to define a connection definiton using this commands:
connect
/subsystem=resource-adapters/resource-adapter=controller.rar/connection-definitions=maj2e-langfr-dev:add(jndi-name="java:/eis/maj2e-langfr-dev/ControllerConnector",class-name="biz.mbisoftware.fn.jca.controllerconnector.ManagedConnectionFactoryImpl",enabled="true")
/subsystem=resource-adapters/resource-adapter=controller.rar/connection-definitions=maj2e-langfr-dev/config-properties=ClientService:add(value=JCAClient)
/subsystem=resource-adapters/resource-adapter=controller.rar/connection-definitions=maj2e-langfr-dev/config-properties=SocketTimeout:add(value=0)
/subsystem=resource-adapters/resource-adapter=controller.rar/connection-definitions=maj2e-langfr-dev/config-properties=Encoding:add(value=ISO-8859-15)
/subsystem=resource-adapters/resource-adapter=controller.rar/connection-definitions=maj2e-langfr-dev/config-properties=ServerName:add(value=sb2000)
/subsystem=resource-adapters/resource-adapter=controller.rar/connection-definitions=maj2e-langfr-dev/config-properties=PortNumber:add(value=6506)
The outcome of all commands is success.
After that I can see the connection using the web console. It's there, it's enabled, and all properties are set as requested.
When I shut down JBoss AS7 now, the entry is in standalone-full.xml.
<resource-adapter> | |
<archive> | |
controller.rar | |
</archive> | |
<connection-definitions> | |
<connection-definition class-name="biz.mbisoftware.fn.jca.controllerconnector.ManagedConnectionFactoryImpl" jndi-name="java:/eis/maj2e-langfr-dev/ControllerConnector" enabled="true" pool-name="maj2e-langfr-dev"> | |
<config-property name="ClientService">JCAClient</config-property> | |
<config-property name="SocketTimeout">0</config-property> | |
<config-property name="Encoding">ISO-8859-15</config-property> | |
<config-property name="ServerName">sb2000</config-property> | |
<config-property name="PortNumber">6506</config-property> | |
</connection-definition> | |
</connection-definitions> | |
</resource-adapter> |
The jndi lookup of my application fails with NameNotFoundException.
I recognized, I do not see a "bound to jndi" message on console output / file logging like this on restart with the enhanced standalone-full.xml:
22:46:37,517 INFO [org.jboss.as.deployment.connector#bindConnectionFactory] JBAS010406: Registered connection factory java:/eis/maj2e-langfr-dev/ControllerConnector
22:46:37,566 INFO [org.jboss.as.deployment.connector#transition] JBAS010401: Bound JCA ConnectionFactory [java:/eis/maj2e-langfr-dev/ControllerConnector]
But the weird thing is, that this doe not happen every time.
Anyone having similar problems or an idea how to find out what the problem is?