RE: oracle connection pool issue

Thomas Fischer <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <OF15906FB8.B56B2523-ONC125742E.002A4F4A-C125742E.002AF49F@seitenbau.net>
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 <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.