Connection code: 1. To get the InitialContext:
| protected InitialContext getContext() throws NamingException { | Hashtable env = new Hashtable(); | | //commented out because found unnecessary | //env.put(Context.SECURITY_PRINCIPAL, "guest"); | //env.put(Context.SECURITY_CREDENTIALS, "guest"); | | env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | env.put(Context.PROVIDER_URL, "jnp://bullseye"); | //env.put(Context.PROVIDER_URL, "jnp://bullseye:1099"); | env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); | | return new InitialContext(env); | } | 2. Getting the connection | /* Get the JNDI reference to the connection factory. */ | factory = (ConnectionFactory) ctx.lookup("ConnectionFactory"); | | /* Get the JNDI reference to the destination. */ | Destination destination = (Destination) ctx.lookup(jndiDestinationName); | | /* Create the connection from the connection factory. */ | connection = factory.createConnection("guest", "guest"); | Also may be worth noting that I am running the all / EJB3clustered configuration. Thanks for the help. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944379#3944379 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944379 ------------------------------------------------------- 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