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?
开发者_StackOverflowI'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
http://commons.apache.org/dbcp/guide/jndi-howto.html shows you how
Use a standalone connection pool library such as Apache Commons DBCP or C3P0.
精彩评论