-
1. Re: JMS Example?
hibsmax Jul 24, 2007 4:34 PM (in response to hibsmax)I should have said that the servlet is running on one JBoss cluster, the destinations are hosted on another, separate cluster. The two JBoss clusters are completely separate.
-
2. Re: JMS Example?
timfox Jul 25, 2007 2:27 AM (in response to hibsmax)In the examples there's an example of sending a message from a web service (a servlet).
You just need to deploy a JMSProviderLoader pointing to your remote provider (there should be some wiki pages about this), then make sure you lookup the connection factory corresponding to this provide.
Should be pretty straightforward - this is a very common use case. -
3. Re: JMS Example?
hibsmax Jul 25, 2007 9:12 AM (in response to hibsmax)Thanks, Tim.
I agree it's straightforward and common but I don't seem to be able to get it to work for some reason. When I have my servlets, destinations and MDB deployed in the same cluster and use:
InitialContext ctx = new InitialContext();
I can access my destinations just fine.
(note: all the examples in the JBoss Messaging 1.3 doc use the same method of creating an InitialContext as shown above, none specify a URL belonging to a remote machine).
When I move the servlet to cluster1 and the destinations / MDB to cluster2, it stops working. I tried creating the InitialContext with a PROVIDER_URL that pointed Cluster2 i.e.
Properties h = new Properties();
h.put( Context.PROVIDER_URL, "jnp://cluster2:1099" );
InitialContext ctx = new InitialContext(h);
but this didn't work.
The application works if everything is deployed to a single JBoss server or to a single JBoss cluster but I can't get cluster to cluster working. That's the example I am looking for.
Peace, Anders -