Mantis - Resin
Viewing Issue Advanced Details
83 minor always 04-05-05 00:00 04-07-05 00:00
ferg  
 
urgent  
closed 3.0.13  
3.0.13 fixed  
none    
none 3.0.12  
0000083: make dbpool suitable for standalone
RSN-74
(rep by Robert Whittle)

I'd like to be able to use/start up resin's database connection pool from within my IDE, so that I can debug clases using the same database connection syntax that I using when running web-apps? This would be very useful for debugging.

Is there a simple way I can include the correct jar files and start up the connection pool manually ?

The syntax I'm using to obtain a connection is:

            Context env = (Context) new InitialContext().lookup("java:comp/env");
            DataSource source = (DataSource) env.lookup("jdbc/test");
            con = source.getConnection();

Notes
(0000089)
ferg   
04-05-05 00:00   
This is already available:

import com.caucho.sql.DBPool;


dbPool = new DBPool();
dbPool.setJndiName("java:comp/env/jdbc/test");
dbPool.setJDBCDriver(new org.postgresql.Driver());
dbPool.setURL("jdbc:postgresql://localhost/test"); [^]
dbPool.init();