[Logo] Mentawai Recipes
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Moderation Log] Moderation Log   [Register] Register / 
[Login] Login 
Setting up a connection pool  XML
Forum Index » Official Recipes
Author Message
saoj



Joined: 10/01/2008 08:20:15
Messages: 39
Offline

Mentawai comes out-of-the-box with support for C3P0 and DBCP connection pools. All you need is two lines:

In the ApplicationManager.java:


Then inside your actions you just do:

You don't even have to worry about returning the connection to the pool. The ConnectionFilter will make sure that happen for you.

You can also create a C3P0ConnectionHandler the same way to use the C3P0 connection pool instead. Just make sure the pool and the JDBC jars are in your WEB-INF/lib directory.
 
Forum Index » Official Recipes
Go to:   
Powered by JForum 2.1.8 © JForum Team