-
1. Re: MDB deployed with DeliveryActive set to false?
genman Jun 24, 2004 3:43 PM (in response to eleray)
This might be a somewhat easy feature for somebody like you to contribute.
You can approximate this by using dynamic deployment. You can hold off deploying the .ear until you want messages to be handled. A simple hack would be to rename the file at the right time, or by deplying through JMX.
mymdb.ear# -> mymdb.ear
You can share classloaders using the jboss-app.xml file:
<jboss-app>
<loader-repository>company:loader=parent.ear</loader-repository>
</jboss-app> -
2. Re: MDB deployed with DeliveryActive set to false?
eleray Jun 25, 2004 3:53 AM (in response to eleray)The problem is that I have couple of DMBs plugged. One of them is "listening" on the DLQ, and this is the one I want to get "deactivated" at deploy time. The reason is that I need to get "manual" control on the event generated within the DLQ.
In production, the tweak to rename manually cannot really be used.
if there is no such thing as "at deploy time" actions, I will try to add
some "manual" procedures within the production deployment of the app.
pity though .....
e. -
3. Re: MDB deployed with DeliveryActive set to false?
genman Jun 25, 2004 4:21 PM (in response to eleray)
Using JMX, you can build relationships using . So you can write an MBean which depends on a MDB, or a MDB which depends on another MBean, or MDB on another MDB, etc.
Refer to http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd
So, in your jboss.xml, it would look like this:
<enterprise-beans>
<message-driven>
xxx:service=MyService
</message-driven>
Not sure this helps at all... DMB? -
4. Re: MDB deployed with DeliveryActive set to false?
adrian.brock Jun 28, 2004 9:08 PM (in response to eleray)docs/dtd/jboss_3_2.dtd
MDBConfig/DeliveryActive:
<!--
Whether delivery of messages is active at startup,
valid values are "True" or "False".
Used in: MDBConfig
-->
<!ELEMENT DeliveryActive (#PCDATA)> -
5. Re: MDB deployed with DeliveryActive set to false?
eleray Jun 29, 2004 6:29 AM (in response to eleray)Thanks a lot adrian for this info, it was of great help.
here is for info how I managed to use the MDBconfig and the deliveryActive tag. see the deployment jboss.xml code below
thanks again.
E.<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd"> <jboss> <unauthenticated-principal>nobody</unauthenticated-principal> <invoker-proxy-bindings> <invoker-proxy-binding > <name>myDefaultBinding</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>10</MaximumSize> <MaxMessages>1</MaxMessages> <MDBConfig> <ReconnectIntervalSec>10</ReconnectIntervalSec> <DLQConfig> <DestinationQueue>queue/PublicationQueue</DestinationQueue> <MaxTimesRedelivered>10</MaxTimesRedelivered> <TimeToLive>0</TimeToLive> <DLQUser>test</DLQUser> <DLQPassword>test</DLQPassword> </DLQConfig> <DeliveryActive>true</DeliveryActive> </MDBConfig> </proxy-factory-config> </invoker-proxy-binding> <invoker-proxy-binding > <name>myDLQBinding</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>10</MaximumSize> <MaxMessages>1</MaxMessages> <MDBConfig> <ReconnectIntervalSec>10</ReconnectIntervalSec> <DLQConfig> <DestinationQueue>queue/DLQ</DestinationQueue> <MaxTimesRedelivered>10</MaxTimesRedelivered> <TimeToLive>0</TimeToLive> <DLQUser>test</DLQUser> <DLQPassword>test</DLQPassword> </DLQConfig> <DeliveryActive>false</DeliveryActive> </MDBConfig> </proxy-factory-config> </invoker-proxy-binding> </invoker-proxy-bindings> <enterprise-beans> <message-driven> <ejb-name>ServicePublicationBean</ejb-name> <configuration-name>My Message Driven Config</configuration-name> <destination-jndi-name>queue/PublicationQueue</destination-jndi-name> <mdb-user>test</mdb-user> <mdb-passwd>test</mdb-passwd> <mdb-subscription-id>ServicePublication</mdb-subscription-id> <invoker-bindings> <invoker> <invoker-proxy-binding-name>myDefaultBinding</invoker-proxy-binding-name> </invoker> </invoker-bindings> </message-driven> <message-driven> <ejb-name>ServicePublicationDLQBean</ejb-name> <configuration-name>My Message Driven Config</configuration-name> <destination-jndi-name>queue/DLQ</destination-jndi-name> <mdb-user>test</mdb-user> <mdb-passwd>test</mdb-passwd> <mdb-subscription-id>ServicePublication</mdb-subscription-id> <invoker-bindings> <invoker> <invoker-proxy-binding-name>myDLQBinding</invoker-proxy-binding-name> </invoker> </invoker-bindings> </message-driven> </enterprise-beans>