users@glassfish.java.net

Re: How to attach a MDB to a queue on an other server

From: Ramesh Parthasarathy <Ramesh.Parthasarathy_at_Sun.COM>
Date: Tue, 08 Jan 2008 12:43:28 +0000

Hi,
If i understand correctly, you have the MDB deployed in ServerB and try
to listen to QueueA in serverA.
Could you please set the connector and resource-adapter log levels to
FINEST and send us the server.log (generated during deployment of the
MDB). Are there any exceptions in the server.log
Also, could you check if the MDB is listening to QueueA on ServerB
rather than ServerA. you can use
gfhome/imq/bin/imqcmd query dst -t q -n QueueA -b <ip:port>
(user and pwd should be admin/admin by default).

Thanks

glassfish_at_javadesktop.org wrote:
> Hi all!
>
> I'd like to configure an MDB to be attached to a queue which is on another server, both servers are GF b58g. How can I do that?
>
> I tried as shown in the j2ee tutorial, but there's a bug related to it:
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=3462
>
> What I did is this:
> - I created QueueA ( jndiname: jms/QueueA ) on ServerA.
> - I created RemoteQueue ( jndiname: jms/RemoteQueue ) on ServerB: Admin Console > Resources > Connectors > Admin Object Resources. I've set it's "Name" property to the physical name of QueueA (QueueA).
> - I created a new ConnectionFactory (jndiname: jms/RemoteConnectionFactory). Deleted all it's properties, then added "AddressList" with value: "mq://192.168.1.25:1273/jms" where 192.168.1.25 is ServerA's IP address, and 1273 is the JMS port (default is 7676).
>
> - My MDB looks like this:
>
> @MessageDriven( mappedName = "jms/RemoteQueue" )
> public class RecieverMDB implements MessageListener { ... }
>
> - The MDB's deployment descriptor:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
> <sun-ejb-jar>
> <enterprise-beans>
> <ejb>
> <ejb-name>RecieverMDB</ejb-name>
> <mdb-connection-factory>
> <jndi-name>jms/RemoteConnectionFactory</jndi-name>
> </mdb-connection-factory>
> </ejb>
> </enterprise-beans>
> </sun-ejb-jar>
>
> A workaround to the mentioned bug above is claimed to be setting JMS host from default value EMBEDDED to LOCAL. I tried setting it on only ServerA, ServerB and on both servers, still won't work. (my MDB does not recieve any messages). Howewer if I put a new message into QueueA with a standalone client using a connectionfactory on ServerA and I set up a consumer on RemoteQueue on ServerB it works.
>
> So, what am I supposed to do?
>
> thanks
> z
> [Message sent by forum member 'zoltan_kiss' (zoltan_kiss)]
>
> http://forums.java.net/jive/thread.jspa?messageID=252683
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>