[jboss-user] [Clustering/JBoss] - HA-JNDI and HA-JMS problem

igain do-not-reply at jboss.com
Fri Sep 21 14:42:57 EDT 2007


Hi All,

I have 2 jboss nodes configured in cluster which is for QA environment.

When my application try to lookup the Queue destination on HA-JNDI port which is 1100 i get following exception on one node but at the same time it picks the Queue from other node

2007-09-21 11:17:42,293 DEBUG [org.jnp.interfaces.NamingContext] Failed to connect to null:1100
javax.naming.CommunicationException: Failed to connect to server null:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server null:1100 [Root exception is java.net.UnknownHostException: null]]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)


Is this behaviour is correct or not ?

And lookup code is like this

  | Properties p = new Properties();
  | p.put(Context.INITIAL_CONTEXT_FACTORY,IConstants.INITIAL_CONTEXT_FACTORY);
  | 
  | p.put(Context.URL_PKG_PREFIXES, IConstants.URL_PKG_PREFIXES);
  | 
  | //Host is coming from jboss.bind.address property       
  | String host = System.getProperty(IConstants.SYSTEM_HOST_PROP);
  | 
  | // HA-JNDI url.
  | p.put(Context.PROVIDER_URL, host + ":" + IConstants.PROVIDER_URL_PORT); 
  | 
  | InitialContext ctx = new InitialContext(p);
  | //looking for jms queue destination
  | ctx.lookup(...)
  | 

Another problem is i tried to put localhost instead of host variable, however in that case it was ont wokring on both the nodes so i did change it to jboss bind address to ensure it picks from the node hwre code is getting executed.

Any help would be appreciated.

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087386#4087386

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087386



More information about the jboss-user mailing list