This content has been marked as final.
Show 5 replies
-
1. Re: How to send messages to a remote clustered queue (using
ataylor Jul 30, 2008 3:09 PM (in response to theoverlord)You could start by having a look at the clustered examples shipped with JBM. Also the user doc is a good place to start.
-
2. Re: How to send messages to a remote clustered queue (using
theoverlord Jul 30, 2008 5:39 PM (in response to theoverlord)I took a look at the examples but I'm still confused.
I see in the examples/distributed-queue example how it gets the connection factory from the initial context (DistributedQueueExample.java)ic = new InitialContext(); cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
That is not going to work with me since there is no ClusteredConnectionFactory on machine1 from where I'm trying to send the messages from. This example assumes that the sender is residing in the same AS as the queue it self which is not the case for me.
Please help me. -
3. Re: How to send messages to a remote clustered queue (using
ataylor Jul 31, 2008 9:45 AM (in response to theoverlord)
That is not going to work with me since there is no ClusteredConnectionFactory on machine1 from where I'm trying to send the messages from. This example assumes that the sender is residing in the same AS as the queue it self which is not the case for me.
You look up the connection factory via one of the nodes in the cluster. also all nodes should have the same connection factories deployed -
4. Re: How to send messages to a remote clustered queue (using
theoverlord Jul 31, 2008 12:38 PM (in response to theoverlord)So i believe I should have been looking up the ClusteredConnectionFactory using normal JNDI instead of HAJNDI. Something like this I assume:
Hashtable properties = new Hashtable(); properties.put(Context.PROVIDER_URL, "machine2:1099, machine3:1099"); ... ctx = new InitialContext(properties); // Connection factory ctx.lookup("/ClusteredConnectionFactory); // Lookup remote queue ctx.lookup("queue/MyQueue");
Another question I have is would a connection obtained this way be container managed (pooled, etc) or would you have to take care of managing the connection. -
5. Re: How to send messages to a remote clustered queue (using
timfox Aug 1, 2008 3:16 AM (in response to theoverlord)You can use either normal or HA JNDI it's up to you.
I'd recommend a book/tutorial on JNDI.