1 2 Previous Next 15 Replies Latest reply on Feb 20, 2009 6:06 AM by ryandavid Go to original post
      • 15. Re: Integration with Oracle AQ via Sun Adapter
        ryandavid

        Now I am trying to deploy a MDB

        Here is ejb-jar.xml

        <enterprise-beans>
        
         <message-driven>
         <ejb-name>TestJMSBean</ejb-name>
         <ejb-class>it.testjms.TestJMSBean</ejb-class>
         <messaging-type>javax.jms.MessageListener</messaging-type>
         <transaction-type>Bean</transaction-type>
         <message-destination-type>javax.jms.Queue</message-destination-type>
        
         <activation-config>
         <activation-config-property>
         <activation-config-property-name>destinationType</activation-config-property-name>
         <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
         </activation-config-property>
         <activation-config-property>
         <activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>
         <activation-config-property-value>java:jdbc/OracleAQ</activation-config-property-value>
         </activation-config-property>
         <activation-config-property>
         <activation-config-property-name>destinationJndiName</activation-config-property-name>
         <activation-config-property-value>java:jdbc/OracleAQ</activation-config-property-value>
         </activation-config-property>
        
        
         </activation-config>
        
         </message-driven>
        
         </enterprise-beans>


        and jboss.xml

        <jboss>
         <enterprise-beans>
        
         <message-driven>
         <ejb-name>TestJMSBean</ejb-name>
        
         <!-- use the a JMS invoker bindings for message inflow driven beans -->
         <invoker-bindings>
         <invoker>
         <invoker-proxy-binding-name>message-inflow-driven-bean</invoker-proxy-binding-name>
         </invoker>
         </invoker-bindings>
        
         <resource-adapter-name>oracleaq.rar</resource-adapter-name>
        
         <destination-jndi-name>oracleaq/queue/msg_queue</destination-jndi-name>
        
         </message-driven>
        
         </enterprise-beans>
        </jboss>
        


        When I start JBoss I get this exception

        2009-02-20 11:52:04,525 INFO [STDOUT] main AQjmsQueueConnectionFactory - constructor: jdbc connect string: jdbc:oracle:thin:user/password@localhost:1521:sid
        2009-02-20 11:52:04,530 INFO [STDOUT] main AQjmsQueueConnectionFactory.createQueueConnection: Username: user
        2009-02-20 11:52:04,533 INFO [STDOUT] main newDBConnection: Creating using url=>jdbc:oracle:thin:user/password@localhost:1521:sid
        2009-02-20 11:52:05,535 INFO [STDOUT] main AQjmsConnection: constructor url/info: Exception: oracle.jms.AQjmsException: Eccezione IO: The Network Adapter could not establish the connection
        oracle.jms.AQjmsException: Eccezione IO: The Network Adapter could not establish the connection
         at oracle.jms.AQjmsConnection.checkForSecurityException(AQjmsConnection.java:1626)
         at oracle.jms.AQjmsConnection.newDBConnection(AQjmsConnection.java:1712)
         at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:255)
         at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:300)
         at com.sun.genericra.inbound.InboundJmsResourcePool.createConnection(InboundJmsResourcePool.java:245)
         at com.sun.genericra.inbound.InboundJmsResourcePool.initialize(InboundJmsResourcePool.java:148)
         at com.sun.genericra.inbound.EndpointConsumer.initialize(EndpointConsumer.java:136)
         at com.sun.genericra.inbound.EndpointConsumer.start(EndpointConsumer.java:125)
         at com.sun.genericra.GenericJMSRA.endpointActivation(GenericJMSRA.java:215)
         at org.jboss.resource.deployment.RARDeployment.endpointActivation(RARDeployment.java:267)
        


        This is because it's trying to open a connection without any parameter. Maybe in ejb-jar.xml or jboss.xml should be placed a reference to the
        tx-connection-factory named with jndi-name jdbc/OracleAQ but I don't know where to write it.

        I tried with connectionFactoryJndiName and destinationJndiName properties but it doesn't work.




        1 2 Previous Next