Search code examples
javaappletdatabase-connectionconnection-pooling

Creating a connection pool in a java command line application


Is it possible to create a command line application (without an application server) That uses a connection pool in order to access the database?. And how to do it?

I've tried it using an InitialContext object and look up for the datasource in the context but since i don't have an application server i don't know how to access the resource. any ideas?

Thanks


Solution

  • http://commons.apache.org/dbcp/guide/jndi-howto.html shows you how