db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helge Weissig <hel...@grajagan.org>
Subject oracle connection pool issue
Date Wed, 16 Apr 2008 23:30:48 GMT
Hi all,

	the following configuration and pseudo code cause my web application  
to hang if the value of numObjects is larger than the value of  
torque.dsfactory.oracle.pool.maxActive

Torque.properties:

torque.database.oracle.adapter=oracle
torque 
.dsfactory 
.oracle.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque 
.dsfactory.oracle.connection.driver=oracle.jdbc.driver.OracleDriver
torque.dsfactory.oracle.pool.maxActive=40

java pseudo code:

for (int n = 0; n < numObjects; n++) {
	TestTable o = new TestTable();
	o.setRowValue(n);
	o.save();
}

I have (without success) tried several other ways, including the re- 
use of one single connection:

Connection con = Torque.getConnection("oracle");
for (int n = 0; n < numObjects; n++) {
	TestTable o = new TestTable();
	o.setRowValue(n);
	TestTablePeer.doInsert(o, con);
}
con.close();

Any idea what would allow me to not have to use some ridiculously high  
value for the number of maximum active connections in the connection  
pool?

I am using Torque 3.3 and Oracle 8i (OK, yes, that may be a problem,  
but I would still love to hear the *reason*). The table in question  
uses a native ID method via a simple sequence.

thanks so much!
h.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message