views:

32

answers:

2

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

+1  A: 

Use a standalone connection pool library such as Apache Commons DBCP or C3P0.

skaffman
+2  A: 

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

JoseK