1 Reply Latest reply on Mar 22, 2012 10:42 AM by Nicolas STRAUEL

    Binding AQ JMS factory to JNDI

    Nicolas STRAUEL Newbie

      Hi Community,

       

      I am working on integrating AS7.1 with Oracle AQ using Oracle's JCA/JMS "SOA" adapter. This adapter basically requires that the adequate JMS connection factory is present in the AS JNDI (this factory would be coming out of Oracle's AQ plain JMS driver).

      My question is: what is the most convenient way to bind that JMS factory to the JNDI ? Is there a dedicated service in AS7 to do that - instead of writing code (similar to "urn:jboss:domain:naming:1.1" definition for binding simple strings) ?

       

      Any idea welcome. Thanks.

        • 1. Re: Binding AQ JMS factory to JNDI
          Nicolas STRAUEL Newbie

          For the above, what I do right now is to bind the required AQ JMS objects (connection factory, destinations) via <subsystem xmlns="urn:jboss:domain:naming:1.1"> bindings, using custom factories deployed as a new module.

          Then I deploy Oracle's JCA/JMS adapter simply dropping the RAR file into the deployments dir.

           

          Now my next issue is that I get a "java.lang.IllegalStateException: JBAS014331: No resource adapter registered with resource adapter name jmsadapter" at the time a MDB using that RAR gets deployed.

           

          Below are debug extracts of my startup (AS 7.1.1.Final) :

           

           

          ...

          15:40:58,252 DEBUG [org.jboss.as.security] (MSC service thread 1-5) Cannot create permissions with 'null' metaData for id=simplemdb.ear
          15:40:58,345 DEBUG [org.jboss.as.deployment.connector] (MSC service thread 1-8) DEPLOYMENT name = jmsadapter
          15:40:58,345 DEBUG [org.jboss.as.connector] (MSC service thread 1-2) starting Inactive:InactiveResourceAdapterDeployment{module=Module "deployment.jmsadapter.rar:main" from Service Module Loader, connectorXmlDescriptor=org.jboss.as.connector.metadata
          .xmldescriptors.ConnectorXmlDescriptor@f5cc77, deployment='jmsadapter', deploymentUnitName='jmsadapter.rar', registration=org.jboss.as.controller.registry.ConcreteResourceRegistration@142d6ab}
          15:40:58,345 DEBUG [org.jboss.as.security] (MSC service thread 1-7) Cannot create permissions with 'null' metaData for id=jmsadapter.rar
          15:40:58,580 DEBUG [org.jboss.as.ejb3] (MSC service thread 1-1) Security is *not* enabled on EJB: SimpleMDB, no security interceptors will apply
          15:40:58,767 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-8) JBAS010406: Registered connection factory java:/JmsXA
          15:40:58,799 DEBUG [org.jboss.as.deployment.connector] (MSC service thread 1-8) Registering ResourceAdapter jmsadapter
          15:40:58,799 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-8) IJ020002: Deployed: file:/D:/JBossAS711/jboss-as-7.1.1.Final/standalone/tmp/vfs/temp1c77421feba0de80/jmsadapter.rar-57896139fd592eb4/contents/
          15:40:58,814 DEBUG [org.jboss.as.connector] (MSC service thread 1-6) started ConnectionFactoryService service jboss.connector.connection-factory.java:/JmsXA
          15:40:58,814 DEBUG [org.jboss.as.connector] (MSC service thread 1-7) Started ResourceAdapterService service jboss.ra.jmsadapter
          15:40:58,814 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
          15:40:58,830 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."simplemdb.ear"."simplemdb-ejb.jar".component.SimpleMDB.CREATE: org.jboss.msc.service.StartException in service jboss.
          deployment.subunit."simplemdb.ear"."simplemdb-ejb.jar".component.SimpleMDB.CREATE: Failed to start service
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
                  at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
          Caused by: java.lang.IllegalStateException: JBAS014331: No resource adapter registered with resource adapter name jmsadapter
                  at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:80)
                  at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:87)
                  at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:84)
                  at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.start(MessageDrivenComponentCreateService.java:74)
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  ... 3 more

           

           

           

           

          Anybody can help with this issue ?

           

          Thanks,

           

          Nicolas