-
1. Re: publishing messages and clusters
adrian.brock Apr 14, 2003 12:54 PM (in response to julien)You have to lookup the connection factory
in the jndi tree of the jboss instance
you want to receive the messages.
One solution would be to only deploy jbossmq
on one machine and use HAJNDI on port 1100
Regards,
Adrian -
2. Re: publishing messages and clusters
julien Apr 17, 2003 6:45 AM (in response to julien)thanks,
in fact I was looking in JBoss configuration files if I couldn't set somewhere the JMS publisher's destination provider, with your advice, I managed to do it directly into the code:
java.util.Properties p = new java.util.Properties();
p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
p.put("java.naming.provider.url", "hostname:1100");
p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
Logger.dev("JMSCache","getInitialContext","Properties ready");
//Now use those properties to create
//a JNDI InitialContext with the server.
ctx = new InitialContext( p );