0 Replies Latest reply on Sep 10, 2015 5:57 PM by Shanmugam as

    Need help to configure Resource Adapter in Jboss EAP 6.4

    Shanmugam as Newbie

      I am doing jboss migration from Jboss4.x to Jboss 6.4 and current version Jboss 4.x configured connection factories to communicate mainframe and working so I try to doing same thing to migrate Jboss 6 configuration using resource adapter. But I am getting exception(). I do not know what I am missing.

       

       

      Current JBoss 4.x configuration

      jracappstest-ds.xml

       

      <connection-factories>
      <no-tx-connection-factory>
        <jndi-name>eis/JracRa/AppslinkTest</jndi-name>
        <rar-name>unisys-jrac-connector-3.0.0.rar</rar-name>

        <connection-definition>
         javax.resource.cci.ConnectionFactory
        </connection-definition>

        <config-property name="ServerName" type="java.lang.String">
         TEST
        </config-property>
        <config-property name="PortNumber" type="java.lang.String">
         6666
        </config-property>
        <config-property name="WindowName" type="java.lang.String">
         TEST_NAME
        </config-property>

        <security-domain>jca-credentials</security-domain>

        <idle-timeout-minutes>20</idle-timeout-minutes>

        <min-pool-size>2</min-pool-size>
        <max-pool-size>10</max-pool-size>

      </no-tx-connection-factory>
      </connection-factories>

       

      Exception

       

      Caused by: javax.naming.NameNotFoundException: eis/JracRa/AppsTest -- service jboss.naming.context.java.jboss.eis.JracRa.AppsTest
      at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:104)
      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)
      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:174)
      at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:245)
      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)
      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
      at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]
      at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]
      at com.myapp.utils.unisys.connection.MainframeRA.lookupConnectionFactory(MainframeRA.java:292) [mainframe-ra-2.2.0.jar:]
      at com.myapp.utils.unisys.connection.MainframeRA.initializeConnectionFactory(MainframeRA.java:249) [mainframe-ra-2.2.0.jar:]
      ... 41 more

       

      Code

       

       

      private ConnectionFactory lookupConnectionFactory()
              throws NamingException {

              final Context initContext = new InitialContext();
              final String jndiName = "java:jboss/"
                  + UnisysDataSource.getInstance().lookupJndiName(targetRegionValue);
              return (onnectionFactory) initContext.lookup(jndiName);

          }

       

      Configured in standalone.xml

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">

                  <resource-adapters>
                         <resource-adapter id="unisys-jrac-connector-3.0.0.rar">
                             <archive>
                              unisys-jrac-connector-3.0.0.rar
                          </archive>
                             <transaction-support>NoTransaction</transaction-support>
                             <connection-definitions>
                              <connection-definition class-name="javax.resource.cci.ConnectionFactory" jndi-name="java:jboss/eis/JracRa/AppsTest" use-java-context="true" pool-name="eis/JracRa/AppsTest">
                                     <config-property name="UserName">
                                      TEST
                                  </config-property>
                                  <config-property name="WindowName">
                                      TEST_NAME
                                  </config-property>
                                  <config-property name="PortNumber">
                                      6666
                                  </config-property>
                                  <config-property name="ServerName">
                                      server_name
                                  </config-property>
                                  <config-property name="Password">
                                      TEST_PASS
                                  </config-property>
                              </connection-definition>
                </resource-adapter>
             </resource-adapters>