<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    How to configure EJB3 MDBs for IBM Websphere MQ
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="http://community.jboss.org/people/yogamaha">yogananth Mahalingam</a> in <i>EJB3</i> - <a href="http://community.jboss.org/docs/DOC-12944">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>You do not need deployment descriptors for ejb3.&#160; The perferred method for configuring EJB3s would be with the annotations.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is how you would define your ejb3 bean with all of the properties.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">@MessageDriven( name=<font color="red">"MyMDBName"</font>,
&#160;&#160;&#160;&#160;&#160;&#160;&#160; activationConfig = 
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font> 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName=<font color="red">"messagingType"</font>,propertyValue=<font color="red">"javax.jms.MessageListener"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"destinationType"</font>,propertyValue = <font color="red">"javax.jms.Queue"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"destination"</font>, propertyValue = <font color="red">"queueA"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"useJNDI"</font>, propertyValue = <font color="red">"true"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"channel"</font>, propertyValue = <font color="red">"SYSTEM.DEF.SVRCONN"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"hostName"</font>, propertyValue = <font color="red">"devmq1sun"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"queueManager"</font>, propertyValue = <font color="red">"DEVMQ1SUN"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"port"</font>, propertyValue = <font color="red">"1416"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"transportType"</font>, propertyValue = <font color="red">"CLIENT"</font>)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"username"</font>, propertyValue = <font color="red">"foo"</font>)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"password"</font>, propertyValue = <font color="red">"bar"</font>)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>) 
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@ResourceAdapter(value = <font color="red">"wmq.jmsra2.rar"</font>)
&#160;
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You can get rid of your desployment descriptors as the annotations take their place.(ejb-jar.xml, jboss.xml).&#160; The above example uses your resource adapter and all of your activation configuration properties.&#160; I think I got them all in there.&#160; I did notice however that you are using the "wmq.jmsra2.rar" in your ejb descriptor, but your depends in the ds.xml file is using "wmq.jmsra.rar".&#160; You may want to fix that to get the dependencies correct.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Equivalent XML settings</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you wanted to deploy the same thing using xml files instead of annotations, your IBM adapter will be added to your jboss.xml file</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="jive-xml-tag"><span>&lt;jboss
&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160; xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a><span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" target="_blank">http://www.jboss.org/j2ee/schema/jboss_5_0.xsd</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160; version="3.0"&gt;</span></span>
&#160;&#160; <span class="jive-xml-tag">&lt;enterprise-beans&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;message-driven&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;ejb-name&gt;</span>MyMDBName<span class="jive-xml-tag">&lt;/ejb-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;resource-adapter-name&gt;</span>wmq.jmsra2.rar<span class="jive-xml-tag">&lt;/resource-adapter-name&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/message-driven&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;/enterprise-beans&gt;</span>
<span class="jive-xml-tag">&lt;/jboss&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>and your ejb-jar.xml file will look similar to this..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0"?&gt;</span>
<span class="jive-xml-tag"><span>&lt;ejb-jar
&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160; xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a><span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" target="_blank">http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd</a><span>" version="3.0"&gt;</span></span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;enterprise-beans&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;message-driven&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;ejb-name&gt;</span>MyMDBName<span class="jive-xml-tag">&lt;/ejb-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;ejb-class&gt;</span>test.mdb.TestMDBBean<span class="jive-xml-tag">&lt;/ejb-class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;messaging-type&gt;</span>javax.jms.MessageListener<span class="jive-xml-tag">&lt;/messaging-type&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;transaction-type&gt;</span>NotSupported<span class="jive-xml-tag">&lt;/transaction-type&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>messagingType<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>javax.jms.MessageListener<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>destinationType<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>javax.jms.Queue<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>destination<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>queueA<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>useJNDI<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>true<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>channel<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>SYSTEM.DEF.SVRCONN<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>hostName<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>devmq1sun<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>queueManager<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>DEVMQ1SUN<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>port<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>1416<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>transportType<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>CLIENT<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>username<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>foo<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-name&gt;</span>password<span class="jive-xml-tag">&lt;/activation-config-property-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activation-config-property-value&gt;</span>bar<span class="jive-xml-tag">&lt;/activation-config-property-value&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config-property&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activation-config&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/message-driven&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So this is how you would deploy one mdb with the queued defined as an Admin object in your ds.xml file.&#160; The useJNDI argument makes sure that the queue will be looked up in jndi.&#160; The IBM adapter takes an Admin Object as a queue and will make the appropriate arrangements to connect to it.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The next logical question would be how do I take the Activation Configuration Properties out of the mdb and</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>How do I take those settings and move them out to a global place where I can define them for all MDBs?<br/>-------------------------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>JBoss EJB3's work similar to EJB2.x, but not quite.&#160; In EJB3, the file that governs the interceptors and global settings is *NOT* the standard-jboss.xml file anymore.&#160; EJB3 now uses the deploy/ejb3-interceptors-aop.xml file.&#160; The default configuration(now it's called a domain) for all MDBs is "&lt;domain name="Message Driven Bean"&gt;".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Defining your own domains.&#160; You can define your own domains if you wish.&#160; So if you wanted to you could copy the "Message Driven Bean" domain and rename it to something like "IBMMQ Message Driven Bean".&#160; You could add a class annotation that looks like @AspectDomain("IBMMQ Message Driven Bean")</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Defining Properties in the domain.&#160; Here is the domain we were talking about.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">&lt;domain name=<font color="red">"Message Driven Bean"</font>&gt;
&#160;&#160;&#160;&#160;&#160; &lt;bind pointcut=<font color="red">"execution(public * @javax.annotation.security.RunAs-&gt;*(..))"</font>&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;interceptor-ref name=<font color="red">"org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"</font>/&gt;
&#160;&#160;&#160;&#160;&#160; &lt;/bind&gt;
&#160;&#160;&#160;&#160;&#160; &lt;bind pointcut=<font color="red">"execution(public * *-&gt;*(..))"</font>&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;interceptor-ref name=<font color="red">"org.jboss.ejb3.stateless.StatelessInstanceInterceptor"</font>/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;interceptor-ref name=<font color="red">"org.jboss.ejb3.tx.TxInterceptorFactory"</font>/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;interceptor-ref name=<font color="red">"org.jboss.ejb3.AllowedOperationsInterceptor"</font>/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;interceptor-ref name=<font color="red">"org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"</font>/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;interceptor-ref name=<font color="red">"org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"</font>/&gt;
&#160;&#160;&#160;&#160;&#160; &lt;/bind&gt;
&#160;&#160;&#160;&#160;&#160; &lt;annotation expr=<font color="red">"!class(@org.jboss.annotation.ejb.PoolClass)"</font>&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000)
&#160;&#160;&#160;&#160;&#160; &lt;/annotation&gt;
&#160;&#160; &lt;/domain&gt;
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>Please notice that the &lt;annotation&gt; tag actaully inserts a new PoolClass annotation into each MDB.&#160; This is so that you don't have to define the pool for each mdb.&#160; We are going to do the same with your other defaults.&#160; One more thing to note, the annotation expression, "&lt;annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"&gt;" will look to see if there is a class annotation called PoolClass.&#160; If the expression is true, then the contained PoolClass annotation is inserted.&#160; This is an important point, becuase when we put our defaults in, we can't use activationConfig, because it is already being used in the mdb.&#160; If we insert it and we already have one we will have problems.&#160; So we have to come up with another annoation to insert default activationconfig properties, called DefaultActivationSpecs.&#160; This is so that we can have some defaults along with the original activation specs that are in the mdb itself.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This would be the completed IBMMQ Message Driven Bean domain configuration.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">&lt;domain name=<font color="red">"IBMMQ Message Driven Bean"</font> extends=<font color="red">"Message Driven Bean"</font> inheritBindings=<font color="red">"true"</font>&gt;
&#160;&#160;&#160;&#160;&#160; &lt;annotation expr=<font color="red">"!class(@org.jboss.ejb3.annotation.DefaultActivationSpecs)"</font>&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @org.jboss.ejb3.annotation.DefaultActivationSpecs (<font color="navy">{</font>@javax.ejb.ActivationConfigProperty(propertyName = <font color="red">"channel"</font>, propertyValue = <font color="red">"SYSTEM.DEF.SVRCONN"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @javax.ejb.ActivationConfigProperty(propertyName = <font color="red">"hostName"</font>, propertyValue = <font color="red">"devmq1sun"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @javax.ejb.ActivationConfigProperty(propertyName = <font color="red">"queueManager"</font>, propertyValue = <font color="red">"DEVMQ1SUN"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @javax.ejb.ActivationConfigProperty(propertyName = <font color="red">"port"</font>, propertyValue = <font color="red">"1416"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @javax.ejb.ActivationConfigProperty(propertyName = <font color="red">"transportType"</font>, propertyValue = <font color="red">"CLIENT"</font>)<font color="navy">}</font>)
&#160;&#160;&#160;&#160;&#160; &lt;/annotation&gt;
&#160;&#160; &lt;/domain&gt;
</code></pre><p><em>Note:&#160; All annotations must use the full class names.&#160; If you look in the EJB itself, you don't need to put the full classname because of the import.&#160; When you are injecting annotations into a class there is no import, so you must use the full classname in the ejb3-interceptors-aop.xml file. </em></p><p><br/>and your completed mdb annotations would look something like this using the new domain configuration..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">@MessageDriven( name=<font color="red">"MyMDBName"</font>,
&#160;&#160;&#160;&#160;&#160;&#160;&#160; activationConfig = 
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font> 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName=<font color="red">"messagingType"</font>,propertyValue=<font color="red">"javax.jms.MessageListener"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"destinationType"</font>,propertyValue = <font color="red">"javax.jms.Queue"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"destination"</font>, propertyValue = <font color="red">"queueA"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = <font color="red">"useJNDI"</font>, propertyValue = <font color="red">"true"</font>),
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>) 
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@ResourceAdapter(value = <font color="red">"wmq.jmsra2.rar"</font>)
@AspectDomain(<font color="red">"IBMMQ Message Driven Bean"</font>)
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>References</p><p>[1]<a class="jive-link-external-small" href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/uj40080_.htm"> IBM outbound adapter properties</a></p><p>[2] <a class="jive-link-external-small" href="http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html?ca=drs">IBM EJB 2.x instructions</a></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-12944">going to Community</a></p>

        <p style="margin: 0;">Create a new document in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>