Hi I need to access the connection pool in JBoss from a standalone program, im getting the context through JNDI like this:
Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
env.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
Context ctx = new InitialContext(env);
DataSource ds = (DataSource) ctx.lookup("java:SybaseDS");
Connection conn = ds.getConnection();
i'm getting the error that SybaseDS is not bound, however, at Jboss startup "java:SybaseDS" is well registered.
Someone told me that I need to configure Jboss to let standalone programs access the connection pool from outside the server, could you please tell me how can i do that, I'd really apreciate your help.
Already answered here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=100940 :-)