What's a realible connection pooler component ?

Hi all,
I want to use a connection pooler inside my application.
Could anybody spot me some reliable connection pooler component ?
Cheers.
Stefano

First check if your database vendor doesn't already have one. The major vendors (DB2, MySQL, PostgreSQL, Oracle, MSSQL) at least have one. If there isn't, or you want more portability, then consider Apache Commons DBCP.

Similar Messages

  • How do I find out what is using a connection pool

    This morning weblogic 8.1.5 complained it couldn't expand a connection pool because it had reached is max concurrent connects limit.
    The issue I have is that I don't actually know what is using the connection pool. It should be defunct and redundent but obviously not.
    This caused all the threads to be consumed and the managed server hung.
    Does anyone know wether it's possible to interigate the pool to find out what it's doing ? I can't check the db as it's managed by another company and I have a v limited read only account.... I can't even select from v&session.
    Cheers in advance for any help.

    Dave Snaith wrote:
    This morning weblogic 8.1.5 complained it couldn't expand a connection pool because it had reached is max concurrent connects limit.
    The issue I have is that I don't actually know what is using the connection pool. It should be defunct and redundent but obviously not.
    This caused all the threads to be consumed and the managed server hung.
    Does anyone know wether it's possible to interigate the pool to find out what it's doing ? I can't check the db as it's managed by another company and I have a v limited read only account.... I can't even select from v&session.
    Cheers in advance for any help.If the pool is not supposed to be used, disable it via the console,
    and whatever applications are still trying to use it will get
    quick exceptions.
    Joe

  • Global Connection Pool?

    Hello,
    Maybe this is not a specific OCCI question, sorry if this is not the best place to post this.
    Well, the point is I wanted please an opinion on witch is the best way to optimize (ie, limit the number of) the connections to the server in the following scenario: we have one database, multiple (in the order of hundreds) of clients that use many different applications and keep them open for most of the time (and in fact this is the problem, there are too many connections...);
    Most of the applications use the same business-logic component, that makes the connection to the database. I wanted to implement something like a timeout for the idle connections, but Ithink that disconnecting/reconnecting all the time would be slow. Then I came to the topic of a connection pool, but from what I understood a connection pool applies to only one process, right? What I wanted to achieve is something like a "global" connection pool, since all applications use the same component to access the data it just this component needs to be altered.
    My idea was then this: create another component (exe) that maintains a connection pool that is shared by many applictions (sure, I would write this in COM/ATL and it has to be a free threaded component); Then when some application needs to query for some data it simply instantiates a connection, uses it and releases it. The only real "operations" we need is query and update/insert of data, so it wouldn't be so difficult to implement a connection and a resultset objetct. Sure, we in this case there would be a constant communication between both applications (via COM), maybe it would slow it down a bit but since our applications are not so "real-time" and the bottleneck resides more in the server I thnk this wouldn't be an issue...
    My question is: is this a good idea, is it insane, or there exists another easier-better way to optimize our scenario, ie, reduce the number of connections used by multiple processes?
    Thanks,
    Tiago Gehring

    Hi everbright,
    I prefer NOT to make a JDBC connection pool a global resource. After all, if you have several applications on the same Tomcat instance you might not want them all to hit the same database. Better to make it a context-specific thing.
    I don't edit the server.xml - ever. I create the context XML in a separate file and deploy it with my WAR file. Tomcat picks it up automatically. Now my apps are nice and self-contained, and I don't have to ask a server admin to modify anything.
    Got the DBCP JAR in your WEB-INF/lib?
    This URL looks incorrect to me if you're using the Oracle JDBC driver:
    jdbc:oracle:thin:[email protected]:1521:DEVI think it should be:
    jdbc:oracle:thin:@127.0.0.1:1521:DEVLooks like you're trying to do this in a JSP. Have you tried moving the database code out of the JSP and into a JavaBean, where it belongs? You can test the database connection offline that way. Get it working and then worry about Tomcat.
    When I do a JNDI lookup, the Java code looks like this:
        /** Default JNDI lookup name for all data sources */
        public static final String DEFAULT_LOOKUP    = "java:comp/env/jdbc/APIPrototype";
         * Create a DatabaseBroker
         * @param lookup for data source
         * @throws NamingException if the lookup fails
         * @throws SQLException if the connection fails
        public DatabaseBroker(String lookup) throws NamingException, SQLException
            Context context = new InitialContext();
            DataSource ds   = (DataSource)context.lookup(lookup);
            this.connection = ds.getConnection();
            context.close();
        }I know this works, because it's been running in production under Tomcat 4.1.30 connecting to Oracle 9i for over a year.
    You can do this.
    %

  • Connection Pooling in Tomcat 4.1.18

    Hi,
    Can anyone point me to a decent resource on how to implement Oracle connection pooling in Tomcat? I'm using the UltraSearch API's for an application and cannot get it to work correctly with the DBCP implementation that I currently use.
    Many thanks,
    Mark.

    Mark,
    What kind of Oracle Connection pooling are your refering to? Are you talking about BC4J connection pooling?

  • How to Troubleshoot the Connection Pool Exception?

    Dear Oracle Gurus, very good afternoon to you.
    I'm looking forward for some tips/troubleshoting guide to escape from the below exception, that occres very frequently to one of application that 100+ users will login from different locations & work on and update the data and save their work, where all in sudden they can't acces the application and it gets down.
    Most of the times in the server log I observed below.
    weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool RemoteDesktop.main to allocate to applications, please increase the size of the pool and retry..
    Please help me on, how to overcome this kind of exception.
    In Weblogi c server I see below kind of Warnings.
    If you set the buffer size to zero in a servlet, it would fail to respond and would initiate an infinite loop in the server. WebLogic Server would ultimately display a Errors:
    ExecuteThread: '157' for queue: 'weblogic.kernel.Default' has been busy for "633" seconds working on the request "Http Request: : ../updates/process_manager.jsp", which is more than the configured time (StuckThreadMaxTime) of "600" seconds.
    I searched over google for this kind of error, See otherusers posted the same kind of errors but didn't have any positive replies to troubleshoot this issue.
    I also got Oracle Dev link on Weblogic version upgrade product where they fixed similar kind of error it seems. Which is shown below.
    http://docs.oracle.com/cd/E13222_01/wls/docs61/notes/bugfixes2.html -- BUG # CR106186
    details:
    "Suspend Checker Thread" prio=10 tid=0x23eb90 nid=0xfec runnable
    <May 14, 2003 10:53:34 AM PDT> <Warning> <WebLogicServer> <000337>
    <ExecuteThread: '10' for queue: 'default' has been busy for "1,181" seconds working on the request "Http Request: servlet_uri", which is more than the configured time (StuckThreadMaxTime) of "600" seconds.>
    This problem was solved with a code fix.
    Looking forward for some help, Thank you inadvance.
    FYI..
    I'm using oracle thin driver JDBC connection/Weblogic 8.1
    Edited by: user1072948 on Apr 26, 2012 11:55 AM

    I agree that looking into the number of connections that you have open when you see
    weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool RemoteDesktop.main to allocate to applications, please increase the size of the pool and retry..
    would be a good idea; but I would suggest that you don't increase without thinking about the consequences. I would look more closely at what the connections to the database are doing, for instance, how long are the connection being left open for? What are the queries that are being run? Should you expect to see all the connections in the connection pool being used? What is the current connection pool limit? Are you simply going to increase the number of connections to find that they are also waiting? What is the load on the database at the time?
    It's the other error that you say you see
    ExecuteThread: '157' for queue: 'weblogic.kernel.Default' has been busy for "633" seconds working on the request "Http Request: : ../updates/process_manager.jsp", which is more than the configured time (StuckThreadMaxTime) of "600" seconds.
    What does this JSP do? Why would this be busy for so long? Is it related to the previous exception that you have? I'd ask you delevelopment team to look into this.
    In short, it sounds like you have load issues on your server(s) and a careful tuning of the system after a full analysis (thread dumps, heap profiling, connection pool monitoring and code review) would probably be beneficial. It may be that restricting the thread pool may help, it may be that increasing the connection pool would help. I'd not plump for a quick fix here.

  • Which connection pooling mechanism?

    Just a general question regarding open source connection pooling, I have done some research on my own, however, I am unable to find a comparative article. I am not trying to start a religious post, but what is the best connection pooling tool and why? dbcp/c3p0/ConnectionBroker/etc. Thank you.

    ....but what is the best connection pooling tool and why?The one that has the most features that meet the need of the business whose problems you are attempting to solve.
    As for why because the business needs solutions which are cheaper, faster, easier to maintain and meet more business needs to remain competitive so that they can continue to pay your salary.

  • What's the difference between using a connection pool and a datasource

    Howdy. I figure this is a newbie question, but I can't seem to find an
    answer.
    In the docs at bea, the datasource docs say
    "DataSource objects provide a way for JDBC clients to obtain a DBMS
    connection. A DataSource is an interface between the client program and the
    connection pool. Each data source requires a separate DataSource object,
    which may be implemented as a DataSource class that supports either
    connection pooling or distributed transactions."
    In there it says the datasource uses the connection pool, but other than
    that, what is the difference between a connection pool and a datasource?

    Thanks for the info. I think it makes some sense. But it's a bit greek.
    I'm sure it'll make more sense the more I work with it. Thanks.
    "Chuck Nelson" <[email protected]> wrote in message
    news:3dcac1f5$[email protected]..
    >
    Peter,
    Here is a more formal definition of a DataSource from the Sun site
    "A factory for connections to the physical data source that thisDataSource object
    represents. An alternative to the DriverManager facility, a DataSourceobject
    is the preferred means of getting a connection. An object that implementsthe
    DataSource interface will typically be registered with a naming servicebased
    on the JavaTM Naming and Directory (JNDI) API.
    The DataSource interface is implemented by a driver vendor. There arethree types
    of implementations:
    Basic implementation -- produces a standard Connection object
    Connection pooling implementation -- produces a Connection object thatwill automatically
    participate in connection pooling. This implementation works with amiddle-tier
    connection pooling manager.
    Distributed transaction implementation -- produces a Connection objectthat may
    be used for distributed transactions and almost always participates inconnection
    pooling. This implementation works with a middle-tier transaction managerand
    almost always with a connection pooling manager.
    Does that help clarify the distinction?
    Chuck Nelson
    DRE
    BEA Technical Support

  • What is the usual way of accessing Oracle by JSF with connection pooling?

    I am writing to access Oracle by JSF with connection pooling.
    EJB is too difficult for me.
    What is the simple way of doing it?
    thanks

    Leung,
    I believe there should be some sample code available via the JavaServer Pages Samples Web page.
    Good Luck,
    Avi.

  • What about session memory when using BEA Weblogic connection pooling?

    Hi,
    consider a web application, allowing database connections via a BEA Weblogic 8.1 application server. The app-server is pooling the oracle connections. The oracle database is running in dedicated server mode.
    How are the database requests from the web app served by the connection pool from BEA?
    1) Does one oracle session serve more than one request simultanously?
    2) Does BEA serialize the requests, which means, that a session from the pool is always serving only one request at a time?
    If (1) is true, than what about the session memory of Oracle sessions? I understand, that things like package global variables are beeing stored in this session private memory. If (1) is true, the PL/SQL programmer has the same situation, as with programming an Oracle databas in "shared server" mode, that is, he should not use package global variables etc.
    Thankful for any ideas...
    Message was edited by:
    Xenofon

    Xenofon Grigoriadis wrote:
    Hi,
    consider a web application, using BEA between client and an Oracle Database (v9i). BEA is pooling the oracle connections. The oracle database is running in dedicated server mode.
    How are the database requests from the web app beeing served by the connection pool from BEA?
    1) Does one oracle session serve more than one request simultanously?no.
    2) Or does BEA serialize the requests, which means, that a session from the pool is always serving only one request at a time?
    Reading "Configuring and Using WebLogic JDBC" from weblogic8.1 documentation, I read:
    "... Your application "borrows" a connection from the pool, uses it, then returns it to the pool by closing it...."
    What do you mean by returning the connection by closing it? Tbe server will either return the connection to the pool or close it...When application code does typical jdbc code, it obtains
    a connection via a WebLogic DataSource, which reserves an
    unused pooled connection and passes it (transparently wrapped)
    to the application. The application uses it, and then closes
    it. WebLogic intercepts the close() call via the wrapper, and
    puts the DBMS connection back into the WebLogic pool.
    The reason, why I as an Oracle programmer ask this is, because every session (=connection)
    in Oracle has its own dedicate, private memory for things like global PL/SQL variables.
    Now I want to figure out, if you have to careful in programming your databases, when
    one Oracle session (=connection) is serving many weblogic requests.It is serving many requests, but always serially. Do note however, that we
    also transparently cache/pool prepared and callable statements with the
    connection so repeat uses of the connection will be able to get already-made
    statements when they call prepareStatement() and prepareCall(). These
    long-lived statements will each require a DBMS-side cursor.
    >
    Thankful for any ideas or practical experience...
    Message was edited by:
    mk637Joe

  • Help please: What gets pinged - Connection Pool

    I have a connection pool set up and can "ping" it, but I cannot seem to use it in my application.
    What exactly gets "pinged" (what address)?
    For example, my setup looks like this:
    Data Source Class Name - net.sourceforge.jtds.jdbcx.JtdsDataSource
    Resource Type - javax.sql.XADataSource
    serverName - localhost
    port - 1433
    datasourceName - jdbc/testSqlServerDatasource
    databaseName - testdatabase
    Under the connection pools in the Application Server Admin Console, I can "ping" this connection.
    When I go out to a DOS prompt and try to ping, I cannot. What I tried was:
    ping localhost:1433/jdbc/testSqlServerDatasource
    ping localhost:1433/testSqlServerDatasource
    ping localhost/testSqlServerDatasource
    What exactly should I be able to "ping"?
    Note too that I have a JDBC Resource set up (also using the Admin Console) with a JNDI Name of testSqlServerDatasource.
    Thanks.

    The Ping in connection pool actualy tries to establish the connection with the database for which the configuration is provided in the Connection Pool page. The ping on DOS command is not same with what you actualy do in Connection Pool page. The DOS ping "helps in determining TCP/IP Networks IP address as well as determine issues with the network and assists in resolving them".

  • What jar contains weblogic.jdbc.pool.Driver connection pool class?

    Hi all,
    I am trying to use the JDeveloper IDE to generate code that I'll deploy on WebLogic
    6.1.
    I want to add the necessary files to the JDeveloper classpath so that during development
    it can use my
    weblogic connection pool. I've looked all over and can't seem to find it. It's
    not in weblogic.jar. Anyone know
    what file contains weblogic.jdbc.pool.Driver?
    Thanks in advance,
    Norm

    Thanks. I don't know how I missed it in the first place.
    "Sree Bodapati" <[email protected]> wrote:
    weblogic.jar
    sree
    "Norm Heske" <[email protected]> wrote in message
    news:3ba246c2$[email protected]..
    Hi all,
    I am trying to use the JDeveloper IDE to generate code that I'll deployon
    WebLogic
    6.1.
    I want to add the necessary files to the JDeveloper classpath so thatduring development
    it can use my
    weblogic connection pool. I've looked all over and can't seem to findit.
    It's
    not in weblogic.jar. Anyone know
    what file contains weblogic.jdbc.pool.Driver?
    Thanks in advance,
    Norm

  • What ACLs need to be defined to dynamically create connection pools?

    Hi,
    What ACLs do I need to define in order to dynamically (i.e. programatically)
    create connection pools? I've spent several hours reading doc
    and searching on the web but found nothing.
    I have defined the following:
    weblogic.allow.admin.weblogic.jdbc.connectionPoolcreate=someId
    But I still get the following exception when I try to invoke jdbc.createPool(aWeblogicPoolProperties);//jdbc
    is an instance of weblogic.jdbc.common.JdbcServices:
    java.lang.SecurityException: User "guest" does not have Permission
    "modify" based on ACL "weblogic.jndi.weblogic.jdbc.connectionPool"
    Can someone PLEASE list the ACLs I'd need to define for this to
    work?
    Thanks much,
    Andrew

    I'd like to know the answer to your question as well.
    On page 4-7 of the Programming WebLogic JDBC, the manual says to "modify the following
    ACLs to set up security configuration that supports the dynamic creation of connection
    pools.
    * acl.admin.dynapool
    * acl.admin.weblogic.jdbc.connectionPoolcreate
    * acl.modify.weblogic.jndi.weblogic.jdbc.connectionPool
    * acl.lookup.weblogic.jndi.weblogic.jdbc.connectionPool
    * acl.reserve.dynapool"
    These ACL's are not in my ACL list on my WLS6.1. So how can I modify these when
    they don't exist for me?
    thanks,
    Dennis
    "Andrew" <[email protected]> wrote:
    >
    Hi,
    What ACLs do I need to define in order to dynamically (i.e. programatically)
    create connection pools? I've spent several hours reading doc
    and searching on the web but found nothing.
    I have defined the following:
    weblogic.allow.admin.weblogic.jdbc.connectionPoolcreate=someId
    But I still get the following exception when I try to invoke jdbc.createPool(aWeblogicPoolProperties);//jdbc
    is an instance of weblogic.jdbc.common.JdbcServices:
    java.lang.SecurityException: User "guest" does not have Permission
    "modify" based on ACL "weblogic.jndi.weblogic.jdbc.connectionPool"
    Can someone PLEASE list the ACLs I'd need to define for this to
    work?
    Thanks much,
    Andrew

  • At what point should the storage pool be connected to a replacement DPM server?

    I have backed up the DPMDB and  SQL DB from our "old" DPM server, removed it from the domain, and installed the same version, DPM 2007, SP1, on a new server with the same FQDN.  At what point do I connect the storage pool to the new server? 
    Before restoring the db, or after restoring the db but before doing a dpmsync?  Nowhere in the sea of documentation on migrating and upgrading have I found that little detail mentioned.  Please help!

    Mike, I'm doing another DPM rebuild and upgrade, and I connected the storage pool too soon.  Can I save the situation, or do I need to detach the disks, uninstall DPM, delete the db, reinstall, restore the db from the previous backup, and then attach
    the disks and sync?  Thank you! 

  • What is Connection Pooling

    Hi Friends
    What is "Connection Pooling"
    I am developing Java Application using ms sql server 2000 database
    Pl explain me about this
    thanxinadvance
    yours
    Rajesh

    In a basic DataSource implementation, there is a 1:1 correspondence between the
    client�s Connection object and the physical database connection. When the
    Connection object is closed, the physical connection is dropped. Thus, the
    overhead of opening, initializing, and closing the physical connection is incurred for
    each client session.
    A connection pool solves this problem by maintaining a cache of physical database
    connections that can be reused across client sessions. Connection pooling greatly
    improves performance and scalability, particularly in a three-tier environment where
    multiple clients can share a smaller number of physical database connections.
    Nitin

  • What is the problem in my Connection Pool ???

    Hello,guys:
    My using connection pool is in trouble,it always dies and does't output any error messages(can not get an available connection),so I should restart my Tomcat(4.1),
    The following code in Login.jsp page initializes the pool :
    <%
         ConnectionPool cp = ConnectionPool.getInstance();
         try{
              if(cp.pool == null){
                   cp.initialize(50,5000);
                   System.out.println("Pool hava been initilized");
         catch(Exception e){
              System.out.println("ERROR:"+e);
    %>and,call the following code in other JSPs and Servlets to use a connection got from the pool
    ConenctionPool cp = ConnectionPool.getInstance();  // get an instance of ConnectionPool
    Connection con = cp.getConnection();               //get a connection
    Statement stmt = con.createStatement();           
    stmt.close();                                     
    cp.releaseConnection(con);                         //release the connection and push to the pool-----start of ConnectionPool.java----------
    package mrp.util;
    import java.util.Stack;
    import java.sql.Connection;
    import java.sql.SQLException;
    import java.sql.DriverManager;
    import java.util.Enumeration;
    public final class ConnectionPool {
        public Stack pool;
        private long timeout;
        private static ConnectionPool mySelf;
        private Connection con;
        private ConnectionPool() {
        public static ConnectionPool getInstance(){
         if(mySelf == null){
             mySelf = new ConnectionPool();
         return mySelf;
        public synchronized void initialize(int numCons,long timeout) throws SQLException{
         if(pool != null){
             throw new SQLException ("Pool already initialized");
         try{
             this.timeout = timeout;
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
             pool = new Stack();
             for(int i=0 ; i < numCons;i++){
              pool.push(DriverManager.getConnection("jdbc:odbc:MRPII","sa","112233"));
         catch(ClassNotFoundException ex){
             throw new SQLException("Driver not found!!!");
        public synchronized Connection getConnection() throws SQLException{
         if(pool == null){
             throw new SQLException ("Pool not initialized");
         while(pool.empty()){
             try{
              wait(timeout);
             catch(InterruptedException ex){
              throw new SQLException ("Connection not available");
         con = (Connection) pool.pop();
         return con;
        public synchronized void releaseConnection(Connection con) throws SQLException {
         if(pool == null){
             throw new SQLException ("Pool not initialized");
         pool.push(con);
         notifyAll();
        public synchronized int getConnectionCount() throws Exception{
         return pool.size();
        public void destroyPool() throws SQLException {
         if(pool == null){
             throw new SQLException("Pool not initialized");
         while(!pool.empty()){
             ((Connection)pool.pop()).close();
             pool = null;
    }-----End of ConnectionPool.java----------
    Any suggestions? Thanks

    a) call notifyAll after you finish initialize
    instad you may wish to use your own releaseConnection per connection. so getConnection will work after one connection...
    b)
    for(int i=0 ; i < numCons;i++){
    releaseConnection(DriverManager.getConnection("jdbc:odbc:MRPII","sa","112233"));
    c) use an single instance rather than a static myPool. it will avoid confusion between the static and instance lock.
    d) use a private constructor
    d) call the initialize from getInstance() for sake. too much client code.

Maybe you are looking for