Connection Pool hangs

Hello,
We have a strange problem with Oracle Connetion pool on IAS 10.1.3.1.0.
Sometimes (for example once a week, sometimes one a month) connection pool hangs. Enterprise Manager / Connection pool monitor page shows information about threads waiting for connection (see below) and users are unable to work with application.
Connections In Use                1
Free Connections                13
Total Connections in Pool           14
Threads Waiting for Connections      534
WebApp installed on IAS is a simple Toplink based application. There are no strange messages in error logs, so why connection pool is unable to assign free connection to user ?
Thanks in advance
Tom
Edited by: olos on Sep 30, 2008 8:57 PM

Hello,
Thanks for response. I will try if it is possible to test connection from AS control during next connection pool crash. BTW we must check if this situation is not caused by operation system (Linux) swapping process.
Regards
Tom
My datasources file is:
<?xml version = '1.0' encoding = 'UTF-8'?>
<data-sources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd"
schema-major-version="10" schema-minor-versio
n="1">
<managed-data-source connection-pool-name="Example Connection Pool"
jndi-name="jdbc/OracleDS" name="OracleDS"/>
<managed-data-source connection-pool-name="Bufor List Connection Pool"
jndi-name="jdbc/BuforListDS" name="Bufor List Data Source"/>
<connection-pool name="Example Connection Pool">
<connection-factory
factory-class="oracle.jdbc.pool.OracleDataSource" user="scott"
password="tiger" url="jdbc:oracle:thin:@//localhost:1521/ORCL"/>
</connection-pool>
<connection-pool name="PRD Connection Pool"
abandoned-connection-timeout="120" connection-retry-interval="3"
max-connect-attempts="5" max-connections="200" min-connections="3"
property-check-interv
al="600">
<connection-factory
factory-class="oracle.jdbc.pool.OracleDataSource" user="user"
password="password"
url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=tcp)(HOST
=host01)(PORT=1521))(ADDRESS=(PROTOCOL=tcp)(HOST=host02)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=SN.DOMENA.PL)))"/>
</connection-pool>
</data-sources>

