Implement Connection Pooling

Hi,
I want to create a pool of connection objects and when multiple users query the database, the connection should be returned from the pool to the different users. What is the best way to implement this? Could I use javax.sql package or dbcp classes to implement this? Please provide a suggestion.
Thanks

user13718790 wrote:
Hi,
I want to create a pool of connection objects and when multiple users query the database, the connection should be returned from the pool to the different users.It doesn't work like that. The connection cannot leave the application.
If you have a server with threads then each thread can have a different connection.

Similar Messages

  • Best way to implement connection pooling with tomcat4.0?

    Hi all!
    I need your help:
    What's the best way to implement connection pooling (Oracle Database) with tomcat 4.0?
    I only found ways to implement it in tomcat 4.1, not in 4.0....
    Thanks!
    Michael

    You can use a Datasource managed by tomcat. Earlier versions of tomcat used Exolab's Tyrex for the implementation of the Datasource API which uses connection pooling. Current version uses commons-dbcp and commons-pool (jakarta projects) I think.
    You've got to declare the Datasource in server.xml and then in web.xml of your web app.

  • How do I expand my simple JSP page to implement Connection Pooling?

    Hi everyone,
    I have a small SQL database which contains information about Students and a StudenBean which contains their attributes and appropriate get/set methods (which I haven't needed to use yet).
    I want to write a simple JSP page which displays all the students details in one big table. I can do this using the basic prototyping method of adding the dataSource and driver details to the deployment descriptor (web.xml - I'm using the latest version of Tomcat by the way) and then accessing the database using JSP standard SQL actions.
    Here's a snipet of what I've done (just an example, the final code works):
    <sql:query var="temp"
    sql="SELECT * FROM Employee ORDER BY UserName"
    />
    <c:forEach items="${temp.rows}" var="row">
    <td><c:out value ="${row.UserName}"/></td>
    <td><c:out value ="${row.FirstName}"/></td>
    <td><c:out value ="${row.LastName}"/></td>
    Now I want to upgrade! I want to access the dataSource using Connection Pooling and it's causing me a lot of trouble. I already have the required working classes/data such as ConnectionPool.java, ResourceManagerListener.java, the MySQL driver etc.
    However, I don't know what the best way to setup the connection for my purposes would be and where I should do it.
    Do I need to write a servlet or tag handler/custom action to establish the connection and access my bean through it? I would like to keep a similar sort of business logic as I already have developed i.e. be able to use actions in my JSP page to cycle through the database and print out each detail from the row.
    Rather confused and muddled. Thanks for any input!

    Good idea.
    Set up a JNDI data source for your app, according to these docs:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    You'll have to put the right information into your web.xml and a context.xml. Once you've done that, your JSTL JSPs will simply use the connection resource automagically.
    MOD

  • The best way to implement connect pool?

    Hi:
    In my web application, I use javabean to access database for JSP, Because a lot of poeple will access my site, I need coonection pool. Then, If I still use JSP,Is it right I should use javabean to access coonection pool? If it is, Am I need another connection pool bean? Or I should switch to Servlet , I might need write a ancestor servlet to access the pool, and other servlet extend the ancestor servlet. Is there other suggestion for me?
    I am a newer to java, any suggestion will be greatly appreciated!
    Thanks a lot!
    xufang

    Hi, Gregor
    Thanks for your reply, I instance my DBConnectionManager in the Bean's constructor as:
    connMgr= connMgr.getInstance();
    and in the bean's getConnection method, I request a connection provided by the pool as:
    Connection dbCon = connMgr.getConnection("idb");
    and and in the bean's execSQL method , I use the dbCon as:
    s = dbCon.createStatement( );
    ResultSet r = s.executeQuery(sql);
    The problem is when JSP go to bean.getConnection,it's all right. But when JSP execute bean.execSQL, There is always wrong because the dbConn I get from the bean's getConnection method if null ! Can you tell me what's the problem arrives?
    Thanks,
    xufang

  • Implementing Connection Pooling - WEB app

    Hi, I'm developing an application using tomcat as my server and the MVC model.
    I need to use connection pooling and I don't know how to do it... does anyone know how??? is there a manual or something? please, I really need help...

    Go to Jakarta's site, Commons project, download DBCP (database connection pool). Examples on the site. The only 'hard' part is setting up your JNDI entries for your J2EE container. But that is only difficult the first time you ever write a JNDI entry. After that, they are all very similar.
    Depending on your RDBMS, the vendor may also offer a connection pool, such as OracleConnectionPool.
    - Saish

  • SQLJ connection pool. How to implement/etc?

    Hi,
    Im currently using DefaultContext ctx = DefaultContext.getDefaultContext( ); I get one connection per session. But i would like to implement connection pooling. Can oracle handle this already. I have tried oracle.jdbc.pool and it doesnt seem to work. Do I have to write my own class for this? I have been researching for the last week and so many articles on how to do it, but no examples for sqlj.
    Thanks

    Thankyou for the feedback.
    (I was reading sections 86 to 104 in the Developers Guide for Oracle Toplink to find out about internal connection pools)
    postAcquireConnection
    PUBLIC: This event is raised on when using the server/client sessions. This event is raised after a connection is acquired from a connection pool.
    My understanding of this event is that it will execute every time some java code needs to obtain a connection from the pool to do a query on the database. Is there someway I can just apply the session settings on each database connection once, when the connection is created, rather than every time a connection is retrieved from the pool by a java thread. The overhead on the database will be very large, if every time a java thread performs a single database query and obtains a connection from the pool it has to execute my "alter session" command and then perform its, query before returning the connection back to the pool so that other java threads can use it.
    Thanks

  • Unable to create connection pooling

    hello everyone,
    i am trying to implement connection pooling with sybase as the database and tomcat 5 as the container. But this is the exception thats coming :
    javax.naming.NameNotFoundException: Name jdbc/TestDB2 is not bound in
    this Context
    My server.xml looks lilke this :
         <Context path="/DBTest2" docBase="DBTest2" debug="5" reloadable="true" crossContext="true" >
         <Logger classname="org.apache.catalina.logger.FileLogger"
              prefix="localhost_DBTest2_log." suffix=".txt" timestamp="true" />     
         <Resource name="jdbc/TestDB2" auth="Container" type="javax.sql.DataSource" />
         <ResourceParams name="jdbc/TestDB2">
              <parameter>
              <name>factory</name>
              <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
              </parameter>
              <parameter>
              <name>maxActive</name>
              <value>100</value>
              </parameter>
              <parameter>
              <name>maxIdle</name>
              <value>30</value>
              </parameter>
              <parameter>
              <name>maxWait</name>
              <value>10000</value>
              </parameter>
              <parameter>
              <name>username</name>
              <value>sa</value>
              </parameter>
              <parameter>
              <name>password</name>
              <value></value>
              </parameter>
              <parameter>
              <name>driverClassName</name>
              <value>com.sybase.jdbc2.jdbc.SybDriver</value>
              </parameter>
              <parameter>
              <name>url</name>
              <value>jdbc:sybase:Tds:172.16.12.84:2048/lnk_common_dd</value>
              </parameter>
         </ResourceParams>     
         </Context>
    This is my web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <description>MySQL Test App</description>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/TestDB2</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    this is my test.jsp
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:query var="rs" dataSource="jdbc/TestDB2">
    select id, foo, bar from testdata
    </sql:query>
    <html>
    <head>
    <title>DB Test</title>
    </head>
    <body>
    <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
    Foo ${row.foo}
    Bar ${row.bar}
    </c:forEach>
    </body>
    </html>
    Any help would be much appreciated as i am stuck with this since the last 2 days
    thanking you all in advance
    Bhavani

    Hi Karthikeyan,
    This is not the issue at all. I can open the management studio by the same login id and password and also i can make the database jdbc connection from plain java file.
    It does not give me any problem by them.
    I'm unable to find the actual problem. May be i'm missing something in connection pooling.
    Please help.
    Regards
    Mina

  • Connection pooling problem in TopLink with JBoss4.0.3

    Hi All
    I am using JBoss4.0.3SP1 with TopLink-10g(9.0.4.5) and Sybase as database. I am implementing connection pooling of JBoss with Sybase. I have done all the changes in JBoss mapping files.
    Now to enable connection pooling in TopLink I have set the <uses-external-connection-pooling> attribute in sessions.xml file to true and I have added <datasource> attribute corresponding to the datasource defined in JBoss. It is working fine but when I delete the username, password...etc attribute from the sessions.xml then I am not able to get the session from datasource.
    Can anyone tell me what to do or where I am making mistake? Any help on this will be appreciated

    I tried that code also but the project object that I am getting is null which is in this line
    DatabaseLogin login = (DatabaseLogin)mySession.getProject().getLogin();
    mySession is an object of oracle.toplink.sessions.Session interface but when I call this method then it returns me a null object of Project class, so I am getting NullPointerException error. I tried to do this stuff by many ways but I am always getting the NullPointereException in setLogin() method of Session. This is the stackTrace of the error.....
    java.lang.NullPointerException
    at oracle.toplink.publicinterface.Session.setLogin(Session.java:2871)
    at com.test.TestCon.executeQurey(TestCon.java:91)
    at org.apache.jsp.Test_jsp._jspService(org.apache.jsp.Test_jsp:55)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Unknown Source)
    Can you please tell me where I am wrong or any other way to do fix this problem.

  • How to create Connection pool in Tomcat 5

    present i am developing one web site in that i am using tomcat 5.
    i am trying to establish connection pooling in tomcat,i am facing some problems..
    tomcat throws the following exception ie.,
    cannot create JDBC Driver class for connect URL null.
    my code lik this
    i configured the web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>sqlserver</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    my server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server>
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
    <Resource auth="Container" name="sqlserver" type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sudha</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>sudha</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="sqlserver">
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:SQL</value>
    </parameter>
    <parameter>
    <name>validationQuery</name>
    <value>select * from employee</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>kpi</value>
    </parameter>
    <parameter>
    <name>factory</name>
    <value>org.apache.naming.factory.DbcpDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>kpi</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
    <Host appBase="webapps" name="localhost">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
    </Host>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
    </Service>
    </Server>
    and i studied the the tomcat documentation in that tomcat mentioned
    The configuration properties for Tomcat's standard data source resource factory (org.apache.naming.factory.DbcpDataSourceFactory) are as follows:
    driverClassName - Fully qualified Java class name of the JDBC driver to be used.
    maxActive - The maximum number of active instances that can be allocated from this pool at the same time.
    maxIdle - The maximum number of connections that can sit idle in this pool at the same time.
    maxWait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception.
    password - Database password to be passed to our JDBC driver.
    url - Connection URL to be passed to our JDBC driver. (For backwards compatibility, the property driverName is also recognized.)
    user - Database username to be passed to our JDBC driver.
    validationQuery - SQL query that can be used by the pool to validate connections before they are returned to the application. If specified, this query MUST be an SQL SELECT statement that returns at least one row.
    how to configure server.xml file
    and how to get the org.apache.naming.factory.DbcpDataSourceFactory
    please help me...this module is very very urgen to me..

    I spent many hours when i first implemented connection pooling trying to put it together. The information is scattered and the config has changed slightly from 5.0 to 5.5 etc. This is how I got it working in 5.5.17:
    * server.xml seems to be a wrong place for the pool configuration if you consider it to be an application specific thing. It might be a better idea to put it into C:\tomcat55\conf\Catalina\localhost\ConfigFileForYourWeapp.xml as follows:
    <Context path="/ClientLink" docBase="C:\eclipseWorkspace\PortfolioUI3\WebRoot">
          <Resource name="jdbc/testportfolios" auth="Container"
                         type="javax.sql.DataSource"
                         factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
                         username="****" password="******"
                         driverClassName="com.mysql.jdbc.Driver"
                         url="jdbc:mysql://192.168.0.101:3306/testportfolios?user=***********&password=***********&useUnicode=true&characterSet=swedish"
                         maxWait="10000" maxActive="30" maxIdle="10" removeAbandoned="true"
                         removeAbandonedTimeout="60" logAbandoned="true" testWhileIdle="true"
                         minEvictableIdleTimeMillis="4000"
                         timeBetweenEvictionRunsMillis="60000" validationQuery="SELECT '1'" />
          </Context>* Then add the following snippet into web.xml in your webapp directory:
    <resource-ref>
                    <description>Database pool defined in ClientLink.xml</description>
                    <res-ref-name>jdbc/testportfolios</res-ref-name>
                    <res-type>javax.sql.DataSource</res-type>
                    <res-auth>Container</res-auth>
               </resource-ref>* Next put the jdbc-driver jar in a place where tomcat can find it. That is common\lib. Note that the shared/lib does not work.
    * Get connections in java as follows:
                    try {
                         Context initCtx = new InitialContext();
                         DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/testportfolios");
                         this.connection = ds.getConnection();
                    } catch (NamingException e) {
                         throw new RuntimeException("Java naming exception when getting connection from tomcat pool: " + e.getMessage());
                    }I hope that this helps you to save the time I lost figuring this out!
    Message was edited by:
    Tomppu

  • Connection Pooling in Portal Environment..

    Hi...currently we are using Portal R2 9.0.2.0.1..
    but the portal is slow...
    My question is..
    How can we implement Connection Pooling in Portal..
    Because the Login Port (7777) and the Portal Home is different (7778)...so, how can we get the Login and Logout....
    Can anybody help?

    Hi there
    If you choosen webcache while installation then it will in installed for you.
    You can varify it via 9iAS Oracle Enterprise Manager.
    If not install it and configure it.
    Samir.

  • Connection Pooling in Core Java Application

    I need to implement Connection pooling in core java applications..
    My database is MySQL 5.0.27 and java version 1.5.0_09
    Any links or ideas will be really appreciated

    but i just wanted to know, how can i do that in core java application. i have used connection pooling in Tomcat using dbcp
    but these are my questions.
    1. How can i run a core java application doing TCP connection in an Application Server which has got Tomcat and i'm asked to do connection pooling in the Tomcat server.xml.. I didn't understand this requirement pls help me... plssssssssssss

  • Connection Pooling in Weblogic Server6.1

    Hi All..,
    I want to implement Connection pooling in my EJB application.When i use a oci
    driver i am getting the following error.Can anyone plz help me out?.
    Thanks & Regards.,
    B.Naveen Kumar
    Starting Loading jDriver/Oracle .....
    <Jul 2, 1999 12:57:04 PM IST> <Error> <JDBC> <Cannot startup connection pool "oraclePool"
    weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
    no weblogicoci37 in java.library.path
         at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
         at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:189)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy45.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy66.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
         at weblogic.management.Admin.finish(Admin.java:561)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
         at weblogic.Server.main(Server.java:35)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:205)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy45.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy66.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
         at weblogic.management.Admin.finish(Admin.java:561)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
         at weblogic.Server.main(Server.java:35)
    >

    This url will help you set the library path correctly:
    (I am not sure which os you are seeing!!)
    http://e-docs.bea.com/wls/docs61/oracle/install_jdbc.html
    "Naveen Kumar" <[email protected]> wrote:
    >
    Hi All..,
    I want to implement Connection pooling in my EJB application.When i use
    a oci
    driver i am getting the following error.Can anyone plz help me out?.
    Thanks & Regards.,
    B.Naveen Kumar
    Starting Loading jDriver/Oracle .....
    <Jul 2, 1999 12:57:04 PM IST> <Error> <JDBC> <Cannot startup connection
    pool "oraclePool"
    weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
    no weblogicoci37 in java.library.path
         at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
         at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:189)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy45.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy66.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
         at weblogic.management.Admin.finish(Admin.java:561)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
         at weblogic.Server.main(Server.java:35)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:205)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy45.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
         at $Proxy66.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
         at weblogic.management.Admin.finish(Admin.java:561)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
         at weblogic.Server.main(Server.java:35)
    >

  • Urgent regarding connection pooling

    Please can someone thorw some light on how to implement connection pooling in simple way. I have seen lots of code snippet and did lots of reading.
    I need to know about how many classes i would need. and how do i use the classes.
    If someone can provide code snippet then that would be great
    thanks..please consider it to be urgent.

    Why reinvent the wheel?
    Most JDBC drivers will have connection pooling already implemented, and you just need to use it.
    You should be using the interface javax.sql.DataSource
    http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/DataSource.html
    The recommended approach in Java/JSP is to have a DataSource object accessed via JNDI.
    Most servlet containers will let you define JNDI datasources to access the database connections from your app.
    For instance Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    Good luck,
    evnafets

  • NameNotFOundException in OC4J Connection Pool

    Hi,
    I am trying to implement connection pooling in OC4J.I modified the data-sources.xml file as follows:
    <!-- DataSource for Connection Pooling for MD Database -->
    <managed-data-source name="MDDS"
    connection-pool-name="SampleConnectionPool"
    jndi-name="jdbc/MDDS"/>
    <connection-pool name="SampleConnectionPool"
         min-connections="10"
         max-connections="100"
         inactivity-timeout="30">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
    user="xxx"
    password="xxx"
    url="jdbc:oracle:thin:@//localhost:1521/zzz">
    </connection-factory>
    </connection-pool>
    My Java Coding is as follows:
    javax.naming.InitialContext ic = new javax.naming.InitialContext();
         javax.sql.DataSource dataSource = (javax.sql.DataSource)ic.lookup("jdbc/MDDS");
         con = dataSource.getConnection();
    While executing the above code,I am getting "javax.naming.NameNotFoundException : jdbc/MDDS not found..
    Am I missing any step?.Thanks.

    Have you restarted the container?

  • 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

Maybe you are looking for

  • Improve Image after Scan with Adobe Acrobat 9.3 ?

    Hi folks, I frequently scan multiple documents directly from the scanner using an ADF - so I often have piles of docs of many pages. I can adjust the scanner settings to make most of them look good but sometimes there are pages that should be improve

  • Object Program Name of class RE and language EN does not exist

    Hi, I'm encoutering this problem. Object <Custom Program Name> of class RE and language EN does not exist This appears when i am executing the report . Has anyone encoutered this? How did you resolve this problem? Any pointers in this regard are appr

  • Strange disk showing in Disk Utility

    After doing several updates recently on my MacBook Air, decided to run a Disk Permissions Repair. Upon opening Disk Utility, I see my HD, then a grey horizontal line, and under that I see: decryptedFile.dmg then an icon of Flash Player under that. Se

  • Where is the link to the 64-bit version of iTunes?

    The error message: http://farm3.static.flickr.com/2071/188587068890478f8c0fo.jpg indicates that there is a 64-bit installer for Windows. Where is it? I can't seem to find it. +*"This iPod can not be used because the required software is not installed

  • Advantages of installing EP and AS-ABAP in different systems

    what are the advantages and dis advantages of instaling AS-ABAP and EP in different Systems