2 Replies Latest reply on Aug 18, 2004 9:24 AM by adrian.brock

    RAR inside an EAR

    greydeath

      Hi,

      I have a RAR and the related -ds.xml file. this works quite fine. All services there and the JNDI is bound.

      Now I want to have it inside an EAR. so far so good. My problem now is that I want to use that Adapter inside other components of my EAR (EJB,Mbean).

      I tried to put the -ds.xml file into one of my ejb-jar files. It doesn't seem to work out. The jndi gets never bound. Hence I cannot use it.

      How can this be achieved.

        • 1. Re: RAR inside an EAR
          greydeath

           

          <connection-factories>
           <no-tx-connection-factory>
           <jndi-name>ftisoft/jca/FileSystem/local</jndi-name>
           <rar-name>ftisoft.resource.adapters.rar</rar-name>
          <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
           <config-property name="EisType" type="java.lang.String">FileSystem.local</config-property>
           <config-property name="Prefix" type="java.lang.String">FileSystem.local</config-property>
           <config-property name="Properties" type="java.lang.String">META-INF/Filesystem.local</config-property>
          </connection-factories>


          my -ds.xml file.

          I looked into the log (after turning tracing on) and I found the following:

          2004-08-17 14:48:12,102 DEBUG [org.jboss.management.j2ee.JCAResource] Could not create JSR-77 JCAResource: ftisoft/jca/FileSystem/local
          java.lang.NullPointerException
          at org.jboss.management.j2ee.JCAResource.getParentKeys(JCAResource.java:235)
          at org.jboss.management.j2ee.J2EEManagedObject.(J2EEManagedObject.java:178)
          at org.jboss.management.j2ee.J2EEResource.(J2EEResource.java:34)
          at org.jboss.management.j2ee.JCAResource.(JCAResource.java:129)
          at org.jboss.management.j2ee.JCAResource.create(JCAResource.java:68)
          at org.jboss.management.j2ee.factory.JCAResourceFactory.create(JCAResourceFactory.java:79)


          It seems the JCAResourceFactory doesn't find the RARDeployment service, because I referenced tar rar alone and didn't specify the ear file.

          I changed the rar-name to ftisoft.app.ear#ftisoft.resource.adapters.rar and it worked.

          I shouldn't need to reference my own ear file. that would be kind of cyclic loop.

          • 2. Re: RAR inside an EAR

            Yes you do need to reference the ear:
            http://www.jboss.org/wiki/Wiki.jsp?page=ConfigConnectionFactory

            Otherwise how would it know which rar to use if the rar was deployed
            at the top level or in a different ear.

            This is the same syntax used for resolving ejb-links uniquely.