I asked the question about getting jdbc connection from flowscript on user mailing list
some time ago, but there was no answer. I started digging, but had some
problems.
I'm having code like this:
//////////////////////
var dbSelector = cocoon.getComponent(Packages.org.apache.avalon.excalibur.datasource.DataSourceComponent.ROLE + "Selector");
try {
var dataSrc = dbSelector.select(srcName);
conn = dataSrc.getConnection();
}
catch (e) {
e.printStackTrace();
}
finally {
if (conn != null) {
conn.close();
conn = null;
}
if (dbSelector != null) {
cocoon.releaseComponent(dbSelector);
dbSelector = null;
}
}
///////////////


Using it I'm experiencing pooled connection out of resources
after several calls (page using it just hungs).
I'm afraid I'm not realeasing all resources properly. What's wrong?

Reply via email to