db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: oracle connection pool issue
Date Thu, 17 Apr 2008 07:49:11 GMT
>From your description, I do not know where the problem is. You might want
to try the following:
- Check that you are using a current dbcp version (1.2.2)
- Try to debug into the save() code and check where Torque opens a new
connection. The Data source used in SharedPoolDataSourceFactory,
org.apache.commons.dbcp.datasources.SharedPoolDataSource, has a method
getNumActive(), so it should store the number of active connections
somewhere (You need a debugger for this, Torque does not expose the Data
Source). Also check that getNumActive() decreases after the connection is
closed. With this information. I might be able to help you further.

    Thomas

Helge Weissig <helgew@grajagan.org> schrieb am 17.04.2008 01:30:48:

> 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
>


---------------------------------------------------------------------
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