I am trying to enable connection pooling for our application. I am working in the JDev
Ide (10g Release 2 10.1.2).
What I am seeing is that the maximum pool size of 5 is reached within no time, after only a few links are clicked, and I end up with timeout errors thrown by the pool. The application requests and releases connections like this:
DAOManager dao = DAOManagerImpl.getInstance();
Connection conn = dao.getConnection();
---------------------------------------------------------------------------------------------------------------------
Within DAOManagerImpl:
public Connection getConnection() throws SQLException, NamingException
{
Connection connection = null;
try
{
DataSource dataSource = ServiceLocator.getInstance().getDataSource("jdbc/XADS_ejb");
connection = dataSource.getConnection();
}
catch(Exception ex)
{
//Do something.
}
return connection;
}
---------------------------------------------------------------------------------------------------------------------
Here's the data-sources.xml:
<?xml version="1.0" standalone='yes'?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources-9_04.dtd">
<data-sources>
<data-source name="poolDS" class="com.evermind.sql.DriverManagerDataSource"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="RPD"
password="RPD"
url="jdbc
racle:thin:@10.118.6.40:1521:hfs"
ejb-location="jdbc/poolds_ejb"
pooled-location="jdbc/poolds_pooled"
source-location="jdbc/poolds_ejb"
wait-timeout="10"
inactivity-timeout="10"
min-connections="10"
max-connect-attempts="3"
connection-retry-interval="1"
xa-location="jdbc/poolds_xa"
location="jdbc/poolds_location" />
</data-sources>
...
</xml>
SO what is happening? Why are connections not being released to the pool after the work is over? I tried with 25 as the max-connections value but that quickly got filled up, too.
If the pool is set up properly, I should never get a timeout error in my case where I am the only user issuing database requests. So what am I doing wrong? Any insight / info is most welcome and appreciated. TIA.