[jboss-user] [JNDI/Naming/Network] - Re: Need to configure JNDI

waynebaylor do-not-reply at jboss.com
Wed Oct 31 09:45:42 EDT 2007


i just copied cluster-service.xml to my deploy dir, you can get in the server/all/deploy dir. if you look about halfway down it you'll see the HA-JNDI specific stuff.

once that was deployed, i restarted jboss with something like
C:\> run.bat -b 0.0.0.0 -g myGroupName the -b tells jboss which ip to bind to (0.0.0.0 means 'i don't know just figure it out'). the -g tells jboss which cluster group to join, the default group is DefaultPartition ( you can replace myGroupName with whatever you want).

you can use an application client to test this. just use the following to get a Context and then perfom a lookup.
Properties p = new Properties();  
  | p.put(Context.INITIAL_CONTEXT_FACTORY,   
  |       "org.jnp.interfaces.NamingContextFactory");  
  | p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");  
  | p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port.  
  | return new InitialContext(p); 

you can also pass a list of URLsp.put(Context.PROVIDER_URL, "server1:1100,server2:1100,server3:1100,server4:1100");

instead of specifying the servers in the group, you can just specify the groupp.put("jnp.partitionName", "myGroupName");

hope this helps

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

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



More information about the jboss-user mailing list