Total JDBC Connections

I have deployed an application to Apps Server 9.0.4.
I am using oracle.jdbc.pool.OracleConnectionPoolDataSource. I have closed all the connections, however Open JDBC Connections is always 0 and Total JDBC Connections is increasing.
My inactivity time out is 60 seconds.
Is this normal or something wrong somewhere?
Any help is highly appreciable.
Thanks

The Total number of connections figure indicates the total number of connections that have been opened since OC4J was started.
The Open number of connections figure indicates the total number of connections currently open.
Since you say that the open connections figure stays below 10, this suggests that you do not have a connection leak, but your inactivity time out is too low, and therefore your connections are being closed before they can be reused - hence the large total number of connections.
Good luck.

Similar Messages

  • Open/total jdbc connections

    With Oracle9iR2 AS installed, I notice that there are always open JDBC connections. I explicitly close them from all my JSP files (and the statement and the resultset objects as well). Actually, the total JDBC connections are always 2 times the open JDBC connections.
    The DataSource class I use is com.evermind.sql.DriverManagerDataSource. Is this a problem? Will this be corrected in any future release?
    Thanx

    Interesting thread. Have also had problems with the connection pool (903 standalone).
    One problem in particular is that if min-connections is used, then those pool-connections are really never closed "physically". This means that a lot of open cursors are never released in the db (even though the "connections" used by the code from the pool are closed). Not so good under heavy load.
    Posting a snippet from a connection pool entry we have. Maybe it will help some of you guys.
    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="SomeDS"
    location="jdbc/SomeDBCoreDS"
    xa-location="jdbc/xa/SomeDBXADS"
    ejb-location="SomeDB"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="user"
    password="pwd"
    url="jdbc:oracle:thin:@127.0.0.1:1521:SOMESID"
    inactivity-timeout="300" <-- Will close connections after 300 sec of inactivity
    min-connections="0"
    max-connections="20" <-- Larger on prod machine of course
    stmt-cache-size="100"
    />
    I have experimented wildly with these settings and this is the most stable. Sure, it's nice to always have connections ready in the pool. But as I said. Open cursors WILL accumulate in your db if you use the min-connections set to a positive number (check your v$). This is our experience anyway. These settings have stopped us from getting db errors such as maximum open cursors exceeded and too many connections open using 903.
    Regards,
    Jonas

  • What are the DMS metrics related to Open/Total JDBC Connections?

    Hi,
    We need to monitor that state of the JDBC Connection Pool (Available conns, Max conns, etc.) by reading DMS, however we are struggling to find which is the right DMS metric associated to it?
    We tried the table modplsql_DatabaseConnectionPool however it seems to be never loaded.
    Thanks in advance!
    CR

    Frances,
    For example, use "min-connections" to specify how
    many connections to pre-populate in the pool.Since when does "min-connections" pre-populate the pool?
    According to my observations, there are no database connections established when OC4J starts up. Connections are only created when necessary. As a matter of fact, I still haven't seen anything in the behaviour of OC4J to indicate that it doesn't totally ignore the "min-connections" attribute.
    [I have, on the other hand, seen that "max-connections" is taken into account by OC4J.]
    Good Luck,
    Avi.

  • Total JDBC connections rising steadily

    Our J2EE application has been crashing recently. The app stops responding to requests and is eventually restarted by OPMN. I have been monitoring it through the enterprise manager web page since the the crashes seem to be related to waiting for database resources. The number of open JDBC connections stays low, always less than 10. However, the total number of JDBC connections rises steadily through the day getting well past 1000. Is this normal?
    Does it represent leakage of connections from the pool?
    We are using OC4J 9.0.4.0 with a patch to fix the connection pool bug.
    The data-source is defined as follows:
    <data-source
         class="com.evermind.sql.DriverManagerDataSource"
         name="OracleDS"
         location="jdbc/OracleCoreDS"
         xa-location="jdbc/xa/OracleXADS"
         ejb-location="jdbc/OracleDS"
         connection-driver="oracle.jdbc.driver.OracleDriver"
         username="asuser"
         password="unguessable"
         url="jdbc:oracle:thin:@dbserver:1526:dbinstance"
         inactivity-timeout="30"
    />

    The Total number of connections figure indicates the total number of connections that have been opened since OC4J was started.
    The Open number of connections figure indicates the total number of connections currently open.
    Since you say that the open connections figure stays below 10, this suggests that you do not have a connection leak, but your inactivity time out is too low, and therefore your connections are being closed before they can be reused - hence the large total number of connections.
    Good luck.

  • Monitoring total number of JDBC connections

    We have our application deployed in the Oracle 10g Application server, it uses Toplink 10g for the Persistence and OR mapping and the Oracle 9i database for data storage, the database connection pool is built and maintained by Toplink.
    We observed that on the administration screen for each container, there are 2 parameters, number of active database connections and the total number of JDBC connections.
    We did some load testing for the application and observed the following behaviour on the container.
    1. When the number of parallel users are 10, behaviour seems to be normal, the active database connections are less than 20(used by the connection pool built by Toplink) and the total number of JDBC connections is the same as the number of database connections.
    2. When the number of parallel users is increased to 50, we see that the active database connections is still less than 20, but the total number of JDBC connections just blowed up to 4000+ in less than 2 minutes and still growing. We have no valid explanation for this behaviour as the active sessions is still less than 20. Also we see no obnormal behaviour in our application log files.
    The questions i have are
    1. What could be the reason for the above abnormal behaviour?
    2. How this parameter "Total number of JDBC connections" for a container is actually measured?
    3. DOes this parameter gets affected by how we run the database i.e. in Dedicated server mode or Despactcher mode?
    Many thanks for any information on this topic..

    Perhaps your connection inactivity timeout is slightly too low, so that your connections are being closed and reopened at almost the same frequency. Try increasing the timeout.
    Good Luck,
    Chris

  • Infinite loop - A stale JDBC connection was detected in the connection pool

    Hello.
    I have a simple JSP (no servlets) application with a single Fastlane Reader style view object to back it up. I'm deploying my application under OC4J 10g 9.0.4 using BC4J 9.0.3.11.50 (JDev 9.0.3.3) on RHEL 3.0, j2sdk1.4.2_03.
    I run with -Djbo.debugoutput=console
    Every so often, intermittently, and totally unpredictably, I see this on stdout for OC4J:
    03/12/23 07:42:07 [33326] A stale JDBC connection was detected in the connection pool
    03/12/23 07:42:07 [33327] Creating a new pool resource
    03/12/23 07:42:07 [33328] Trying connection/2: url='jdbc:oracle:thin:@somedb:1521:somedbsid' info='{user=someuser, password=somepass, dll=ocijdbc9, protocol=thin}' ...
    This message occurs over and over ultimately resulting in hundreds upon thousands of failed connections to the database. I have to forcibly restart OC4J to stop it.
    The weird thing about it is that it seems to only start doing this on one system (which is our internal deployment site); it works fine under an OC4J running in IDE or on a preproduction machine.
    Has anyone experienced this before - or at the very least, can clue me in on getting BC4J to be a little more verbose on the connection failure?
    Thanks and Happy Holidays,
    Sean

    Hi did you find an answer?
    if so, could you post it here?
    thanks

  • Two jdbc connections in one transaction

    Hi<br>
              <br>
              In a method of a container managed ejb session bean I have two jdbc connections. I've expected, that they will be in the same transaction, so results of any actions performed with first connection will be visible for the second connection, but it is not. <br>
              I've checked, that there are two sessions at the database, so it seams that there are simply separate transactions. Is it a problem with a ejb-jar.xml (will paste it later), datasource (driver - Oracle Thin non-XA; 1PC selected) or such behaviour can not be achieved in WLS ? <BR>
              <BR>
              regards
              <br>
              <BR><?xml version="1.0" encoding="UTF-8"?>
              <BR>
              <BR><!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
              <BR>
              <BR><ejb-jar >
              <BR>
              <BR>     <description><![CDATA[No Description.]]></description>
              <BR>     <display-name>ConnectionTest1</display-name>
              <BR>     
              <BR>     <enterprise-beans>
              <BR>          <session >
              <BR>               <description><![CDATA[]]></description>
              <BR>               
              <BR>               <ejb-name>ConnectionTest1</ejb-name>
              <BR>               
              <BR>               <home>pl.axit.test.ConnectionTest1Home</home>
              <BR>               <remote>pl.axit.test.ConnectionTest1</remote>
              <BR>     <ejb-class>pl.axit.test.ConnectionTest1Bean</ejb-class>
              <BR>     <session-type>Stateless</session-type>
              <BR>     <transaction-type>Container</transaction-type>
              <BR>     
              <BR>     <resource-ref >
              <BR>          <res-ref-name>jdbc/wowrite</res-ref-name>
              <BR>          <res-type>javax.sql.DataSource</res-type>
              <BR>          <res-auth>Container</res-auth>
              <BR>     </resource-ref>
              <BR>     </session>
              <BR>     </enterprise-beans>     
              <BR>     
              <BR>     <assembly-descriptor>
              <BR>          <container-transaction>
              <BR>               <description/>
              <BR>               <method>
              <BR>                    <description/>
              <BR>                    <ejb-name>ConnectionTest1</ejb-name>
              <BR>                    <method-name>*</method-name>
              <BR>               </method>
              <BR>               <trans-attribute>Required</trans-attribute>
              <BR>          </container-transaction>          
              <BR>
              <BR>     </assembly-descriptor>
              <BR></ejb-jar>

    Hi,
              are you using XA transactions? Two separate JDBC Connections treated
              within one transactional context will require two phase commit (via
              Emulation or an XA database driver) Please check the connections
              settings within your datasources.
              Rgds,
              Axel van Lil (LMIS.de)
              Lukas Uruski schrieb:
              > I forgot to add, that in administration console in server_name > Monitoring > JTA parameter "Transactions Total Count" increases by one each time method from previous post is invoked.

  • JDBC CONNECTIONS RECURSIVE WAY

    JAVA DEVELOPER COMUNITY
    I request your help in the following topic,
    i am doing a java program that store a
    complete file system in an Oracle Database 11GR2.
    So i use a recursive algorithm to do that
    but i don't know how to handle the JDBC
    connections in order to not overload the total of
    physical connections available to the database.
    Thanks for your help.
    Regards from Colombia - South America
    JOHN JAIRO GOMEZ LAVERDE
    I am using the following code:
    import java.io.* ;
    import java.sql.*;
    import java.lang.String;
    import java.util.Date;
    import java.util.Calendar;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.*;
    import javax.naming.*;
    import javax.naming.spi.*;
    public class InsertArcDir
    public void AddFiles( File file )
    try
    Calendar fechamod=Calendar.getInstance();
    String SQL;
    PreparedStatement pstmt = null;
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", "2");
    prop.setProperty("MaxLimit", "10");
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:@//oracle:1521/xe");
    ods.setUser("hr");
    ods.setPassword("hr");
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionCacheProperties (prop);
    //ods.getConnectionCacheName();
    Connection conn = ods.getConnection ("hr","hr",prop);
    Statement stmt = conn.createStatement();
    fechamod.setTimeInMillis(file.lastModified());
    SQL="INSERT INTO tbarchivos(nombrearc,fechaarc,direcarc) VALUES(?,?,?)";
    pstmt = conn.prepareStatement(SQL);
    java.sql.Timestamp sqlDate = new java.sql.Timestamp(fechamod.getTimeInMillis());
    pstmt.setString(1, file.getName());
    pstmt.setTimestamp(2, sqlDate);
    pstmt.setString(3, file.getParent());
    pstmt.executeUpdate();
    stmt.close();
    conn.close();
    catch(Exception e)
    System.out.println("Exepcion"+e.getMessage());
    System.out.println("OTHER TEST");
    * Works on a single file system entry and
    * calls itself recursively if it turns out
    * to be a directory.
    * @param file A file or a directory to process
    public void traverse( File file )
    // Check if it is a directory
    if( file.isDirectory() )
    // Get a list of all the entries in the directory
    String entries[] = file.list() ;
    // Ensure that the list is not null
    if( entries != null )
    // Loop over all the entries
    for( String entry : entries )
    // Recursive call to traverse
    traverse( new File(file,entry) ) ;
    else
    if(file.isFile())
    InsertArcDir rta = new InsertArcDir() ;
    rta.AddFiles(file);
    else
    System.out.println("*** VALOR INCORRECTO ***");
    //try
    //stmt.close();
    //conn.close();
    //catch(Exception e)
    // System.out.println("Exepcion"+e.getMessage());
    * The program starts here.
    * @param args The arguments from the command line
    public static void main( String args[] )
    try
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", "2");
    prop.setProperty("MaxLimit", "10");
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:@//oracle:1521/xe");
    ods.setUser("hr");
    ods.setPassword("hr");
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionCacheProperties (prop);
    ods.setConnectionCacheName("ImplicitCache01");
    Connection conn = ods.getConnection ();
    conn.close();
    //Statement stmt = conn.createStatement();
    // Create an object of this class
    InsertArcDir rt = new InsertArcDir() ;
    if( args.length == 0 )
    // If there are no arguments, traverse the current directory
    rt.traverse( new File(".") ) ;
    else
    // Else process every argument sequentially
    for( String arg : args )
    rt.traverse( new File(arg) ) ;
    //stmt.close();
    //conn.close();
    catch(Exception e)
    System.out.println("Exepcion"+e.getMessage());
    *********************

    I will not comment on weather or not to use recursion. However, I suggest:
    This statement and its configuration should occur once in your program and not in a recursive function:
    OracleDataSource ods = new OracleDataSource();
    Assuming your using connection pooling, get a connection, use it, and close it as quickly as possible for each write to the database (not the best solution, but good enough for now until you read up on JDBC). Do not hold onto the connection for the duration of the application.
    Conection pooling is designed to allow you to get and close a connection with minimal performance loss. I suggest reading up on JDBC, or better yet reading a book on JDBC.

  • UI Shell template - jdbc connections

    We are using UI shell for our app so we could open mutliple tabs in the application, each tab opens a bounded Task flow with "Always Begin new Transaction" and "No Share Data Control". We limit total no of tabs that a user can be open to 10.
    The problem is because of "Always Begin new Transaction" the data Control (Frame) is holding a DB connection for each tab, so potentailly each user can user or an AM instance can hold up to 10 DB connections.
    My question is , IS there away to release DB connection of Data Control (Frame) when the TAB is not active and DB connection for the TAB this currently active, so we can limit the no of DB connections for the app?
    Thanks
    Ramesh

    Hi Ramesh
    Your conclusions here on why your app is taking is taking out 10 connections is nearly right, but it's the isolated data control scope that causes this, not the Always Begin New Transaction option. Please consult the paper "ADF Task Flow Transaction Fundamentals" and the 3 relating demos on the ADF Architecture Square to get a solid understanding of this:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfarchitect-1639592.html
    Those options alone don't control that the connections will be pinned to a particular user session. You'll be familiar that ADF BC Application Module pool parameter control how the AMs activate/passivate, connect to the database and so on. One option to pay attention to is the jbo.doconnectionpooling option (which is false by default).
    This poorly named options would be better named "Disconnect Application Module Upon Release". What it does when false:
    * AM will attempt to hang onto JDBC connection when finished working with request
    * JDBC connection can keep open prepared statements over check in/out from pool
    * If AM is given to new user, rollback called to clear state + AM prepareSession()
    * Faster performance for users assuming they get served same AM
    * But limits scalability, connections are pinned to AM
    What it does when true:
    * AM will drop JDBC connections on completion of request
    * Increases scalability, connections can be reused
    * Forces activation/passivation for every request
    * AM prepareSession() called every new request
    * User performance is slower as prepared statements aren’t cached
    As such you might want to consider setting this to true.
    Regards,
    CM.

  • Error while creating a report that uses Oracle OCI JDBC connectivity

    Please let me know why my CR and LF characters are removed from my forum posting *****
    Hi,
    I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip".  I have successfully created a JDBC OCI connection.
    The connection parameters are given below:
    URL: jdbc:oracle:oci8:@xe
    Database: xe
    username: <userName>
    password: <password>
    I have tested the above connection in Data source Explorer and it works fine!!!
    But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here?  Any help is highly appreciated.
    com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
         at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
         at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
         at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
         at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
         at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
         at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
         at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
         at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    Karthik
    Edited by: KARTHIK1 on Oct 14, 2009 9:38 PM

    Hi Ted,
    Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI.  It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
    1) Can you please let me know if there is a way to do this? 
    2) Will it allow data sources using native database driver?
    3) If so, can I use JRC to create these reports from a desktop java program?
    Thanks & Regards
    Karthik
    Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM

  • Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

    Hello,
    I am experiencing an issue with pinging a JDBC connection Pool.
    I installed the following without any warnings or errors:
    Operating System: Oracle Enterprise Linux 5
    Oracle XE 11gR2 (11.2.0.2.0) database
    Glassfish 3.1.2.2
    I will refer to the steps I did after the installations
    1) In the .profile file of the OS I add the following:
    JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
    JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
    GLASSFISH_DIR=/u01/glassfish3
    GLASSFISH_HOME=/u01/glassfish3/glassfish
    DERBY_HOME=$GLASSFISH_DIR/javadb
    OPEN_MQ_HOME=$GLASSFISH_DIR/mq
    PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
    export GLASSFISH_HOME
    export DERBY_HOME
    export OPEN_MQ_HOME
    export PATH
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
    . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
    3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
    Pool Name: ds_orasys
    Resource Type: javax.sql.DataSource
    Datasource Classname: oracle.jdbc.pool.OracleDataSource
    User: [myschema]
    Password: [myschema password]
    URL: jdbc:oracle:thin:@localhost:1521:xe
    When I ping the connection pool I get the following message in the server log:
    [#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
    [#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
    I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
    I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
    Can anybody help me out or point me to the right direction.
    Thank you in advance

    The error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.

  • JDBC Connection pool recovery after DB server restart

    I am finding that Kodo is throwing the following exception after I restart
    my database server (mysql). I am doing the database server restart while my
    application server is idle, so it is not during a transaction.
    Communication link failure: java.net.SocketException [code=0;state=08S01]
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    This is presumably due to the JDBC connection pooling. Is there a
    configuration setting that allows Kodo to detect such failures and reconnect
    to the database server without exposing this problem to the application
    code? For example, WebLogic Server's JDBC connection pool has a setting that
    enables testing a connection and recovering from such failures before
    allocating it from the pool.
    Ben

    This is presumably due to the JDBC connection pooling. Is there a
    configuration setting that allows Kodo to detect such failures and reconnect
    to the database server without exposing this problem to the application
    code?Not right now. You can log an enhancement request with our bug database:
    http://bugzilla.solarmetric.com/

  • JDBC connection pool failures when used by JMS stores

              We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
              a JMS Store.
              <JDBCConnectionPool Name="sybaseJMSPool"
              Targets="cluster00"
              InitialCapacity="2"
              MaxCapacity="10"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;charset=utf8"
              URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
              (note that the @xxx@ string are replaced by actual values).
              We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
              We deployed this configuration on a number of environments (testing, staging,
              ..). The actual hardware and network configuration is different for the different
              system, but the WebLogic domain stays the same regarding this issue.
              On the test system we frequently get the following exceptions:
              <Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
              <ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
              <JMSServer "JMSServer00", store failure while writing message for topic
              OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
              <sybaseJMSPool>, prefix = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              .>
              java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
              = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              at weblogic.jms.store.JDBCIOStream.throwIOException
              (JDBCIOStream.java:1213)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Before that this message appeared:
              <Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
              <node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
              <Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
              received a message over an uninitialized connection: 'JVMMessage from: 'null'
              to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
              1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
              invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
              offset: '34'''>
              This problem did not occur on another system which was used during a 2 day stress
              testing session.
              It seems that the problem occurs after a period in which no user request where
              made. The user requests trigger EJB's that start sending JMS messages.
              When the problem occurs, the JMS messaging systems seems to lock up as no messages
              are received anymore by the different listeners (MDBs).
              Undeploying and redeploying the JBDC connection pool solves the problem. This
              solution is unacceptable in case of a production system.
              A similarly defined connection pool, which is used by the EJBs to make database
              connection, does not manifest this problem.
              <JDBCConnectionPool Name="sybasePool"
              Targets="cluster00"
              InitialCapacity="10"
              CapacityIncrement="5"
              MaxCapacity="50"
              PreparedStatementCacheSize="150"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
              URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
              The JDBC connection pool is used as follows by the JDBC store
              <JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
              <JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
              <JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
              <JMSTopic JNDIName="ADIS.Status"
              Name="StatusTopic" RedeliveryDelayOverride="300000"/>
              <JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
              Name="OrderChangeTopic" RedeliveryLimit="3"/>
              </JMSServer>
              Turning on the "Test Reserved Connection" with a appropriate test table does not
              help.
              Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
              can be related to network problems. Nevertheless the connection pool should be
              able to cope with this.
              Can you provide any solution for this ? Or give us hints what can cause the problem
              

    Zhenhao Qi wrote:
    thanks! Joe.
    The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
    1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
    2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
    ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
    allowances for one thread to interrupt a second thread's JDBC call. If we
    transmit your timeout request by calling setQueryTimeout() on the oracle
    statement, and if you have a weblogic-controlled transaction we call
    Statement.cancel() on any ongoing statement, we end up relying on whether
    the Oracle driver implements and responds to those calls.
    Are you doing weblogic-controlled transactions? Are you/can you
    call Statement.setQueryTimeout() on your statements, or are these
    generated JDBC queries?
    If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
    we have some other debug avenues. This would be good even if you really
    want to use the thin driver, because we will do the same JDBC calls to
    either driver, and the debug would prove (if) we set up a query timeout
    and if we call cancel(). If we do, then we can know that it is the Oracle
    driver failing in these regards.
    Joe

  • JDBC Connection pools and clusters (is max connection for entire cluster?)

    Hi,
    Quick question.
    When using JDBC connection pools in WAS 6.40 (SP13) in a clustered environment. Are the max connections the number
    a)Each application server can use
    b)The entire cluster can use
    Would believe a), but I'd like it confirmed from someoneelse

    Hi Dagfinn,
    your assumption is correct. Therefore, in a cluster environment you'd need to make sure the DB can open <i>Number of nodes X max connections</i>.

  • Issues with JDBC Connection Pooling

    Hi all,
    I'm experiencing some unexpected behaviour when trying to use JDBC Connection Pooling with my BC4J applications.
    The configuraiton is -
    Web Application using BC4J in local mode
    Using Default Connection Stagegy
    Stateless Release Mode
    Retrieving Application Modules using Configuration.createRootApplicationModule( am , cf );
    Returning Application Modules using Configuration.releaseRootApplicationModule( am, false );
    Three application modules
    AppModuleA - connects to DatabaseConnection1
    AppModuleB - connects to DatabaseConnection2
    AppModuleC - connects to DatabaseConnection2
    My requirement is to -
    Use App Module Pooling and have individual pool for each Application Module
    Use JDBC Pooling and have individual pool for each Database connection
    Note: All configuration was achieved in design mode (i.e. right clicking AppModule->Configurations...)
    1. Initial approach -
    In the configuration for each Application Module I specified the connection type as 'JDBC Datasource' and specified to approriate datasource.
    Tried setting doConnecitonPooling to 'true' as well as 'false'
    In the data-sources.xml I specified all the appropriate info including min-connections and max-connections.
    I would expect, with the above config that BC4J would use OC4J's built in JDBC connection pooling.
    2. Second approach -
    In the configuration for each Application Module I specified the connection type as JDBC URL.
    In the configuration I specified doConnectionPooling = 'true' as well as the max connection, max available and min available
    What I experienced in both cases was that the max connections seem to be ignored as the number of connection as reported by the database (v$session) was exceeded by more than 10.
    In addition to this once the load was removed the number of JDBC connecitons did not drop (I would have expected it to drop to max available connections)
    My questions are -
    1. When specifying to use a 'JDBC Datasource' style of connection, is it in fact OC4J that is then responsible for pooling JDBC connections? And in this case should BC4J's doConnectionPooling parameter be set to true or false?
    2. Are there any known issues with the use of the JDBC Conneciton Pool as stated by the above to approaches?

    Thanks for the additional info. Please see my comments. below.
    Sorry should have been more specififc -
    1. Is each application pool using a different JDBC user? You mentioned DatabaseConnection1 and DatabaseConnection2
    above; are these connections to different schemas / users? If so, BC4J will create a separate connection pool for each
    JDBC user. Each connection pool will have its own maximum pool size.
    Each 'DatabaseConnection' refers to a different database, actually hosted on a seperate physical server, different
    schema and different user.BC4J will maintain a separate connection pool for each permutation of JDBC URL / schema. If each user is connecting
    to a different DB instance then I would expect no greater than 10 DB sessions. However, if a DB instance is hosting
    more than user then I would expect greater than 10 DB sessions (though still no more than 10 DB sessions per user).
    2. Are all the v$session sessions related to the JDBC clients? There should be at least one additional database
    session which will be related to the session that is querying v$session.
    When querying the v$session table I specifically look for connections from the user in quesiton and from the machine
    name in question and in doing so eliminate the database system's connections, as well as the query tools'
    connection. One area I'm not sure about is the connection BC4J uses to write to its temporary tables. I am using
    Stateless release mode and have not explicetly stated to save to the database but I'm wondering if it still does if so
    and how does it come into the equation with max connections?BC4J's internal connections are also pooled and the limits apply as mentioned above. So, if you have specified
    internal connection info for a schema which is different than the users above I would expect the additional conns.
    One helpful diagnostic tool, albeit programmatic, might be to print the information about the connection pools after
    your test client(s) have finished. This may be accomplished as follows:
    // get a reference to the BC4J connection pool manager
    import oracle.jbo.server.ConnectionPoolManagerFactory;
    import oracle.jbo.server.ConnectionPoolManagerImpl;
    import oracle.jbo.pool.ResourcePool;
    import java.io.PrintWriter;
    import java.util.Enumeration;
    // get the ConnectionPoolManager. assume that it is an instance of the supplied manager
    ConnectionPoolManagerImpl mgr = (ConnectionPoolManagerImpl)ConnectionPoolManagerFactory.getConnectionPoolManager();
    Enumeration keys = mgr.getResourcePoolKeys();
    PrintWriter pw = new PrintWriter(System.out, true);
    while (keys.hasMoreElements())
    Object key = keys.nextElement();
    ResourcePool pool = (ResourcePool)mgr.getResourcePool(key);
    System.out.println("Dumping pool statistics for pool: " + key);
    pool.dumpPoolStatistics(pw);
    }

