This works for me - even when the datasource doesn't exist.
I can't tell what is different to what you are doing.

ejb-jar.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd";>
  | 
  | 
  | 
  | <ejb-jar >
  | 
  |    <enterprise-beans>
  | 
  |       <message-driven >
  | 
  |          <ejb-name>test/mdb</ejb-name>
  | 
  |          <ejb-class>test.mdb.TestMDBBean</ejb-class>
  | 
  |          <transaction-type>Container</transaction-type>
  | 
  |          <message-driven-destination>
  | 
  |             <destination-type>javax.jms.Queue</destination-type>
  | 
  |             <subscription-durability>NonDurable</subscription-durability>
  | 
  |          </message-driven-destination>
  |          <resource-ref>
  |             <res-ref-name>standalone/test</res-ref-name>
  |             <res-type>javax.sql.DataSource</res-type>
  |             <res-auth>Container</res-auth>
  |             <res-sharing-scope>Shareable</res-sharing-scope>
  |          </resource-ref>
  | 
  |       </message-driven>
  | 
  |       <message-driven >
  | 
  |          <ejb-name>test/dlq</ejb-name>
  | 
  |          <ejb-class>test.mdb.TestMDBBean</ejb-class>
  | 
  |          <transaction-type>Container</transaction-type>
  | 
  |          <message-driven-destination>
  | 
  |             <destination-type>javax.jms.Queue</destination-type>
  | 
  |             <subscription-durability>NonDurable</subscription-durability>
  | 
  |          </message-driven-destination>
  | 
  |       </message-driven>
  | 
  |    </enterprise-beans>
  | 
  |    <assembly-descriptor >
  | 
  |      <container-transaction>
  | 
  |        <method>
  | 
  |          <ejb-name>test/mdb</ejb-name>
  | 
  |          <method-name>*</method-name>
  | 
  |        </method>
  | 
  |        <trans-attribute>Required</trans-attribute>
  | 
  |      </container-transaction>
  | 
  |      <container-transaction>
  | 
  |        <method>
  | 
  |          <ejb-name>test/dlq</ejb-name>
  | 
  |          <method-name>*</method-name>
  | 
  |        </method>
  | 
  |        <trans-attribute>Required</trans-attribute>
  | 
  |      </container-transaction>
  | 
  |    </assembly-descriptor>
  | 
  | 
  | 
  | </ejb-jar>
  | 
  | 
jboss.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" 
"http://www.jboss.org/j2ee/dtd/jboss.dtd";>
  | 
  | 
  | 
  | <jboss>
  | 
  |    <invoker-proxy-bindings>
  |       <invoker-proxy-binding>
  |          <name>my-message-driven-bean</name>
  |          <invoker-mbean>default</invoker-mbean>
  |          
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
  |          <proxy-factory-config>
  |             <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
  |             <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
  |             <MaximumSize>15</MaximumSize>
  |             <MaxMessages>1</MaxMessages>
  |             <MDBConfig>
  |                <ReconnectIntervalSec>10</ReconnectIntervalSec>
  |                <DLQConfig>
  |                   <DestinationQueue>queue/DLQ</DestinationQueue>
  |                   <MaxTimesRedelivered>5</MaxTimesRedelivered>
  |                   <TimeToLive>0</TimeToLive>
  |                   <DLQUser>guest</DLQUser>
  |                   <DLQPassword>guest</DLQPassword> 
  |                </DLQConfig>
  |             </MDBConfig>
  |          </proxy-factory-config>
  |       </invoker-proxy-binding>
  |       <invoker-proxy-binding>
  |          <name>dlq-message-driven-bean</name>
  |          <invoker-mbean>default</invoker-mbean>
  |          
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
  |          <proxy-factory-config>
  |             <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
  |             <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
  |             <MaximumSize>15</MaximumSize>
  |             <MaxMessages>1</MaxMessages>
  |             <MDBConfig>
  |                <ReconnectIntervalSec>10</ReconnectIntervalSec>
  |                <DLQConfig>
  |                   <DestinationQueue>queue/A</DestinationQueue>
  |                   <MaxTimesRedelivered>10</MaxTimesRedelivered>
  |                   <TimeToLive>0</TimeToLive>
  |                   <DLQUser>guest</DLQUser>
  |                   <DLQPassword>guest</DLQPassword> 
  |                </DLQConfig>
  |             </MDBConfig>
  |          </proxy-factory-config>
  |       </invoker-proxy-binding>
  |    </invoker-proxy-bindings>
  | 
  | 
  |    <enterprise-beans>
  | 
  | 
  | 
  |       <message-driven>
  | 
  |          <ejb-name>test/mdb</ejb-name>
  | 
  |          <local-jndi-name>somethingelse</local-jndi-name>
  |          <destination-jndi-name>queue/testQueue</destination-jndi-name>
  | 
  |          <invoker-bindings>
  |             <invoker>
  |                
<invoker-proxy-binding-name>my-message-driven-bean</invoker-proxy-binding-name>
  |             </invoker>
  |          </invoker-bindings>
  |          <resource-ref>
  |             <res-ref-name>standalone/test</res-ref-name>
  |             <jndi-name>java:/doesnotexist</jndi-name>
  |          </resource-ref>
  |       </message-driven>
  | 
  |       <message-driven>
  | 
  |          <ejb-name>test/dlq</ejb-name>
  | 
  |          <destination-jndi-name>queue/DLQ</destination-jndi-name>
  | 
  |          <invoker-bindings>
  |             <invoker>
  |                
<invoker-proxy-binding-name>dlq-message-driven-bean</invoker-proxy-binding-name>
  |             </invoker>
  |          </invoker-bindings>
  |       </message-driven>
  | 
  | 
  | 
  |    </enterprise-beans>
  | 
  | 
  | 
  | </jboss>
  | 
  | 

Regards,
Adrian

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829300#3829300

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829300


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to