开发者

Creating a connection pool in a java command line application

开发者 https://www.devze.com 2023-01-08 07:39 出处:网络
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?

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?

开发者_StackOverflow

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号