5 Replies Latest reply on Aug 13, 2005 4:08 PM by andrew_wot

    Oracle AQ Resource Adapter in JBoss 4.0.2

    fospitia

      Hi

      In the last Oracle Containers for J2EE (OC4J), there are a file called OracleASjms.rar that is a JCA 1.5 for Oracle AQ.

      Archive: OracleASjms.rar
      testing: META-INF/ OK
      testing: META-INF/MANIFEST.MF OK
      testing: META-INF/oc4j-ra.xml OK
      testing: META-INF/ra.xml OK
      testing: gjra.jar OK

      I have created a file oarcleaq-jms-ra.xml in deploy/jms directory

      <?xml version="1.0" encoding="UTF-8"?>
      <connection-factories>

      <tx-connection-factory>
      <jndi-name>OAQConnectionFactory</jndi-name>
      <xa-transaction/>
      <track-connection-by-tx/>
      <rar-name>oracleaq-ra.rar</rar-name>
      <connection-definition>javax.jms.ConnectionFactory</connection-definition>
      </tx-connection-factory>

      <tx-connection-factory>
      <jndi-name>OAQQueueConnectionFactory</jndi-name>
      <xa-transaction/>
      <track-connection-by-tx/>
      <rar-name>oracleaq-ra.rar</rar-name>
      <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
      </tx-connection-factory>
      <tx-connection-factory>
      <jndi-name>OAQTopicConnectionFactory</jndi-name>
      <xa-transaction/>
      <track-connection-by-tx/>
      <rar-name>oracleaq-ra.rar</rar-name>
      <connection-definition>javax.jms.TopicConnectionFactory</connection-definition>
      </tx-connection-factory>

      and copy the OraclaASjms.rar as deploy/oracleaq-ra.rar in the deply dircetory

      but when I run the jboss, i have the follow error:

      2005-06-15 13:47:15,427 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.jca:service=RARDep
      loyment,name='oracleaq-ra.rar' dependents are: []
      2005-06-15 13:47:15,428 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying oracleaq-ra.rar
      2005-06-15 13:47:15,428 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/home/phe3390/apps/jboss-4.0.2/s
      erver/default/deploy/oracleaq-ra.rar
      2005-06-15 13:47:15,428 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/home/phe3390/apps/jboss-4.0.2/s
      erver/default/tmp/deploy/tmp55902oracleaq-ra.rar-contents/gjra.jar
      2005-06-15 13:47:15,428 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: gjra.jar
      2005-06-15 13:47:15,428 DEBUG [org.jboss.system.ServiceController] starting service jboss.jca:service=RARDeployment,name='orac
      leaq-ra.rar'
      2005-06-15 13:47:15,428 DEBUG [org.jboss.resource.deployment.RARDeployment] Starting jboss.jca:service=RARDeployment,name='ora
      cleaq-ra.rar'
      2005-06-15 13:47:15,446 WARN [org.jboss.system.ServiceController] Problem starting service jboss.jca:service=RARDeployment,na
      me='oracleaq-ra.rar'
      java.lang.NoClassDefFoundError: oracle/j2ee/ra/jms/generic/AdapterMBeanProvider
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
      at java.lang.Class.getConstructor0(Class.java:2640)
      at java.lang.Class.newInstance0(Class.java:321)
      at java.lang.Class.newInstance(Class.java:303)
      at org.jboss.resource.deployment.ResourceAdapterFactory.createResourceAdapter(ResourceAdapterFactory.java:61)
      at org.jboss.resource.deployment.RARDeployment.startService(RARDeployment.java:101)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
      at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:110)


      Can somebody help me?

      Thanks

        • 1. Re: Oracle AQ Resource Adapter in JBoss 4.0.2
          fospitia

          Hi

          I found a solution, I append the file oc4j-unsupported-api.jar to oracleaq-ra.rar file and edit the ra.xml file change the properties lookupMethod by LookupMethod and resourceProviderName by ResourceProviderName

          Thanks

          • 2. Re: Oracle AQ Resource Adapter in JBoss 4.0.2
            jhorton12

             

            "fospitia" wrote:
            Hi

            I found a solution, I append the file oc4j-unsupported-api.jar to oracleaq-ra.rar file and edit the ra.xml file change the properties lookupMethod by LookupMethod and resourceProviderName by ResourceProviderName

            Thanks


            Are you subscribing to oracle AQ messages in JBoss MDB's? If so, does it work? Example?

            • 3. Re: Oracle AQ Resource Adapter in JBoss 4.0.2
              andrew_wot

              What DB version are you using, is it 10G?
              Did you achieve concurent message processing by multiple MDBs?
              Can you please provide an example?

              Thanks in advance.

              • 4. Re: Oracle AQ Resource Adapter in JBoss 4.0.2
                andrew_wot

                Somehow it doesn't work.
                After inclusion of oc4j_unsupportedapi.jar into rar file it started complaining about some missing OracleConnectionFactory from oc4j_internal.jar. After that one was packaged into rar, I start getting com.evermind.AppServer class missing, even thoug that class sits in the very same packaged into rar oc4j_internal.jar.

                Has anyone actually made it work?

                Thanks

                • 5. Re: Oracle AQ Resource Adapter in JBoss 4.0.2
                  andrew_wot

                  Hmm, a little confusion.
                  OracleASJMS is not an adapter for a traditional database persistent Oracle AQ
                  Here's te extract from
                  http://www.oracle.com/technology/tech/java/oc4j/1012/collateral/OC4J-FAQ-JMS-1012.html


                  Oracle offers two JMS providers; OJMS (AQ/JMS) and OC4J/JMS. Which one should I be using?

                  OJMS and OracleAS JMS are both J2EE 1.3 compliant JMS providers from Oracle. OJMS has been integrated into OracleAS 10g using the JCA adapter while at the same time leveraging Advanced Queuing in the Oracle Database for persistence and recoverability. If database recoverability guarantees, SQL queriability, transparent application failover, message transformation, propagation are required then Oracle recommends using OJMS as the JMS provider.

                  OracleAS JMS is a lightweight, in-memory/file based queuing system that provides a complete J2EE 1.3 JMS implementation. It is suited for applications that do not require Oracle specific JMS extensions or the recoverability guarantees that OJMS provides.

                  The following table summarizes a feature comparison between OJMS and OracleAS JMS: