users@glassfish.java.net

Re: How to configure JMS on multiple domains?

From: <forums_at_java.net>
Date: Thu, 1 Dec 2011 15:10:16 -0600 (CST)

Hi,

I'm not sure what you mean when you state you "kept JMS Server configuration
in both domains intact."  Do you mean you just didn't change any of the
default config/setup after creating the domains?  Do you have the JMS type
set to "EMBEDDED", "LOCAL" or "REMOTE" in your server-config?

I've reset both my domains to use an EMBEDDED broker.  Maybe that's wrong? 
If so, what should they be?

In my *domain1 *which has a war deployed that produces messages for Queue1, I
have this set up:

<jms-service default-jms-host="default_JMS_host" type="EMBEDDED"> <jms-host
port="7676" host="localhost" name="default_JMS_host"/> </jms-service>
<connector-connection-pool name="jms/QueueConnectionFactory"
resource-adapter-name="jmsra" is-connection-validation-required="true"
connection-definition-name="javax.jms.QueueConnectionFactory">
</connector-connection-pool> <admin-object-resource res-adapter="jmsra"
res-type="javax.jms.Topic" description="" jndi-name="jms/Queue1"> <property
description="null" name="Name" value="Queue1"/> </admin-object-resource>
and in my *domain2 *which has an ear deployed that consumes messages from
Queue1, I have this set up:

<jms-service default-jms-host="default_JMS_host" type="EMBEDDED"> <jms-host
port="5076" host="localhost" name="default_JMS_host"/> </jms-service>
<connector-connection-pool name="jms/QueueConnectionFactory"
resource-adapter-name="jmsra" is-connection-validation-required="true"
connection-definition-name="javax.jms.QueueConnectionFactory"> <property
name="AddressList" value="localhost:7676"/> </connector-connection-pool>
<admin-object-resource res-adapter="jmsra" res-type="javax.jms.Topic"
description="" jndi-name="jms/ProcessBatchQueue"> <property
description="null" name="Name" value="ProcessBatchQueue"/>
</admin-object-resource>
The only differences between the two configs is that domain1 uses port 7676
for JMS and domain2 uses 5076 and domain2 has an "AddressList" property set
for the QueueConnectionFactory.

There are messages being put on Queue1 from the war in domain1 as can be
verified by running *imqcmd list dst -b localhost:7676* on the CLI. 
However, these are not being consumed, and indeed have no consumers
registered:

Listing all the destinations on the broker specified by:
------------------------- Host Primary Port -------------------------
localhost 7676
---------------------------------------------------------------------------------------------------
Name Type State Producers Consumers Msgs Total Wildcard Total Wildcard Count
Remote UnAck Avg Size
---------------------------------------------------------------------------------------------------
Queue1 Queue RUNNING 0 - 0 - 4 0 0 148.0 Successfully listed destinations.
When I run the list command for port 5076, I get this:

Listing all the destinations on the broker specified by:
------------------------- Host Primary Port -------------------------
localhost 5076
---------------------------------------------------------------------------------------------------------
Name Type State Producers Consumers Msgs Total Wildcard Total Wildcard Count
Remote UnAck Avg Size
---------------------------------------------------------------------------------------------------------
Queue1 Queue RUNNING 0 0 1 0 0 0 0 0.0 Successfully listed destinations.
This one does have a consumer registered.  This must be the consumer that
should be consuming messages from the broker on port 7676.  So, it appears
the AddressList property has no effect.

Can you see anything wrong/different with my setup?

(Note that domain2 was created with the --portbase option; I used 5000)


--
[Message sent by forum member 'sdoca']
View Post: http://forums.java.net/node/869999