users@glassfish.java.net

Glassfish JMS Clustering Questions

From: <glassfish_at_javadesktop.org>
Date: Fri, 15 Feb 2008 07:55:20 PST

I created a glassfish cluster (two systems, one instance each) but I need to deploy an WAR application that connects to a JMS topic and when it publishes, all subscribers across the cluster get the message. I'd like to keep this as simple as possible, so I was hoping to deploy a cluster wide JMS resource (i.e. completely internal to glassfish), but things have gone funny.


1) Are there any instructions on creating a cluster wide JMS topic that is local to Glassfish (i.e. I don't want to have to start any external JMS services).

But just to get things going, I ended up creating an external JMS service with "imqbrokerd -cluster machine1,machine2" and that seems to have started up and connected fine but:

2) "asadmin start-domain" seems to start it's own instance of JMS which conflicts with the external JMS process. Does this mean I cannot run a DAS without having internal JMS startup as well? (it would be nice to have the ability to start a DAS on an instance that already has JMS running)

3) The WAR in the cluster is having problems connecting to the external JMS queue. It gives the following message:

[#|2008-02-14T16:58:21.220-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=21;_ThreadName=httpSS
LWorkerThread-38080-1;|
[Flex]JMS consumer for JMS destination 'testTopic' is being removed from the JMS adapter due to the following error: [ADD_CONSUMER_REPLY(15)] [C4036]: A broker error occurred. :[412] [B4135]: Cannot add durable consumer null. No ClientID was set on connection. user=guest, broker=localhost:37676(41295)|#]

This seems like something is not right with the consumer trying to subscribe to the topic. The topic is not setup as durable (or at least I don't think it is) so I don't know why it is complaining. I added the following property to the JMS topic connection factory "ClientID=aaa" just to see if I can get past this but:

[#|2008-02-14T18:27:05.156-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=29;_ThreadName=Messag
eReceiveThread-0;|
[Flex]JMS consumer for JMS destination 'testTopic' is being removed from the JMS adapter due to the following error: Client is unsubscribed because its corresponding JMS consumer for JMS destination 'testTopic' encountered an error during message delivery: [C4063]: Cannot perform operation, consumer is closed. |#]

which is an even less helpful message. Everything works fine when I use a non-clustered instance with a non-clustered JMS queue so I think something is missing in the cluster config.

Any help is very much appreciated.


Kevin.
[Message sent by forum member 'h1d3m3' (h1d3m3)]

http://forums.java.net/jive/thread.jspa?messageID=259195