|
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 3 (10.1.3) B14428-01 |
|
![]() Previous |
![]() Next |
You can configure an EJB 3.0 MDB to use a non-J2CA message service provider using deployment XML (see "Using Deployment XML").
For more information, see:
You can use the ejb-jar.xml or orion-ejb.jar.xml file. You use the orion-ejb-jar.xml file configuration to override settings in ejb-jar.xml or to add OC4J-specific settings. For example, the connection factory and destination name that you define in ejb-jar.xml may be logical names that may not exist in your local JNDI environment. The deployer can override these settings in the orion-ejb-jar.xml file and map them to the actual names. For more information on mapping logical names, see "Configuring an Environment Reference to a JMS Destination or Connection Resource Manager Connection Factory".
Example 18-1 shows how to configure ejb-jar.xml to configure a message-driven bean to use a non-J2CA JMS message service provider. It assumes that you have defined connection factory jms/MyQCF and queue jms/MyQueue in the jms.xml file. For more information on configuring a non-J2CA message service provider, see "Configuring an OracleAS JMS Message Service Provider" or "Configuring an OJMS Message Service Provider".
Example 18-1 ejb-jar.xml for a Non-J2CA Message Service Provider
<message-driven> <ejb-name>QueueMDB</ejb-name> <ejb-class>test.QueueMDB</ejb-class> <message-destination-type>javax.jms.Queue</message-destination-type> <transaction-type>Container</transaction-type> <activation-config> <activation-config-property> <activation-config-property-name> ConnectionFactoryJndiName </activation-config-property-name> <activation-config-property-value> jms/MyQCF </activation-config-property-value> </activation-config-property> <activation-config-property> <activation-config-property-name> DestinationName </activation-config-property-name> <activation-config-property-value> jms/MyQueue </activation-config-property-value> </activation-config-property> </activation-config> </message-driven>
For a complete list of all activation configuration properties, download and unzip one of the how-to-gjra-with-xxx.zip files from http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html, where xxx is the name of the relevant resource provider. The orion-ejb-jar.xml demo file contains comments describing all activation configuration properties. For more information, see "JMS Resource Adapter" in the Oracle Containers for J2EE Services Guide.
The actual names you use depend on your message service provider installation. For more information, see: