3 Replies Latest reply on Nov 21, 2012 9:38 AM by miragpl

    Migration JCA connectors from Jboss 6 to Jboss 7

    miragpl

      Hi everyone,

       

      I've been trying to migrate JCA connectors from JBoss 6 to JBoss 7. So far without any sucess.

      In Jboss 6 I got:

       

      1. Connector archive (rar) in deploy folder with following ra.xml descriptior

       

      <?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>JCANAME</display-name>

                <vendor-name>Company</vendor-name>

                <eis-type>JCANAME</eis-type>

                <resourceadapter-version>1.0</resourceadapter-version>

       

                <resourceadapter>

                          <outbound-resourceadapter>

                                    <connection-definition>

                                              <managedconnectionfactory-class>mypackage.MyManagedConnectionFactory</managedconnectionfactory-class>

                                              <connectionfactory-interface>mypackage.ConnectionFactory</connectionfactory-interface>

                                              <connectionfactory-impl-class>mypacakge.impl.ConnectionFactoryImpl</connectionfactory-impl-class>

                                              <connection-interface>mypackageJCAInterface</connection-interface>

                                              <connection-impl-class>mypackageJCAInterfaceImpl</connection-impl-class>

                                    </connection-definition>

                                    <transaction-support>NoTransaction</transaction-support>

                                    <reauthentication-support>false</reauthentication-support>

                          </outbound-resourceadapter>

                </resourceadapter>

      </connector>

       

      2. libraries that were required by this connector that were placed in server/lib folder

      3. ds file in deploy folder

       

       





      <no-tx-connection-factory>


      <jndi-name>JCANAME</jndi-name>


      <rar-name>myjca-connector.rar</rar-name>


      <connection-definition>mypackage.ConnectionFactory


      </connection-definition>




      <depends>jboss:service=MySerice</depends>

      </no-tx-connection-factory>

       

       

      In jboss 7 I tried to:

       

      1. Create a sepearte module with all jars that were previously in server/lib folder and use it as dependency in my rar connector

      2. Define my rar connector inside standalone.xml

       

      <resource-adapter>

                          <archive>

                              myjca-connector.rar

                          </archive>

                          <transaction-support>NoTransaction</transaction-support>

                          <connection-definitions>

                              <connection-definition class-name="mypackage.ConnectionFactory" jndi-name="JCANAME" enabled="true" use-java-context="true" pool-name="JCANAME-POOL" use-ccm="true">

                                  <pool>

                                      <prefill>false</prefill>

                                      <use-strict-min>false</use-strict-min>

                                      <flush-strategy>FailingConnectionOnly</flush-strategy>

                                  </pool>

                                  <validation>

                                      <background-validation>false</background-validation>

                                      <use-fast-fail>false</use-fast-fail>

                                  </validation>

                              </connection-definition>

                          </connection-definitions>

                      </resource-adapter>

       

      3. the .rar conntors stays without any changes (so the ra.xml file is exactly the same)

      4. ds file is not used anymore

       

      I thought it would be enought but I got exception telling my that some classes (connection factories) where not implementing equals and hashcode. I did implement them and now i ended with following exception:

       

      mypackage.MyManagedConnectionFactory not a valid connection definition

       

      Any idea how to fix it? The message does not tell my anything? I just want to add that I've also tried to deploy the JCA connector inside the ear (the rar was the only content of the ear and the only other change was in standlone.xml in line myConnector.rar -> myEar#myConnector.rar). Ear deployed correctly - but there were no trace of any JCA connector anywhere (both in logs and console).

       

      I would appreciate any hint.

       

      Regards,

      Marcin