2 Replies Latest reply on Feb 7, 2007 10:54 AM by Christian Cerezo

    Access onnection Pool from standalone

    Christian Cerezo Newbie

      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.PROVIDER_URL, "jnp://localhost:1099");

      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.