Similar Messages

  • Websphere Application Server 5.1 Hangs when using Oracle Connection Pool

    I have a j2ee application that runs on WAS 5.1 ( IBM JDK 1.4 ) and Oracle 10g 10.2.0 . My customer is doing load testing with 25 virtual users and a connection pool with a max size of 10. When the test starts all 25 users attempt to get a connection, and the first 10 get a connection. At this point the application server hangs with the connection pool in allocation. This is seen in Tivoli. Each thread only needs one connection to process it's request.
    I have my own home grown connection pool which when used under this load does not experience and issue. Monitoring from Oracle's admin console I see a max of 10 sessions. The home grows connection pool does not use a WAS DataSource.
    I have configured my application to use DB2 with a WAS DataSource and the application server does not hang. Monitoring using Tivoli shows the connection pool going into allocation, but it recovers as is expected.
    Are there any known issues with the Oracle JDBC drivers when used with WAS 5.1 DataSources?
    Any direction would be helpful, as I currently thing there is an issue with Oracle's Connection Pool and the IBM JVM.
    Thanks,
    J

    just an attention call: OracleDatasource connection pool does not accept parameters such as removeAbandoned, minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis, etc, these are specific for the tomcat dbcp implementation (http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources).
    For the accepted ones read this http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/concache.htm
    Edited by: user7428636 on 24/Jan/2011 6:22

  • Urgent...Help Needed.1. Helper Class 2. Connection Pool

    Hello,
    1. There are few helper classes which has to be
    shared b/w session and entity beans. But it
    seems,state of the object is not transfered to entity
    bean though the class has implemented Serializable
    interface. I have archived all the helper class and
    copied to j2ee\home\lib directory. The same jar file
    is made accessible to server via updating <library-
    path> in j2ee/home/config/application.xml file.
    2. How can i utilise connection pooling in oc4j. In data-sources.xml, i am using
    "OracleConnectionPoolDataSource" class. But i feel that connection pool is not utilised coz server hangs in the middle of the retrieval.
    The value of max-connections is 50.
    We are actually migrating from Weblogic 5.1.0 to Oracle 9i AS. In weblogic, we had given 10 max connections in weblogic.properties,it is working fine. But i dont understand why it is not working in 9i AS though the max-connections is 50.
    Kindly let me know the solution at the earliest as it is very urgent to get the program running...
    Thanx and Regards,
    Achyuth

    Hi,
    hopefully I can help you.
    1. There are few helper classes which has to be ...We have just the same constellation. We have put the HelperClasses in the
    J2EE/home/lib dir, NOT specifying it in the application.xml. So everything works fine.
    The only thing: never, again: never put these files within WEB-INF and the lib-dir.
    With the HelperClasses in both we have only faced massive problems, mostly ClasCastExceptions.
    We had once all the helperClasses within J2EE/home/applications/lib, but this requires to
    specify this dir within the orion-application.xml within the appl dir in applications-deployment.
    It also worked fine.
    2. How can i utilise connection pooling in oc4j. In data-sources.xml, i am using ...I'm not sure of this, but I think, the container handles Connection Pooling, no matter what Factory you
    specify. But I think, the Class hasn't to be OracleConnectionPool ... but I have to check this (right now
    I have no access to our datasource.xml ..)
    cu
    ed

  • Connection Pooling much faster but eventually brings down the site

    Hello,
    We are running Oracle 11g, with ODP.net. When we have connection pooling turned off the site is very slow. When we turn it on, the site runs very fast, but will all of a sudden slow down to a crash and require an IIS restart. (We will receive many oracle connection timeouts). After checking the Event Viewer, the site crash seems to coincide with a stored procedure crash, though we aren't positive that this is the case. We are running IIS on windows 2k3 asp.net 3.5.
    Any assistance is greatly appreciated.

    It sounds like you're describing a connection leak, and those are usually the result of code not cleaning up after itself properly. Make sure you're calling Dispose on all your objects as soon as you're done with them so the GC can free up the resources.. OracleConnection, OracleCommand, OracleRefcursor, OracleClob, OracleXMLType, OracleParameters, etc.
    Also make sure you're up to the latest version of ODP and client. There were some issues in earlier versions where an access violation could leave a hung critical section and hang the pool.
    Hope it helps,
    Greg

  • Connection pooling in multithreaded app results in occasional "Closed Statement" exc"

    Hi there,
    I'm writing a CORBA servant, which amongst all calls in a stored procedure. I'm using connection pooling (just by example) from multiple threads and use grabbed connection to prepare an SP statement, execute it, and close both statement and connection (to return it to the pool). My stress tests run fine for the most part but once in a while throws out "Closed Statement" exception when trying to excecute the prepared statement.
    The reference platform is Solaris7, thin driver 8.1.6 for Java2, jdk 1.2.2, Oracle 8.1.5 (backend), ORBacus 3.3 (external application orb).
    Do you guys have any "multithreaded" statements as far as pooling concerned? Let me know if you need code, schema, anything at all. Any recommendations are greatly appreciated too, like "don't use prepared statements, don't use pooling from multiple threads, download upgrade, etc". Thanks ahead.
    Yours,
    -Evgeni

    Dear Oracle JDBC Development Team,
    First of all, I object to your comment "Please don't spread wrong information.". I do not spread wrong information. That is why I wrote in my previous email, "it isn't thread safe (as far as my tests have shown)". My statement is thus conditional on MY testing. I recognise the fact that I could be wrong. Hence, the conditional clause.
    As for the claim that OracleConnectionCacheImpl is thread safe - well, since it is your software then all I can do is believe you. However, I repeatedly get a java.util.EmptyStackException from calls to oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection() when running my test WITHOUT using the "synchronized" clause on the OracleConnectionCacheImpl object.
    This, of course, could be due to the fact that my test is faulty. I don't know. I can't see the fault in any case. If you can help me with this then I would be more than grateful.
    In any case, when I use the "synchronized" statement on OracleConnectionCacheImpl then this error disappears in a multithreaded environment.
    Another interesting thing my test showed was that the JDBC driver seems to hang under heavy workload. Again, I could be WRONG. It could be my test that causes the problem, however, it is very hard to pinpoint the problem.
    I would really appreciate help with this, if you have time, as we are using OracleConnectionCacheImpl in a major Internet billing system. If you wish to help then please send me an email to [email protected] (or [email protected]) and I will then send you my source code for the test.
    In any case, I will word my messages with even more care in future!
    regards,
    Alexander Day
    null

  • Use of Semaphore in addition to db connection pool

    Hi,
    I have a multi-threaded app, about 4 threads, reading from a local DB then pushing to a web service,
    then writing a response back to the local DB. I'm using Commons DBCP with a size of 20.
    Do you think there is any added benefit to using semaphore to safe-guard access to the DB pool?
    Will this prevent any deadlocks in a more thorough manner?

    iketurner wrote:
    Yes,
    after I am done with the connection I explicitly close it:
    conn.closeThis should handle things for me.
    I will add in the use of finally
    Will this make a difference you think, even though I am using conn.close()?whenever you use a "resource" you should close it in a finally block. otherwise you can leak resources if you encounter problems (i.e. throw exception):
    Connection c = null;
    try {
      c = ...;
      // do something with c
    } finally {
      if(c != null) {
        c.close();
    }this is a must if you are using db connections, otherwise an exception thrown during the "do something with c" part will cause your connection to not be closed. then you would encounter problems later as all you run out of connections in your connection pool and your application hangs.

  • 5.1.0 sp11 Connection pool refresh issue, revisited....again...!!!

    "Hello,
    From reading of these newsgroups I've seen many different manifestations
    of what seems to be the same root cause with connection pools and
    connections which are refreshed/replaced when found broken. In our
    case weblogic server hangs.
    Kit: 2xWeblogic 5.1.0 sp11 (not clusterd), Solaris 8,
    java 1.3.1_01, 1xoracle 8.1.6, latest JDBC 2.0 drivers from oracle. Each weblogic instance and oracle have their own machines.
    We do indeed have a firewall employed to run our subnets, and hence
    our weblogic servers and oracle databses are in different DMZ's, but are
    allowed to communicate to each other via rules set up on the firewall and
    inspection of the logs show no such connections being dropped.
    As far as the db is concerned, lookups (no writes) never take more than a few
    hundred milliseconds and are then closed and given back to the connection pool
    immediately from within the 'finally' block of code, hence hard to see when,if ever, the db is
    is closing them due to excessive idle time.
    weblogic.jdbc.connectionPool.RecipeDBPool=\
    url=jdbc:oracle:thin:@foo:1521:BAA,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=30,\
    maxCapacity=50,\
    capacityIncrement=1,\

    Alkesh wrote:
    Hi Joe,
    The fix you suggested has been implemented and has been running fine
    now for the past 3 days. I'm delighted with the result,Great. Glad to help.
    but am concerned as to why this problem wasnt highlighted during our
    load-testing phases...It's a possibility that your load-testing didn't present the same sort
    of load that your actual runtime does.
    Thanks for your time on this.Well sure. We want you successful.
    Joe
    Alkesh
    At 01:52 PM 2/22/2002 +0000, you wrote:
    Hi Joe,
    Thanks for your reply
    Please find attached a copy of the jvm thread dump we got from thelast time
    that weblogic blocked upon trying to refresh a broken connection.
    We have turned off JIT with the environment settingJAVA_COMPILER=NONE.
    FYI hotspot is enabled with '-hotspot', these settings can be foundin the
    attached 'startWeblogic.sh'.Hi. I found a serious problem by reading the thread dump:
    "ExecuteThread-11" daemon prio=5 tid=0x179d40 nid=0x19 waiting for
    monitor entry
    [0xeee80000..0xeee819e0]
    at java.sql.DriverManager.getConnection(DriverManager.java:144)
    - waiting to lock <f8e77ad0> (a java.lang.Class)
    at com.akqa.sainsburys.jv_recipe.ejb.session.RecipeBean.getConnection(Re
    cipeBean.java:759)
    It is important to never call DriverManager methods in a multithreaded
    application
    such as Weblogic, because these JVM methods are alloverly synchronized
    at
    the class level. One such method, DriverManager.println(), is called
    continuously
    by all JDBC drivers as well as the SQLException constructor. If one
    server thread
    makes a long-lasting or hanging call to DriverManager.getConnection(),
    it can halt
    all JDBC in the whole JVM including work on other open driver
    connections.
    Please show me the code for RecipeBean.java, and I will send you an
    altered version
    that should solve this problem. In fact, I can infer from the thread
    dump what is needed.
    Change the one method getConnection() to this:
    // Make once and re-use a driver instance directly, avoiding
    DriverManager
    Driver d = (Driver)class.forName("weblogic.jdbc.jts.Driver").newInstance();
    public Connection getConnection()
    return d.connect("jdbc:weblogic:jts:yourPoolNameHere", null );
    Also, change your pool definition. I assume you have
    testConnsOnReserve set to true.
    (You should). Also, you should change your refresh minutes to
    something huge, like
    9999999. The refresh is interfering with your online performance and
    is unnecessary
    if you have testConnsOnReserve set. I recommend:
    weblogic.jdbc.connectionPool.RecipeDBPool=\
    url=jdbc:oracle:thin:@foo:1521:BAA,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=50,\ <------ note that this should be the
    same as max, so all cons are made at startup
    maxCapacity=50,\
    testTable=dual,\
    testConnsOnReserve=true,\
    refreshTestMinutes=9999999,\
    etc.
    Joe
    I've also attached some firewall logs around the time of weblogicblocking
    (12.09). I could only get screen dumps for you, this may or maynot be
    useful.
    For the firewall logs use the following legend :-
    195.110.64.205 - DNS
    172.16.160.195 - host webserver 1 (i.e. what our licenses are boundto)
    172.16.160.196 - host webserver 2
    172.16.160.220 - website 1
    172.16.160.230 - website 2
    Thanks
    Alkesh
    -----Original Message-----
    From: Joe [mailto:[email protected]]
    Sent: 20 February 2002 22:09
    To: [email protected]
    Subject: Re: 5.1.0 sp11 Connection pool refresh issue,
    revisited....again...!!!
    At 02:47 PM 2/20/2002 +0000, you wrote:
    Hi Joe,
    Please find attached a copy of our thread dumps for the most recentoccasion
    that weblogic server has stopped.
    Apologies for any misunderstandings with my previous post, it appears to
    have been cropped. Full posting below (yes we do have testConnOnReserve and
    testTable properties set).
    Thanks for your time.sure, but first let's get you running OK. These dumps seem to be
    very cryptic, as if you're running a highly optimized JVM that
    loses almost all of the Java class references I'd normally see.
    Can you run again with a more basic JVM? I am beginning to suspect
    the JIT JVM...
    Joe
    Alkesh
    Joseph Weinstein wrote:
    Hello,
    From reading of these newsgroups I've seen many
    different manifestations of what seems to be the sameroot cause with connection pools and connections
    which are refreshed/replaced when found broken. In our
    case weblogic server hangs.
    Kit: Weblogic 5.1.0 sp11 (not clusterd),
    Solaris 8, java 1.3.1_01, oracle 8.1.6,
    latest JDBC 2.0 drivers from oracle.
    We do indeed have a firewall employed to run our subnets,
    and hence our weblogic servers and oracle databses are
    in different DMZ's, but are allowed to communicate to each
    other via rules set up on the firewall and inspection of
    the logs show no such connections being dropped.
    As far as the db is concerned, lookups (no writes) never
    take more than a few hundred milliseconds and are then
    closed and given back to the connection pool immediately
    from within the 'finally' block of code, hence hard to
    see when,if ever, the db is is closing them due to excessive idle time.
    weblogic.jdbc.connectionPool.RecipeDBPool=\
    url=jdbc:oracle:thin:@foo:1521:BAA,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=30,\
    maxCapacity=50,\
    capacityIncrement=1,\
    allowShrinking=false,\
    testTable=dual,\
    testConnsOnReserve=true,\
    shrinkPeriodMins=1,\
    refreshTestMinutes=10,\ // has been 1 and 5 but 10 'more' stable.
    Fequently however, connections are found to be broken
    (either by periodical refresh - refreshTestMinutes or
    testing connection before granting it to the
    application - testConnsOnReserve=true), this has been
    confirmed by viewing JDBC.log .
    When this is so, weblogic attempts to replace these
    broken connections with new ones and then proceeds
    to grant it to the application. Once in a while however
    (and by no means 'x' refreshes later), weblogic will not
    come back.
    One of 2 errors occur in our deployment which cuase weblogic
    to refresh a connection.
    <JDBC Pool RecipeDBPool> java.sql.SQLException: No more data to read fromsocket
    and
    <JDBC Pool RecipeDBPool> java.sql.SQLException: Io exception: Broken pipe
    I believe these settings to all be correct, JDBC drivers
    in the correct point BEFORE weblogic.aux in classpath, yet
    still have the issue of broken connections.
    Any ideas ? I've been reading a lot into this probelm
    on various postings now, and i'm completely stumped.
    Thanks for your time.
    Alkesh

  • IO Exception Broken Pipe ORA-17002 while using connection pooling

    Hi
    We are experiencing "broken pipe ORA-17002 error" when using connection pooling. This seems to be a common error when implementing connection pooling, but I didn't find any solution anywhere.
    we are using Oracle 9i 9.2.0.1 JDBC thin driver
    Our database is Oracle 8.1.7 running on HP Unix
    The middle tier(Tomcat) runs on RedHat linux server
    We are using JDK1.3
    It seems the connections automatically get stale or bad after certain period of time.Iam checking to see if the connection is closed, before giving the connection from the pool to the appilcation.It seems its still open.But when I start using the connection to open a callable statement or setAutocommit to false, it says Broken pipe or No more data to read from the socket.
    We are implementing our own connection pooling class(we experimented with OracleConnectionCacheImpl but it too gave the same errors).
    Does anybody have a solution for this problem??
    Is there a workaround for this?I would like to know how connection pooling is implemented in most of the applications that use oracle database?Or do we need to explicitly test the connection before using it, and reopen a connection if that is bad??
    Thanks
    Anil

    kalle
    Thank you very much for your advice!!!
    Like you said, I started to check whether the connections are fine before giving them from the pool.I am executing a simple "select 'anil' from dual" and if its fine only then I return the connection. So far it seems to be fine. Also I am reopening the connections(closing the old ones and opening new connections) after every 12 hours.
    As far as the JDBC driver is concerned, I already tried with Oracle 8i driver, it gave the same problems. I read that 9i driver might solve this problem, so I changed to the latest 9i driver (classes12_g.zip).
    Sometimes before(before I started checking whether the connection is good )the application used to hang up at the point where I am issuing setAutoCommit(false).It never comes out from that statement.Is this something to do with theconnections being closed?
    What I am afraid is, will the appilation get hung up even after I check the connection with select query and then issue autocommit(false)??
    Or will it hang up while I check with a select query??
    As long as it doesn't hung up, I am fine. Because i am cathching the exceptions.
    Thanks In ADVANCE
    Anil

  • ORA-22990 ( Cannot span lob... ) while using connection pooling...

    Hi all, I am maintaining a web site that has lots of requests ( about 10 requests a second ) to an Oracle table that has a BLOB field. Those requests create new blobs, updates them and reads them... My program worked fine until I started using connection pooling ( Before that, I used a single connection that was initialized at startup ). Although I had to synchronized the methods that interact with blob field, everything worked great. So now, to optimize my site, I want to use connection pooling so that even if my methods are synchonized on the connection object, there will be more than one connection available so it will not affect performance.
    So once I introduced my connection pooling system with the oracle.jdbc.pool.OracleConnectionCacheImpl class, I started getting ORA-22990 ( Cannot span lob objects... ). I get the error on the flush() method when I try to write the blob to the database. Here is my function that writes a row in the databse.
      private synchronized void writeSession(CapSession pSession) throws Exception
            javax.sql.PooledConnection pc = pool.getPooledConnection();
            Connection conn = pc.getConnection();
            CallableStatement stmt=conn.prepareCall(writeObjSQL);
            stmt.setString(1,pSession.getSessionId()+pSession.getPassword());
            stmt.setLong(2,pSession.getLastAccess());
            stmt.setLong(3,pSession.getTimeout());
            stmt.registerOutParameter(4,java.sql.Types.BLOB);
            stmt.executeUpdate();
            oracle.sql.BLOB blob=(BLOB)stmt.getBlob(4);
            OutputStream os=blob.getBinaryOutputStream();
            ObjectOutputStream oop=new ObjectOutputStream(os);
            oop.writeObject(pSession);
            oop.flush();
            oop.close();
            os.close();
            stmt.close();
            conn.commit();
            conn.close();
            pc.close();
      } If anyone could help me, I would deeply appreciate it!
    Thank you for your time.

    kalle
    Thank you very much for your advice!!!
    Like you said, I started to check whether the connections are fine before giving them from the pool.I am executing a simple "select 'anil' from dual" and if its fine only then I return the connection. So far it seems to be fine. Also I am reopening the connections(closing the old ones and opening new connections) after every 12 hours.
    As far as the JDBC driver is concerned, I already tried with Oracle 8i driver, it gave the same problems. I read that 9i driver might solve this problem, so I changed to the latest 9i driver (classes12_g.zip).
    Sometimes before(before I started checking whether the connection is good )the application used to hang up at the point where I am issuing setAutoCommit(false).It never comes out from that statement.Is this something to do with theconnections being closed?
    What I am afraid is, will the appilation get hung up even after I check the connection with select query and then issue autocommit(false)??
    Or will it hang up while I check with a select query??
    As long as it doesn't hung up, I am fine. Because i am cathching the exceptions.
    Thanks In ADVANCE
    Anil

  • Database Resident Connection Pooling (DRCP)

    Hi there,
    Im playing with DRCP on SLES but its not acting as I would expect. Given the lack of any hard info out there I thought I would check my understanding as its probably/possibly flawed!
    I thought that with DRCP you would have lots of sessions in the database with a small pool of server processes (These are the "L000" processes).
    If I set my pool to have a max-size of 3 for example then I can create TWO sessions (via SQLPLUS11g) using the POOLED processes (SERVER=POOLED).
    The third process is used for "Authenitication". Ok. Fine. Good. All sessions are sat idle doing nothing and I can see in v$session and v$process that the sessions have picked up one of the "Lnnn" processes..
    Now when I come to add another session , the create-session/connect from SQLplus hangs and waits for one of the other sessions to either time-out or be closed.
    I thought DRCP would allow multiple sessions to share the same processes. Ie if session A is idle then its pooled server-process is released back to the pool - and hence would be available to be used by another session. IE a bit like shared-servers in well, Shared Server I guess!
    If the above isnt the case then is this really "Pooling" or just a case of there being pre-spawned server processes knocking about to speed up connection requests?
    Yours,
    Bob

    Hi,
    I can't believe no-one else on this forum was not able to jump in while I was busy!
    I wasn't aware of that OTN article I merely read the docco. However, having read this now and read your comments, I still don't get where you are coming from as (to me) the article just backs up what I think. But I could be wrong.
    In fact to quote exactly what you've posted:
    "Clients are persistently connected and authenticated to the Broker. Clients
    request the Broker to provide pooled servers when they need to perform some database activity, use them, and then release them back for reuse by other clients."
    I read this as clients get a connection from the broker, uses it and releases it. With emphasis on the client. So if the client hasn't released it, it's still got it.
    "...The pooled server is handed back to the broker when the client releases it."
    I mean again, emphasis on the client releasing it. If the client doesn't release it, it's still got it and so can't be used by any other client.
    I do believe the diagram is misleading, it seems to imply that an idle (grey) client is just 'connected' to the broker, implying for a pooled connection to be back in the pool then the client just has to be merely idle rather than releasing it. The Busy/Idle w.r.t. DB activity doesn't help either as we all know a client can be connected but not doing anything with that connection. So I see how that can cause confusion.
    The noddy little graph just shows to me a linear correlation between memory and pooled connections. What a suprise. This is exactly what I would expect. The more connections in your pool, the more memory you need.
    Lastly, if the DRCP didn't work this way, it would work differently to every other connection pool I've ever met. With a connection pool governed by the mid tier, it opens a bunch of dedicated connections to the DB with a common username. The mid tier language (java, .nyet, whatever) makes it transparent that a connection is coming from this pool and normally makes it transparent to release them back (the developers never need know).
    But as I said I could be wrong and I'm interested in what you find from the SR.

  • Connection/Connection Pooling - Best Practices

    Hi everyone,
    I'm doing my first JDBC application, and I have some questions about the right way to do things. We've got a series of business objects with lots of database abstraction and everything, and the situation comes up where we're making a lot of calls to the database to populate our objects. The high number of calls occur because of the level of abstraction we need, so when we get a Person object, we don't do a join on the address table and the phone table, but instead make seperate calls to those tables. Aside from the fact that this may not be the best way to do things, what is the best way to manage the connections? It's pretty costly time-wise to create a bunch of new connections, so I was just using one connection and passing it through our database call objects, so I'd created a connection to the DB, get my Person information, pass that connection on to read from the Address table, then again to Phone table. I know this can't be good, but it's a lot faster than creating a new connection every time. Also, I don't know how reusing the connection for different things is screwing up the cursor, or causing the application to hang until the connection is free again.
    I've read some stuff about connection pooling with JDBC 2.0, but the need for the JINI calls is confusing to me.
    Can someone take a few minutes to describe the right way to get this to work with Java? I'm using the MSSQL JDBC driver availiable on Microsoft's site, but I didn't notice which version of JDBC it supports. It's Type 4 driver, but I don't know what that means either.
    Thanks in advance,
    Jim

    They're not JINI calls, they're JNDI calls - Java Naming and Directory Interface. They're just doing a lookup to get the data source from the connection pool.
    When you see it done that way, it's usually a container like Tomcat or WebLogic that's handling the connection pool for you. Are you using either of those, or were you going to try to write your own pooling mechanism?
    Type 4 driver means it's 100% pure Java, no native code. You can read all the different types at:
    http://java.sun.com/products/jdbc/driverdesc.html
    There's another driver at SourceForge jTDS for M$ SQL Server that's pretty good. I've used it with some success, switching away from the M$ implementation:
    http://jtds.sourceforge.net/
    Good luck. - MOD

  • SOA Suite 11g - Connection Pools constantly getting suspended...

    Hi,
    I have composites, bpel processes using database adapters.
    *I keep getting "+Pool mds-owsm is Suspended, cannot allocate resources to applications+"  and " Pool SOALocalTxDataSource is Suspended, cannot allocate resources to applications.." in soa_server logg.*
    There are no errors in db trace logs. It seems related to the WLS JDBC data sources, they are constantly getting suspended.
    After a while no new connections can be created, and managed soa server hangs. Restart is the only "solution" for now...
    I have increased "Maximum Capacity" on the connection pool to 300 without success.
    Any ideas, pointers, help appreciated.
    +<Jan 6, 2011 8:55:02 AM CET> <Error> <org.quartz.impl.jdbcjobstore.JobStoreCMT> <BEA-000000>+
    +<ClusterManager: Error managing cluster: Failed to obtain DB connection from data source 'soaNonManagedDS': java.sql.SQLException:+
    Could not retrieve datasource via JNDI url 'jdbc/SOALocalTxDataSource'*
    weblogic.jdbc.extensions.PoolDisabledSQLException: weblogic.common.resourcepool.ResourceDisabledException: Pool SOALocalTxDataSource is Suspended, cannot allocate resources to applications..org.quartz.JobPersistenceException:
    Failed to obtain DB connection from data source 'soaNonManagedDS': java.sql.SQLException:
    Could not retrieve datasource via JNDI url 'jdbc/SOALocalTxDataSource' weblogic.jdbc.extensions.PoolDisabledSQLException:
    weblogic.common.resourcepool.ResourceDisabledException: Pool SOALocalTxDataSource is Suspended, cannot allocate resources to applications..
    +[See nested exception: java.sql.SQLException: Could not retrieve datasource via JNDI url 'jdbc/SOALocalTxDataSource'+
    +weblogic.jdbc.extensions.PoolDisabledSQLException: weblogic.common.resourcepool.ResourceDisabledException: Pool SOALocalTxDataSource is Suspended, cannot allocate resources to applications..]+
    +     at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:167)+
    +     at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3167)+
    +     at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3811)+
    +     at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3847)+
    +<Jan 10, 2011 6:22:47 AM CET> <Warning> <oracle.wsm.resources.policyaccess> <WSM-06001> <Error obtaining Policy Set.+
    oracle.wsm.policymanager.PolicyManagerException: WSM-02079 : Failed to connect to Policy Manager instance due to error "java.rmi.Rem
    oteException: EJB Exception: ; nested exception is:
    oracle.mds.exception.MDSRuntimeException: MDS-00001: exception in Metadata Services layer
    MDS-00001: exception in Metadata Services layer
    +weblogic.common.resourcepool.ResourceDisabledException: Pool mds-owsm is Suspended, cannot allocate resources to applications..".+ at oracle.wsm.policymanager.client.PolicyAccessServiceDelegate.getPolicies(PolicyAccessServiceDelegate.java:136)
    at oracle.wsm.policyaccess.impl.cache.PolicyCacheImpl$BackTracingSynchronizationThread$1.run(PolicyCacheImpl.java:714)
    at oracle.wsm.policyaccess.impl.cache.PolicyCacheImpl$BackTracingSynchronizationThread$1.run(PolicyCacheImpl.java:711)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.security.jps.internal.jaas.AccActionExecutor.execute(AccActionExecutor.java:47)
    at oracle.security.jps.internal.jaas.CascadeActionExecutor$SubjectPrivilegedExceptionAction.run(CascadeActionExecutor.java:7
    +9)+
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.security.Security.runAs(Security.java:61)
    at oracle.security.jps.wls.jaas.WlsActionExecutor.execute(WlsActionExecutor.java:48)
    at oracle.security.jps.internal.jaas.CascadeActionExecutor.execute(CascadeActionExecutor.java:52)
    at oracle.wsm.policyaccess.impl.cache.PolicyCacheImpl$BackTracingSynchronizationThread.run(PolicyCacheImpl.java:710)
    Caused By: java.rmi.RemoteException: EJB Exception: ; nested exception is:
    oracle.mds.exception.MDSRuntimeException: MDS-00001: exception in Metadata Services layer
    MDS-00001: exception in Metadata Services layer
    +weblogic.common.resourcepool.ResourceDisabledException: Pool mds-owsm is Suspended, cannot allocate resources to applications..+ at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at oracle.wsm.policymanager.ejb.impl.PolicyAccessService_elx95s_IStringPolicyAccessServiceRemoteImpl_1033_WLStub.getPolicies
    AsStrings(Unknown Source)
    at oracle.wsm.policymanager.client.PolicyAccessServiceDelegate.getPolicies(PolicyAccessServiceDelegate.java:132)
    at oracle.wsm.policyaccess.impl.cache.PolicyCacheImpl$BackTracingSynchronizationThread$1.run(PolicyCacheImpl.java:714)
    at oracle.wsm.policyaccess.impl.cache.PolicyCacheImpl$BackTracingSynchronizationThread$1.run(PolicyCacheImpl.java:711)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.security.jps.internal.jaas.AccActionExecutor.execute(AccActionExecutor.java:47)
    at oracle.security.jps.internal.jaas.CascadeActionExecutor$SubjectPrivilegedExceptionAction.run(CascadeActionExecutor.java:7
    +9)+
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.security.Security.runAs(Security.java:61)
    at oracle.security.jps.wls.jaas.WlsActionExecutor.execute(WlsActionExecutor.java:48)
    at oracle.security.jps.internal.jaas.CascadeActionExecutor.execute(CascadeActionExecutor.java:52)
    at oracle.wsm.policyaccess.impl.cache.PolicyCacheImpl$BackTracingSynchronizationThread.run(PolicyCacheImpl.java:710)
    Caused By: oracle.mds.exception.MDSRuntimeException: MDS-00001: exception in Metadata Services layer
    MDS-00001: exception in Metadata Services layer
    weblogic.common.resourcepool.ResourceDisabledException: Pool mds-owsm is Suspended, cannot allocate resources to applications..
    at oracle.mds.internal.persistence.db.BaseReposAccess.<init>(BaseReposAccess.java:360)
    at oracle.mds.internal.persistence.db.shredded.ShreddedReposAccess.<init>(ShreddedReposAccess.java:274)

    Hi again,
    Thanks for the input, to answer your questions Anuj:
    Database
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    Middleware
    Oracle SOA Management 11.1.1.3.0
    Oracle SOA Infrastructure 11.1.1.3.0
    Oracle SOA Suite Patch 11.1.1.3.0
    Oracle SOA Common Adapters 11.1.1.3.0
    Enterprice Manager 11g Fusion Middleware Control 11.1.1.3.0
    And..
    Connection Creation Retry Frequency is set to "10"
    Test Connections On Reserve is enabled.
    Login Delay is stil set to 0 (by default), why should this value be other than 0?, wouldn't increasing it to 10 heavily slow down message-processing..?
    DB and SOA are not on same machine, no n/w issues.
    Regards
    Anders.

  • View # of current Connection of jdbc connection pool

    Do you guy know of ANY METHODS of viewing # of current database Connection of jdbc connection pool in SUNAPP SERVER?
    for example i have jdbc/Dashboard Connection Pool in SUNAPP SERVER and I wanted to view, at any point of time, how many connection database that it is being utilized during that time. The reason I wanted to see the # of currection jdbc connection is because my Max (400connections) ran out or hanging really long period of time.
    Thanks,
    Kelvin

    There is no way currently to do this

  • Can I create connection pool by oracle oci driver?

    Can I create connection pool by oracle oci driver?My weblogic's version is 6.1 sp2 and oracle is 9.0.1.2.
    I have some trouble with connection pool created by weblogic jDriver.
    I try to read Timestamp from table and I always get the exception.It told me that ORA-00932: inconsistent datatypes.
    So I created another pool by oracle thin driver and everything was right.Then I created other pool by oracle oci driver,but something were wrong. 'Could not create pool connection. The DBMS driver exception was:java.sql.SQLException: ORA-06401: NETCMN:Invalid driver designator'
    The oci pool's parameters are below lines.
    url: jdbc:oracle:oci:@COCO
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Properties: user=scott;password=tiger;protocol=oci
    If I get connection directly,don't use connection pool,I can get right connection.But why didn't I create pool by oci driver?Maybe weblogic7 or weblogic8 will work good?

    Venkat Amirineni wrote:
    Hi Joe,
    I am also trying to create a connection pool using Oracle Oci XA. Weblogic
    type 2 oci threads hanging on native calls and suggested to go for thin drivers.
    But we want to try with Oracle Oci drivers.. Can you please tell us how to
    create a conn pool using Oracle Oci.. Just the driverclass and url is enough
    or need any classpath settings etc..
    Thanks in advance for your quick reply.Hi. As far as driver properties, just use what Oracle says to. Any pool properties
    that we recommend for XA would still apply. Note that Oracle themselves recommends
    the thin driver over their OCI one:
    http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979.pdf
    Joe

  • Sun WebServer 6.1 SP4 Connection Pool Please Help

    Hi All,
    I really need your help, we are using Sun One Web server 6.1 SP4 with oracle 8i, recently we implemented server�s connection pool, but now after 2-3 hrs our web server is hanging and not responding to any request. Earlier I had max pool size 32 and I have increased it to 128 but still the same problem.
    Before Implementing server connection pool we were using custom connection pool and the problem we had with that, we did not had any of validating the connection before giving to user and due to that it use to create problems.
    I am lost and looking for some solutions please.
    Thanks
    Rajeev

    This is the code which we use for geting connection and closing connection.
    import javax.sql.*;
    import java.sql.*; //Connection class
    import javax.naming.*; //InitialContext
    public class ABCConnectionPool
         //public static synchronized Connection getConnection()
         public static Connection getConnection()
                   Connection connection = null;
              try{
                        InitialContext ctx = new InitialContext();
                        String dsName = "java:comp/env/jdbc/jdbc-sss";
                        DataSource ds = (javax.sql.DataSource)ctx.lookup(dsName);
         connection = ds.getConnection();
                        return connection;
                   catch(Exception e)
                        e.printStackTrace();
                   return connection;
                   //return null;
         public static void releaseConnection(Connection usedConnection)
              try
                        usedConnection.close();
              catch(Exception e)
                   e.printStackTrace();
         }//releaseConnection()
    }//class
    Where ever we need a coonection we call getConnection() method of above class and whenever we are done we call releaseConnection() method of this class. I really don't know in sun web server 6.1, what do I need to do to return the connection to pool?
    Another question I have is do we need to make getConnection() method synchronized?
    Thanks again for your help.
    Message was edited by:
    bplboy..

