Following method creates context.
using the context i will call Context.rebind() / Context.bind() method.




 public static Context getInitialContextJBoss() throws Exception {


          String url = "jnp://localhost:1099";

           String user = null;
           String password = null;
           Properties properties = null;
           try {
             properties = new Properties();
             properties.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");



             properties.put(Context.PROVIDER_URL, url);
             if (user != null) {
               properties.put(Context.SECURITY_PRINCIPAL, user);
               properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : 
password);
             }

             return new InitialContext(properties);
           }
           catch(Exception e) {
              throw e;
           }



     }

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

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


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to