3 Replies Latest reply: Oct 2, 2007 5:35 PM by shimi RSS

Standalone JNDI server using jnpserver.jar

Marc Farrow Newbie

I have successfully configured a JNP server using and was able to add objects to the context. In one example, I added a Commons DBCP connection pool class into the context. I was able to take the same JVM and retrieve this reference and use it successfully. However, when I access the DataSource object using another JVM instance, the connection pool returns null on the ds.getConnection() method. The code successfully gives me a reference to the DataSource object (that is not null), but for some reason the "pool" reference in the DataSource object is null. Below is the client code used to retrieve the object. Please let me know if you need more information. All other "basic" type objects such as String and Integer are successfully read. I am only having the problem with the DataSource object.

Thank you for taking time to read my post.


 Hashtable<String,String> env = new Hashtable<String,String>();
 context = null;
 try {
 context = new InitialContext(env);
 } catch (NamingException ex) {

 DataSource ds = (DataSource) context.lookup("myenvironmentname");
 Connection conn = ds.getConnection();