Maybe you are looking for

  • Item level data in sap script

    Hello Friends, I have a report which prints Normal Tax invoice & Returns Tax, I modified this report just by adding one extra "delivery channel". The report call one more program which dose the printing job based on the delivery no. The issue, I can

  • How do i always send from one email address, even when replying?

    Hello all I just moved to MAIL after 12 years of Eudora. I'm MAIL 2.1.3 in Mac OS 10.4.11 PPC. my problem People send emails to me at 2 different email addresses. Both of them are stored on two different servers, and thus two different POP setups. Le

  • IPhone 4 camera problem

    Hello, I have a serious problem with my iPhone 4 camera. See the linked picture. What's wrong with it? Can I fix it myself? http://img822.imageshack.us/i/vada.jpg/ Tomas Message was edited by: Tomas Srna

  • Customized JSP Page for LOV from a OAF Page

    We want a customized LOV page that will be a new JSP page instead of OAF JRAD XML. Right next to this new item we will put a link to open us this new JSP page. The base page is OAF page. When user selects the data from the new LOV JSP page, it has to

  • Can I place a html5 or flash video of a surfer in the header section?

    I have been asked to build a home page with a video of a surfer riding a wave at a fun surfing location. We think it would be cool for the web user to come to the home page and right away watch a surfer catching a wave and riding accross in the video