Maybe you are looking for

  • When I try to sync my apps to itunes nothing appears in the left hand column and i can't sync or remove them...why?

    When I try to sync my apps to itunes a pop up appears that says itunes will no longer sync apps to my ipod. Then it gives me an option to either keep my apps or remove them. No matter what i press nothing happens either way. None of my apps ever appe

  • Safari unstable since upgrading to Lion OS

    Since upgrading to Lion OS I have been unable to access my remote office though Safari due to Safari quitting / crashing when using the site. This did not happen when using Snow Leopard. I have inserted the diagnostics text I receive when Safari quit

  • Lumia 520 freezing on 3g

    Hello, I am using a Lumia 520,when I select 3g as the highest speed connection the phone freeze, I am now obliged only to use 2g,and 2g is very slow.What is the problem? Can anyone help me to solve this issue. Thanks

  • Safari has no graphics just a black screen

    Safari has no graphics just a black screen, This is from launch, the button and window frame are ok but the text look a bit odd on the bookmark bar and the url field is black and the content of the window are just black. I have reinstalled it with a

  • SO36 Auto forwarding Address

    Hi Experts,      Is there any way or report or FM available to read SO36 Autoforwarding address of all the SAP Users ?      If it is not maintained properly then workflow notification mails are not going to external email ids.      If possible how ca