Try this code it is not giving any err.

//to work this prog fine set classpath to "jbossall-client.jar;."
import javax.naming.*;
import java.util.*;
   public class HelloWorld
  {
         public static void main(String[] args) throws Exception
         {  

        Hashtable properties = new Hashtable(); 

                //Jboss server properties.


                
properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                
properties.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
                properties.put("java.naming.provider.url", 
"jnp://localhost:1099");

                //Get the InitialContext.

                Context ic = new InitialContext(properties);

                System.out.println(ic);

                ic.bind("AP","AP");     
                ic.bind("AP.Hyd","Hyd");        

                System.out.println(ic.lookup("AP"));
                System.out.println(ic.lookup("AP.Hyd"));
                

                 }

  }



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

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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to