Hi
> Any idea to keep the MDBs ?
Message Selector is an activation spec property [atleast in MQ RA and Generic RA
for JMS in GlassFish] that is specified during MDB deployment and hence cannot
be modified during the lifecycle of the MDB. A redeployment is unfortunately
required to modify the message selector of an MDB.
However, would the following workaround help: Have an intermediate MDB that
would select messages based on the "latest" message selector rules and send it
to a temproary destination and have your MDB that should not be redeployed
listen to the temproary destination. This way your intermediate MDB could be
redeployed whenever your rules change and the HA MDB listening to your temp.
destination throughout such rule changes.
- Let's say app1's FooMDB is the MDB that needs to have your HA needs and should
not be redeployed. Have it deployed to listen from FooTempDestination
- Have another app, app2 with an MDB configured with your initial msg selector,
listening from BarDestination, and publishing the "filtered" message to
FooTempDestination
- Every time there is a change in msg selectors, redeploy app2 with the new msg
selector and the MDB could select messages based on the new rule and publish it
back to FooTempDestination
--Siva.
glassfish_at_javadesktop.org wrote:
> Hello there,
>
> I have a specific need with MDBs for which I can't find a solution :
>
> I'm using swiftmq outside glassfish. After having configured all the stuff, I create a queue into swiftmq and subscribe a bunch of MDBs onto it.
>
> I'm using some message selectors to define who will receive which messages. Each MDB is supposed to receive the messages carrying a property coming from a specific set.
>
> We sometimes need to add some new properties to be taken into account on the fly by the MDB.
>
> My problem : the query that defines the message selector is situated into the deployment descriptor, so it is taken into account at deployment time.
>
> I would need to redefine on the fly the MDB message selector query, as I want to avoid redeployment (I've got some HA needs).
>
> For the moment, I've given up the MDBs, and use a session bean which periodically resubrscribes to the queue.
>
> Any idea to keep the MDBs ?
>
> Thanks in advance !
> [Message sent by forum member 'olivier_g' (olivier_g)]
>
> http://forums.java.net/jive/thread.jspa?messageID=236964
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>