[jboss-user] [Messaging, JMS & JBossMQ] - Re: Message Driven Beans reading messages before Application

hannwei do-not-reply at jboss.com
Mon Oct 16 22:12:54 EDT 2006


"genman" wrote : 
  | You can add  to your MDB so they don't start too soon. Check out the DTD.

Thanks.  Found the DeliveryActive tag in jboss_4_0.dtd.

I added it with the value "false" to server/default/conf/standardjboss.xml:


  |     <invoker-proxy-binding>
  |       <name>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>
  |         <CreateJBossMQDestination>true</CreateJBossMQDestination>
  |         <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
  |         <MinimumSize>1</MinimumSize>
  |         <MaximumSize>15</MaximumSize>
  |         <KeepAliveMillis>30000</KeepAliveMillis>
  |         <MaxMessages>1</MaxMessages>
  |         <MDBConfig>
  |           <ReconnectIntervalSec>10</ReconnectIntervalSec>
  |           <DeliveryActive>false</DeliveryActive>
  |           <DLQConfig>
  |             <DestinationQueue>queue/DLQ</DestinationQueue>
  |             <MaxTimesRedelivered>10</MaxTimesRedelivered>
  |             <TimeToLive>0</TimeToLive>
  |           </DLQConfig>
  |         </MDBConfig>
  |       </proxy-factory-config>
  |     </invoker-proxy-binding>
  | 


  |     <invoker-proxy-binding>
  |       <name>singleton-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>
  |         <CreateJBossMQDestination>true</CreateJBossMQDestination>
  |         <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
  |         <MinimumSize>1</MinimumSize>
  |         <MaximumSize>1</MaximumSize>
  |         <KeepAliveMillis>30000</KeepAliveMillis>
  |         <MaxMessages>1</MaxMessages>
  |         <MDBConfig>
  |           <ReconnectIntervalSec>10</ReconnectIntervalSec>
  |           <DeliveryActive>false</DeliveryActive>
  |           <DLQConfig>
  |             <DestinationQueue>queue/DLQ</DestinationQueue>
  |             <MaxTimesRedelivered>10</MaxTimesRedelivered>
  |             <TimeToLive>0</TimeToLive>
  |           </DLQConfig>
  |         </MDBConfig>
  |       </proxy-factory-config>
  |     </invoker-proxy-binding>
  | 

However, after a restart of JBoss, when I looked at the JMX console through a browser, the StateString of MDBs is still "Started".  The State value shown by the console is 3.  I thought the "Started" value should appear only after I have pressed the Start() button on the browser.

They are ejb3 MDBs.  Did I configure the DeliveryActive value at the right place?


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

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



More information about the jboss-user mailing list