RE: [v.1.1.3 September 28 2005] Global exception.

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Mon Nov 28 2005 - 13:33:39 EST

  • Next message: Ingo Feulner: "Re: Dates inserted into Oracle do not have Minutes / Seconds?"

    The only thing I can think of offhand is you might have the
    "Container-Managed Transactions" flag turned on in the Modeler. It's
    under the DataDomain configuration section. I'm probably way off,
    though. Burning through 20 connections is quite unusual ...
     
    /dev/mrg

            -----Original Message-----
            From: Claudio Rosati [mailto:claudio.rosat..csys.it]
            Sent: Monday, November 28, 2005 11:48 AM
            To: cayenne-use..bjectstyle.org
            Subject: [v.1.1.3 September 28 2005] Global exception.
            
            
            Hello all,
             
            I'm using Cayenne 1.1.3 with PostgreSQL 8.1 on Windows XP &
    Linux.
            The following code, called in a context where the DataContext
    __datactx is already set up and possibly some commit were already
    called, seems consume a JDBC connection when
    __datactx.performQuery(query); is called without releasing it.
             
             private Collocation getCollocation ( String pressmark )
             {
              Collocation collocation = null;
              Expression exp = ExpressionFactory.matchExp("pressmark",
    pressmark);
              SelectQuery query = new SelectQuery(Collocation.class, exp);
              List queriedList = __datactx.performQuery(query);
              if ( queriedList.size() > 0 )
               collocation = (Collocation) queriedList.get(0);
              return collocation;
             }
            
            Clearly after a while (a very short while) the following errors
    occurs
             
            CADMUS Ver 1.3.0
               EXCEPTION: Unexpected exception
    org.objectstyle.cayenne.CayenneRuntimeException.
             Location is:
    org.objectstyle.cayenne.access.util.SelectObserver.nextGlobalException,
    line 222.
              Message is: [v.1.1.3 September 28 2005] Global exception.
             Stack trace: org.objectstyle.cayenne.CayenneRuntimeException:
    [v.1.1.3 September 28 2005] Global exception.
                    at
    org.objectstyle.cayenne.access.util.SelectObserver.nextGlobalException(S
    electObserver.java:222)
                    at
    org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:325
    )
                    at
    org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java
    :654)
                    at
    org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
    va:1408)
                    at
    org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.ja
    va:179)
                    at
    org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
    va:1366)
                    at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
    :1622)
                    at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
    :1485)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.CollocationImporter.getCo
    llocation(CollocationImporter.java:222)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.CollocationImporter.impor
    tCollocations(CollocationImporter.java:101)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.RecordImporter.getColloca
    tions(RecordImporter.java:798)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.RecordImporter.importReco
    rd(RecordImporter.java:412)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.RecordImporter.getRecord(
    RecordImporter.java:336)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.RecordImporter.importReco
    rds(RecordImporter.java:168)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.SBNImporter.importRecords
    (SBNImporter.java:305)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.wizard.Progress.importRec
    ords(Progress.java:208)
                    at
    it.acsys.multimedia.products.cadmus.plugin.sbn.wizard.Progress.run(Progr
    ess.java:228)
                    at
    it.acsys.swing.wizard.DefaultProgressPage$2.run(DefaultProgressPage.java
    :1181)
                    at java.lang.Thread.run(Thread.java:595)
            Caused by: java.sql.SQLException: Can't obtain connection.
    Request timed out. Total used connections: 20
                    at
    org.objectstyle.cayenne.conn.PoolManager.uncheckPooledConnection(PoolMan
    ager.java:466)
                    at
    org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java:
    392)
                    at
    org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java:
    385)
                    at
    org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:313
    )
                    ... 17 more
             
            I've tried to give more connection but the problems always
    occurs (in a longer time).
             
            I don't understand is I've missed something in the code or
    somewhere in the initialization.
             
            Anyone has some suggestions?
             
            Thanks
             
            Claudio
             
             
             
             
             
             
              Multimedia Division <http://www.acsys.it/>
            
    Claudio Rosati
    Project Manager Advanced Computer Systems S.p.A.
    via Della Bufalotta 378
    00139 Roma, RM
    Italy
    claudio.rosat..csys.it tel:
    fax: +39 06 8709 0516
    +39 06 8720 1502
            
    Add me to your address book...
    <https://www.plaxo.com/add_me?u=4295038861&v0=140354&k0=586510396>
    Want a signature like this? <http://www.plaxo.com/signature>
             



    logo_acs_new_small.gif



    This archive was generated by hypermail 2.0.0 : Mon Nov 28 2005 - 13:33:42 EST