> > > Can somebody just send me a fragment
> > > of code, which gets connections from
> > > Turbine pool?

Yep...

<Snip of my code>
import org.apache.turbine.services.db.PoolBrokerService;
import org.apache.turbine.util.db.pool.DBConnection;
import org.apache.turbine.services.resources.TurbineResourceService ;

static PoolBrokerService pool = PoolBrokerService.getInstance(); // Turbine
pool of connections
private Connection Conn = null ;  // Connection
private DBConnection db = null;         // Pooled connection

try {
TurbineResourceService.setPropertiesFileName("C:/jakarta-tomcat-3.2.1/webapp
s/tl/pool/TurbineResources.properties") ;
} catch (IOException ioexp) {
        DebugPrint("IO error:" + ioexp.getMessage() ) ;
}

db = pool.getConnection();
Conn = db.getConnection();

</Snip of my code>

This is what you want.

Remember to have turbine-pool.jar in you servlet lib folder.

You can see that I'm using the TurbineRessouces.properties to set the
pooling conf, you could do it using the standard java Property class.

HTH.

- Tony


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to