Pool to connect the elevator?

I just fall into the elevator frame, and I'm curious how the default non-jndi path is used in relation to connections. In all the documents and examples that I saw, it is recommended to use a template that directly calls DriverManager.getConnection to get database connections. Coming from several years of java / spring development, this of course gives me The Willies.

My question is, therefore, should I connect something like c3p0 or dbcp in my DBVendor implementation? Or does the DB elevator object make it its own connection pool? I did some reading through the elevator database, and it looks like it might not be connection caching.

+4
source share
1 answer

In appearance, the Lift ProtoDBVendor , which StandardDBVendor extends stores connections in the list. Therefore, if you use this implementation, you get the connection pool provided by the elevator. If this does not suit you, you can provide your implementation of the ConnectionManager attribute and provide the implementation of newConnection and releaseConnection using your preferred connection pool.

+4
source

Source: https://habr.com/ru/post/1337510/


All Articles