MDB deployment descriptors for Oracle AQ 

Joined:
04/09/2007
Posts:
753

May 08, 2007 23:09:39    Last update: May 08, 2007 23:13:07
First create a resource provider for Oracle AQ in orion-application.xml:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE orion-application 
PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" 
"http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
<orion-application>
  <data-sources path="data-sources.xml"/>
  <resource-provider name="rsname" class="oracle.jms.OjmsContext" >
      <description>JMS resource provider</description>
      <property name="datasource" value="jndi/path/for/db/OracleDS"></property>
  </resource-provider>
</orion-application>


Then, hook up the EJB to the queue in orion-ejb-jar.xml:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE orion-ejb-jar 
PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" 
"http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">

<orion-ejb-jar>
  <enterprise-beans>
    <message-driven-deployment 
    max-instances="-1" 
    name="MessageProcessEJB" 
    connection-factory-location="java:comp/resource/rsname/QueueConnectionFactories/ANY_NAME" 
    destination-location="java:comp/resource/rsname/Queues/SCHEMA_OWNER.QUEUE_NAME" 
    listener-threads="3" min-instances="10" 
    dequeue-retry-count="100" 
    dequeue-retry-interval="30"/>
  </enterprise-beans>
</orion-ejb-jar>


Make sure the resource names ('rsname') match among the xml files.

Full information is available from the Oracle document titled "Oracle Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0)". Look at Appendix A.
Share |
| Comment  | Tags