users@glassfish.java.net

How can all of the same subscribers in different instance get the meesages?

From: weiqiang tang <shockwave_115_at_hotmail.com>
Date: Thu, 31 Dec 2009 09:18:57 +0000

Hi


I am using MDB to recieve messages from publisher, used for event and notification, I deploy same MDB into different instance, if there is a event, the publisher will publish a message, and all subscribers in different instance are supposed to get the message, but reffer to the message flow, only one of these MDB will recieve the messages.
One solution is to have different clientID for these MDB in different instances. But unfortunately, the value for clientId should be constant expression.

Here is my code, any suggestion?

@MessageDriven(mappedName = "cluster_publisher_adm", activationConfig =

{
 @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
 @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
 @ActivationConfigProperty(propertyName = "clientId", propertyValue = "test"),
        @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "myTest"),
 @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic") })
public class TopicListener implements MessageListener {

    /**
     *
     */
    public TopicListener() {
 
    }

...

How can I have all the MDB in different instances to get the same messages?

 

BRs

//FD
                                               
_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010