Connection Pooling in EJBContainer if Driver already implements

Hi,
Can anybody explain the mechanism in an EJBContainer if the Driver for a particular database already implements the Connection pooling ie JDBC2.0X feature. Does the EJBContainer utilize the already pooled connections or the Container uses it own implementation of the pooledConnection interface.
Thanks in advance
neo

the Container uses it own implementation of the pooledConnection interface.
you have to make connection pool in the property file
in weblogic we make connection pool in the weblogic.property file
which server u r using

Similar Messages

  • Difference between using app server connection pooling and using the driver

    Hi all,
    How to get connection pooling with out application server and tomcat also?
    What is the difference between using app server connection pooling and using the driver supported connection pooling?
    Regards,
    Murali

    maybe the performance of App server pool is better than the JDBC pool,
    for you don't know wether the implementation of the JDBC interface is good or bad.

  • 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

  • JDBC20 connect pool issue using OCI driver

     

    I tried to use:
    url=jdbc20:weblogic:oracle.
    driver=weblogic.jdbc20.oci.Driver
    and got the following error:
    <Jul 11, 2001 5:52:34 PM PDT> <Error> <JDBC Connection Pool> <Cannot
    startup connection pool "ExrGlobalDbPool" Cannot load driver class:
    weblogic.jdbc20.oci.Driver>
    "Chuan Li" <[email protected]> wrote in message news:<[email protected]>...
    If you use the driver provided by Oracle, then use the following:
    url=jdbc:oracle:oci8:
    driver=oracle.jdbc.driver.OracleDriver
    "Jeff Guo" <[email protected]> wrote:
    Hi,
    What is the correct way to define the url in the jdbc connection pool
    to
    support jdbc20
    features using Oracle OCI driver?
    Thanks!
    Jeff

  • Connection Pool Failure: "No suitable driver"

    Hi,
    Upon server startup, I get the following result:
    <Nov 7, 2001 4:18:32 PM CST> <Error> <JDBC> <Cannot startup connection pool "ora
    cleTrufflePool" No suitable driver>
    I assumed it was a path problem, but in the startWebLogic.cmd script I've set the PATH and CLASSPATH variables to the same as in a separate command window that can successfully dbping the Oracle db.
    One thing I completely don't understand is what the URL value should be for the pool, and I can't see a pattern in the examples and docs I've found on this. Here are my pool settings, at any rate:
    Name: oracleTrufflePool
    URL: myOracleServerName
    Driver Classname: weblogic.jdbc.oci.Driver
    Properties:
    user=user
    password=password
    server=myOracleServerName
    ACLName: user
    Password: password
    As you can see, I also don't understand whether the Oracle user name and password must be duplicated in the Properties section, or should they really only be listed in the ACLName and Password fields (in the Server Console UI)?
    TIA,
    Steve

    Hi. The issue is that the URL you give is not the URL the driver (weblogic.jdbc.oci.Driver)
    wants. The URL should be "jdbc:webLogic:oci". The properties user, password and server
    will be passed to the driver for conenction attempts. The ACL is for who gets to use the
    pool, and the other password entry is only if you need the DBMS password to be encrypted
    in the XML. If so, set that password value, and don't have it in the driver properties.
    Joe
    Steve Clark wrote:
    >
    Hi,
    Upon server startup, I get the following result:
    <Nov 7, 2001 4:18:32 PM CST> <Error> <JDBC> <Cannot startup connection pool "ora
    cleTrufflePool" No suitable driver>
    I assumed it was a path problem, but in the startWebLogic.cmd script I've set the PATH and CLASSPATH variables to the same as in a separate command window that can successfully dbping the Oracle db.
    One thing I completely don't understand is what the URL value should be for the pool, and I can't see a pattern in the examples and docs I've found on this. Here are my pool settings, at any rate:
    Name: oracleTrufflePool
    URL: myOracleServerName
    Driver Classname: weblogic.jdbc.oci.Driver
    Properties:
    user=user
    password=password
    server=myOracleServerName
    ACLName: user
    Password: password
    As you can see, I also don't understand whether the Oracle user name and password must be duplicated in the Properties section, or should they really only be listed in the ACLName and Password fields (in the Server Console UI)?
    TIA,
    Steve

  • Error in creating Connection Pool using Oracle Thin Driver

    Hi,
    I am trying to create a connection pool in WS 5.1 with sp #6 using Oracle Thin Driver (oracle.jdbc.driver.OracleDriver) on a Sun box. But I am able to create the pool using weblogic.jdbc.oci.Driver. I get an DBMS Driver exception when I use thin driver. I have LD library path and weblogic class path set correctly. WL shows the following exception :
    weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the
    connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    Any help on this is greatly appreciated.
    Thanks,
    Ramu

    Hi Ramu,
    Please post your connection pool setting here. You might have missed some
    port/server info. The driver is unable to connect to the db server here.
    sree
    "Ramu" <[email protected]> wrote in message
    news:3d5bbc3a$[email protected]..
    >
    Yes. I am trying to create a connection pool in weblogic and I have theweblogic
    class path setup correctly. It points to classes111.zip andnls_charset11.zip.
    >
    -Ramu
    "Neo Gigs" <[email protected]> wrote:
    Did you setup the JDBC library classpath correctly?
    For me, e.g. Oracle 7.3.4, the classpath should be:
    export CLASSPATH = /oracle7.3.4/jdbc/lib/classes.zip:%CLASSPATH%
    Noted that the JDBC classpath must be the first classpath element in
    the export
    statement.
    Neo

  • No connection pool with oracle thin driver

    Hi all,
    whenever I try to set up my server as target for an Oracle connection pool on OPracle
    8.1.7, I get the following exception:
    java.sql.SQLException: Illegal Arguments
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:189)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:193)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:134)
    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:623)
    The Oracle driver classes12.zip is the very first in my classpath, connection pool
    settings are:
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    Name="Oracle Connection Pool"
    Properties="dll=ocijdbc8;USER=zapper;protocol=thin;PASSWORD=oracle"
    TestTableName="CABIN" URL="jdbc:oracle:thin:@192.168.0.2:1521:eins"/>
    Do I need any additional software besides the driver and weblogic??
    Thx
    Christian

    You're welcome :)
    Regards,
    Slava Imeshev
    "Christian" <[email protected]> wrote in message
    news:[email protected]...
    >
    That worked!
    Thx
    "Slava Imeshev" <[email protected]> wrote:
    Hi Christian,
    There is a couple of problems with the pool definition.
    First, the connection pool and datasource names can't
    contain spaces. Second, USER and PASSWORD
    should be in lower case, i.e. user and password accordingly.
    Regards,
    Slava Imeshev
    "Christian" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    whenever I try to set up my server as target for an Oracle connectionpool
    on OPracle
    8.1.7, I get the following exception:
    java.sql.SQLException: Illegal Arguments
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:189)
    at
    oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
    atoracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
    EnvFactory.java:193)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Connection
    EnvFactory.java:134)
    at
    weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j
    ava:698)
    at
    weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282
    at
    weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623
    The Oracle driver classes12.zip is the very first in my classpath,connection pool
    settings are:
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    Name="Oracle Connection Pool"
    Properties="dll=ocijdbc8;USER=zapper;protocol=thin;PASSWORD=oracle"
    TestTableName="CABIN" URL="jdbc:oracle:thin:@192.168.0.2:1521:eins"/>
    Do I need any additional software besides the driver and weblogic??
    Thx
    Christian

  • Cannot startup connection pool  no suitable driver /WLS 6.1 SP4

    hi all,
    i got a problem in creating a ConnectionPool with weblogic 6.1 sp4.
    my connection pool has following config data:
    URL:jdbc:oracle:[email protected]:1521:ESECD7
    Driver:oracle.jdbc.driver.OracleDriver
    props
    username=aaaa
    password=bbbb
    in my startWebLogic.cmd i have following classpath:
    set PATH=.\bin;%PATH%;c:\bea\wlserver6.1\config\mydomain;c:\bea\wlserver6.1\bin\oci817_8;c:\oracle\ora92\bin;%PATH%
    set CLASSPATH=C:\oracle\ora92\jdbc\lib\classes111.zip;C:\oracle\ora92\jdbc\lib\classes12.zip;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;c:\bea\jolt.jar;c:\bea\joltwls.jar;c:\bea\joltjse.jar
    but i keep on gettign the exception Cannot startup connection pool.. no suitable
    driver
    to me it looks like everything is in classpath...
    any ideas?
    regards
    marco

    Marco wrote:
    hi all,
    i got a problem in creating a ConnectionPool with weblogic 6.1 sp4.
    my connection pool has following config data:
    URL:jdbc:oracle:[email protected]:1521:ESECD7
    Driver:oracle.jdbc.driver.OracleDriver
    props
    username=aaaa
    password=bbbb
    in my startWebLogic.cmd i have following classpath:
    set PATH=.\bin;%PATH%;c:\bea\wlserver6.1\config\mydomain;c:\bea\wlserver6.1\bin\oci817_8;c:\oracle\ora92\bin;%PATH%
    set CLASSPATH=C:\oracle\ora92\jdbc\lib\classes111.zip;C:\oracle\ora92\jdbc\lib\classes12.zip;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;c:\bea\jolt.jar;c:\bea\joltwls.jar;c:\bea\joltjse.jar
    but i keep on gettign the exception Cannot startup connection pool.. no suitable
    driver
    to me it looks like everything is in classpath...
    any ideas?
    regards
    marcoHi. Read the weblogi startServer script, and the startWLS script it calls. These
    scripts build up a string which is added to the java commandline that starts
    the server, with an argument -classpath ....... Unless the driver shows up there,
    the server doesn't see it.
    However, we already include a version of the oracle thin driver. It may not be
    the best (it's old), so you will want to make sure you version gets in to the classpath
    argument ahead of our stuff, but the old driver would have been invoked...
    Therefore, I suspect your URL is not exactly correct. Please verify that this exact URL
    works in a simple standalone JDBC program using the driver you want, without any
    weblogic code in the picture.
    thanks,
    Joe

  • Error creating a connection pool (No suitable driver)

    I have just installed WLS6.1 SP3
    I try to create a connection with the following parameters
    URL = jdbc:oracle:thin@myOracleServer:1521:myOracleSID
    DriverName = oracle.jdbc.driver.OracleDriver
    every thing else is left as the defaults,
    when I click create everything is OK.
    I then go to the "Targets" tab and select myserver,
    move it to the chosen column and click apply.
    I then get the error
    <Error> <JDBC> <Cannot startup connection pool "myCP" No suitable driver>
    I looked at the doc edocs.bea.com/wls/docs61/jdbc/thirdparty.html
    Under the section "Setting environment for your third party driver"
    it implys that if your using sybase jconnect or oracle thin drivers
    you do not need to do anything else.
    I looked in the weblogic.jar file and the OracleDriver.class file
    is there under oracle\jdbc\driver.
    the CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
    I would have thought that the driver class in the jar file
    would have be picked up given the path & classname match the
    driver name enter in the console.
    Any ideas on how to fix this problem?

    "Robert Towler" <[email protected]> wrote in message
    news:3dd3ea04$[email protected]..
    Thanks Slava, you were correct,
    I really appreciate it.Glad to help :)
    Regards,
    Slava Imeshev
    "Slava Imeshev" <[email protected]> wrote:
    Hi Robert,
    Looks like colon is missing after jdbc:oracle:thin. The url should be
    jdbc:oracle:thin:@myOracleServer:1521:myOracleSID
    Regards,
    Slava Imeshev
    "Robert Towler" <[email protected]> wrote in message
    news:3dd3e3c6$[email protected]..
    I have just installed WLS6.1 SP3
    I try to create a connection with the following parameters
    URL = jdbc:oracle:thin@myOracleServer:1521:myOracleSID
    DriverName = oracle.jdbc.driver.OracleDriver
    every thing else is left as the defaults,
    when I click create everything is OK.
    I then go to the "Targets" tab and select myserver,
    move it to the chosen column and click apply.
    I then get the error
    <Error> <JDBC> <Cannot startup connection pool "myCP" No suitable
    driver>
    >>>
    I looked at the doc edocs.bea.com/wls/docs61/jdbc/thirdparty.html
    Under the section "Setting environment for your third party driver"
    it implys that if your using sybase jconnect or oracle thin drivers
    you do not need to do anything else.
    I looked in the weblogic.jar file and the OracleDriver.class file
    is there under oracle\jdbc\driver.
    the CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
    I would have thought that the driver class in the jar file
    would have be picked up given the path & classname match the
    driver name enter in the console.
    Any ideas on how to fix this problem?

  • Questions regarding Connection Pooling

    Hi
    i have some confusion regarding how connection pooling is implemented..i have been doing some digging in to this lately but the more i read the more confused i get. i have some doubts here, will any of the posters here kindly clear them
    a. Do i have to connect to my database via the DataSource method to take advantage of the connection pooling provided by my app server?..i have read conflicting information about this suggesting that Connection Pooling will not be provided to my app if i use DriverManager.getConnection()
    b. if i chose to use the DataSource method do i have to implement the ConnectionPoolDataSource interface to provide the connection pooling for my app?
    c. what is the best way to implement my own custom Connection pool?
    Thanx

    DriverManager.getConnection() literally creates, that is, builds a connection to the database using the values you previously supplied when you loaded the driver.
    A connection pool is an object that contains several already made connections to the database, and simply provides you with one of those existing connections. The confusion arises because a) the method name is frequently the same and b) the connection pool object calls the driver's getConnection() method to create several connections before lending any of them out.
    In other words:
    DriverManager.getConnection() builds a connection to the database.
    ConnectionPool.getConnection() fetches an existing connection.
    So, to answer your questions...
    A. This is correct. If you use DriverManager.getConnection(), you are indeed bypassing the Connection Pool entirely.
    B. I'm not familiar with DataSource specifically, but in general, a third party connection pool will either give you the interface (and you implement the details) or they will give you the class file containing the DataSource object. All you would have to do in the latter case is to import that file, then create a new instance of it using the new keyword ( DataSource foo = new DataSource(); ). I suspect DataSource is indeed the class file.
    C. Creating a connection pool is trivial and there are many examples of it - search on this forum or check out your favorite Java/JDBC programming book. Usually, the question "Should I use a connection pool and why?" is a more important question.

  • Connection Pooling in JDBC

    I have written a jdbc connectivity calss called SQL.java. Here its using normal JDBC connectivity mode
    public Connection getConnection() throws SQLException { try { Class.forName(bundle.getString("driver")); } catch (ClassNotFoundException e) { e.printStackTrace(); } try { con = DriverManager.getConnection(new StringBuilder(bundle.getString("url").trim()).append( bundle.getString("ip").trim()).append(bundle.getString("database")).toString().trim(), bundle.getString( "userName").trim(), bundle.getString("password")); con.setAutoCommit(false); } catch (SQLException e) { throw e; } return con; }
    We have a web application using this sql api. What is happening is for one login it will create one connection. That way we have wired. When logging out this connection is closed. So if 100 useres are loggin in 100 Connection will be created. Is that a good practice ...or i need to use connection pooling for that.

    public class ConnectionSQL implements Serializable {
         private static final long serialVersionUID = -732705131170728886L;
         private static Connection con;
         private String databaseName = "";
         private DataSource dataSource;
         private static ConnectionSQL connectionSQL;
         private ConnectionSQL(String databaseName, ResourceBundle bundle) {
              this.databaseName = databaseName;
              String driver = bundle.getString("driver");
              String connectURI = new StringBuilder(bundle.getString("url").trim()).append(bundle.getString("ip").trim()).append(
                        bundle.getString("database")).toString().trim();
              String userName = bundle.getString("userName").trim();
              String password = bundle.getString("password").trim();
              dataSource = getDataSource(driver, connectURI, userName, password);
         public static ConnectionSQL getConnectionSQL(String databaseName, ResourceBundle bundle) {
              if (connectionSQL == null) {
                   connectionSQL = new ConnectionSQL(databaseName, bundle);
              return connectionSQL;
         public synchronized Connection getConnection() throws SQLException {
              try {
                   printDataSourceStats(dataSource);
                   if(con != null && !con.isClosed()) {
                        return con;
                   con = dataSource.getConnection();               
                   con.setAutoCommit(false);
              catch (SQLException e) {
                   throw e;
              return con;
         public static DataSource getDataSource(String driver, String connectURI, String userName, String password) {
              BasicDataSource ds = new BasicDataSource();
              ds.setInitialSize(5);
              ds.setDriverClassName(driver);
              ds.setUsername(userName);
              ds.setPassword(password);
              ds.setUrl(connectURI);
              ds.setMaxOpenPreparedStatements(-1);
              ds.setMaxActive(10);
              ds.setMaxIdle(5);
              ds.setMaxWait(10000);
              ds.setMinEvictableIdleTimeMillis(1000 * 60 * 30);
              return ds;
    }What im currently using is like this ... i know its bad .. im not using the advantage of the connection pooling of dbcp .. Its in the developing stage

  • Connection pooling - looking for some advice

    Hi all,
    I wish to implement a JDBC connection pool. I have read through previous posts and have also read the tutorial on connection pooling.
    Some things are just still not quite clear. I am only actually asking for advice as my deadline is approaching - it is still at respectable distance but I don't have time to make mistakes (I have made enough already :-)).
    Setting a minimum number of connections makes sense but I don't know why you would want/need to set a maximum number - wouldn't this mean that (potentially) 1 or more clients would simply have to wait for a connection to be freed by the pool ? I am only working with a small database (I am expecting approx. 200 users).
    Also when I run short of connections (I have to create a new connection for the client) I wish to execute a background process that will create say 5 new connections whenever I create just 1. From my poor knowledge of threads I take it using a thread would not make any difference as the client would have to wait for this thread to end. Is this possible ?
    I would be glad for any advice (I am not looking for source code as I have quite a good idea as to how to proceed).
    Thanks,
    BadLands

    answer for u r first Q
    Setting a minimum number of connections makes sense but I don't know why you would want/need to set a maximum number - wouldn't this mean that (potentially) 1 or more clients would simply have to wait for a connection to be freed by the pool ? I am only working with a small database (I am expecting approx. 200 users).
    one basic funda of connection pooling
    do u know why we implement connection pooling to save resources
    reduce overhead on database main is to reuse the connection object already created
    there r 2 parameter minimum no and maximum no of connection
    when the server is started it will create the minimum no of connection object say 5 and put it in pool so whenver client comes it wont create any other conn assign a one from pool
    now according to u if there is no maximum no
    then once this 5 conn objects r used and when client comes it will create a new one and it will go on createing as and when client comes
    so ther's is no funda of pooling
    what will happen when the initial clients have used the conn object and they no longer want to use it
    so what our connection pol will do it will put this connection object back to the pool and when client comes it will give him this conn object which is already used thus resusablity is achived
    hope tis clear

  • Struts and Connection pooling my servlet DB connections ...

    I have done extensive work using the MVC approach to application development and i am ready to move on to the nextlevel. THis next level, for me, is the STRUTS frame work of web application design. For the model portion of STRUTS, is there connection pooling contained with in the class structure or do we have to add this connection pooling ourselves. I have already develpoed DB / servlet connection pooling classes and i am looking to incorporate them into the STRUTS frame work, do i need to or is there some thing there already?

    Well, to be J2EE you could use an implementation of javax.sql.DataSource which also implements connection pooling.
    I use the one that's packaged in tomcat : exolab's tyrex. http://tyrex.exolab.org

  • Error while creating JDBC connection pool for MSSQL database

    Hi,
    From my windows m/c, I am trying to configure a connection pool to connect to
    an MSSQL database on another m/c. While setting the targets, i get the error :-
    <Mar 11, 2004 6:17:52 PM GMT+08:00> <Error> <JDBC> <Cannot startup connection
    pool "gcdb_connpool" Cannot load driver class: com.microsoft.jdbc.sqlserver.SQLServerDriver>
    I have added the path of the jars for the driver in the classpath.
    Any help would be appreciated.
    Thanks.

    Hi. Read the weblogic startup script, and follow how it creates
    a classpath argument for the server. You must get the driver jars
    into that classpath.
    Joe
    Neha wrote:
    Hi,
    From my windows m/c, I am trying to configure a connection pool to connect to
    an MSSQL database on another m/c. While setting the targets, i get the error :-
    <Mar 11, 2004 6:17:52 PM GMT+08:00> <Error> <JDBC> <Cannot startup connection
    pool "gcdb_connpool" Cannot load driver class: com.microsoft.jdbc.sqlserver.SQLServerDriver>
    I have added the path of the jars for the driver in the classpath.
    Any help would be appreciated.
    Thanks.

  • [原创] 有关Weblogic Connection Pool 连接恢复的问题

    这是一个古老的问题,一直困扰我,这里既然碰到了,就看看能不能解决。
    环境描述:
    WEBLOGIC版本是8.1 SP2,数据库是SQL SERVER 2000,分别部署在两个服务器上。
    第一步:
    问题描述:
    数据库服务器重新启动,导致WEBLOGIC 的CONNECTION POOL中的连接中断,EJB无法获得连接,导致应用出错。
    解决方法:
    进入WEBLOGIC ADMIN CONSOLE,
    Services->JDBC->Connection Pools->Config->Connections, 点开Advanced Options.
    打开 Test Reserved Connections ,Test Created Connections,Test Released Connections这三个选项。
    将Test Table Name属性设置为:sysproperties(SQL Server系统表,即使自己的应用不存在,这个表也存在,而且默认的内部没有数据)
    根据如下解释:
    Connections that fail the test are closed and reopened to re-establish a valid physical database connection.
    (You must specify a Test Table Name below.)
    每次调用首先进行测试连接,如果测试失败连接将重新建立。
    测试结果:
    WEBLOGIC启动后,关闭数据库SQL SERVER,应用服务器前端调用此时失败。
    重新启动SQL SERVER后,WEBLOGIC端略做等待,前端应用恢复正常。
    第二步:
    问题描述:
    进一步测试,如果WEBLOGIC先启动,启动完成后再启动数据库。
    在WEBLOGIC CONSOLE得到如下输出:
    <2006-3-22 上午11时50分08秒 GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for p
    ool "MyJDBC Connection Pool": [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.>
    <2006-3-22 上午11时50分10秒 GMT+08:00> <Error> <JDBC> <BEA-001150> <Connection Pool "MyJDBC Connection Pool" deployment
    failed with the following error: 0:Could not create pool connection. The DBMS driver exception was: [Microsoft][SQLServe
    r 2000 Driver for JDBC]Error establishing socket..>
    <2006-3-22 上午11时50分10秒 GMT+08:00> <Error> <JDBC> <BEA-001151> <Data Source "MyJDBC Data Source" deployment failed w
    ith the following error: DataSource(jdbc/OMSEIITxDS) can't be created with non-existent Pool (connection or multi) (MyJD
    BC Connection Pool).>
    Unable to deploy EJB: XXXXXXX from XXXXXXX.jar:
    [EJB:011028]The DataSource with the JNDI name: jdbc/XXXXXX could not be located. Please ensure that the DataSource h
    as been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
    1、在默认初始化打开的连接一一失败以后,连接池发现可用的连接为0,郁闷的宣布自己部署失败。
    2、接着数据源发现没有可用的连接池,自己也宣布部署失败。
    3、下面所有的EJB发现不了数据源的JNDI名,部署也全部失败。
    应用启动完成后,大部分EJB的状态为INACTIVE。前端应用无法使用,此时启动数据库,前端应用无法使用。
    手动重新部署 EJB失败,错误还是找不到JNDI,前端应用无法使用。
    手动重新部署 连接池,数据源后,部署EJB 依然失败。前端应用无法使用。
    解决方法:
    进入WEBLOGIC ADMIN CONSOLE,
    Services->JDBC->Connection Pools->Config->Connections, 点开Advanced Options.

    Connection Creation Retry Frequency 参数设置为 60。
    ConnectionCreationRetryFrequencySeconds含义:
    当创建数据库连接时,如果数据库不可用(如数据库没启动),隔多长时间试着重新创建该连接,
    WLS8.1会每隔ConnectionCreationRetryFrequencySeconds秒重试一次.直到JDBC POOL创建成功
    参考:http://dev2dev.bea.com.cn/techdoc/20030469.html,‘JDBC Connect Pool’部分。
    英文解释可以直接控制台上看到,或者edocs查。
    测试结果:
    将数据库关闭,WEBLOGIC重新启动。
    在WEBLOGIC CONSOLE得到如下输出:
    打开Connection Creation Retry Frequency 参数后,连接池在第一轮尝试失败以后,就成功部署了,数据源也成功部署。
    EJB部署会失败,但是提示也与先前的不同:
    Unable to deploy EJB: XXXXXXX from XXXXXXX.jar:
    weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool MyJDBC Connection Pool to
    allocate to applications, please increase the size of the pool and retry..
    每隔一段时间会看到,CONNECTION POOL不断的重新进行连接:
    <2006-3-22 下午12时17分56秒 GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for p
    ool "MyJDBC Connection Pool": [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.>
    在WEBLOGIC启动完成后,所有EJB为INACTIVE状态。
    启动数据库服务器,稍后,手动重新部署所有的EJB,EJB可以部署成功,前端应用可以正常使用。
    此时,此问题已经基本解决,仍需要手动部署EJB。
    第三步:
    问题描述:
    解决方法:
    有关部署次序的问题,首先查阅WEBLOGIC文档,http://edocs.bea.com/wls/docs81/faq/deploy.html#744900,得到
    WebLogic Server deploys server-level resources (first JDBC and then JMS) before deploying applications.
    Applications are deployed in this order: connectors, then EJBs, then Web Applications.
    If the application is an EAR, the individual components are loaded in the order in which they are declared
    in the application.xml deployment descriptor.
    WEBLOGIC先部署服务器端资源,JDBC -> JMS....,然后部署我们的应用,EJB->WEB APPLICATION。
    实际从WEBLOGIC启动日志来看,即使打开了Connection Creation Retry Frequency,如果当时数据库不是可用的,CONNECTION POOL
    会不断的调度CONNECTION进行重新连接。但是此时,EJB的部署也同时在进行。个人猜测这应该是两个不同的线程(组)分别调度的任务。
    现在考虑的是能不能用StartupClass截住EJB的部署过程,粗略的说是如果DATASOURCE没有连接好,或者没有可用的连接池,
    就不往下进行EJB部署的过程。
    参考:http://edocs.bea.com/wls/docs81/config_xml/EJBComponent.html#DeploymentOrder
    DeploymentOrder:
    A priority that the server uses to determine when it deploys an item. The priority is relative to other deployable
    items of the same type. For example, the server prioritizes and deploys all EJBs before it prioritizes and
    deploys startup classes.Items with the lowest Deployment Order value are deployed first.
    There is no guarantee on the order of deployments with equal Deployment Order values.
    There is no guarantee of ordering across clusters. Default: 1000 Minimum: 0 Maximum: 2N31-1
    在部署同一类应用时,按照 DEPLOYMENT LOADER的数值决定,数值越小越先。(EJB的参数在ADMIN CONSOLE界面上叫做LOAD ORDER)
    而且上面看来服务器是先部署EJB,再部署STARTUP CLASS,遗憾了。
    好在STARTUP CLASS上有两个选项,
    Run Before Application Deployments
    Run Before Application Activations
    这两个选项分别可以设置StartupClass分别在系统资源部署之前,以及在系统资源部署和用户应用部署之间启动。
    选上Run Before Application Activations。
    现在可以了,我写了一个STARTUP CLASS,思路见下:
    主代码:
    private void testConnection(){
    while (!isTimeout() && !getConnection()){
    try{
    Thread.sleep(testInterval*1000);
    }catch(Exception ignor){}
    log("DBConnectHolder job finished with following status:");
    log("Timeout:"+isTimeout +",Connection OK:"+isConnected);
    测试结果:
    只要配置的等待时间足够长,应用服务器先行启动的情况下,等待数据库启动后才进行EJB等等的部署。
    (主要考虑如果数据库连接不OK,EJB启动了也没有太大用,还得手工重新部署。)算是比较完满的解决了问题。
    另外一个思路是是否可行? 通过MBean, 在CONNECTION 建立起来以后通知一把,进行EJB的重新部署。
    没来得及研究,请有经验的同学帮我补充完善。
    结论:
    其实也没什么结论,只是把自己遇到问题,解决问题的思路写了一下。短时间内阅读的文献有限,可能采用了一些苯方法
    ,或者走了弯路,也请大家拍砖。
    在WL8版本上,数据库连接进行恢复和重新连接的时候,上面提出的几个参数应该是比较重要的,我再次强调一下。
    Services->JDBC->Connection Pools->Config->Connections, 点开Advanced Options.
    Test Reserved Connections
    Test Created Connections
    Test Released Connections
    Test Table Name
    Connection Creation Retry Frequency

    在第一个情景中应该只需要打开Test Reserved Connections 就可以了。
    Test Created Connections表示创建连接后放到pool之前进行测试看连接是否可用
    Test Released Connections表示释放连接回到pool之前进行测试看连接是否可用
    I think so!

Maybe you are looking for

  • Can I take out java?

    I'm using IMAC OS X 10.6.8 and was reading that I could go into my applications, then Utilities and then Java Preferences.  I was told in an article if it is there it can cause malware and I can delete it.  Is this true and should I do it? 

  • ActiveSync packet is not delivered to CAS in other site when proxying is used

    Hi folks, We have a peculiar issue here. Our setup: Exchange resource forest BES 10 installation in SITE A User with mailbox in SITE B added to BES 10 We use Certificate Based Authentication'. Issue: When user presents their authentication via Active

  • ME5A Scope of list

    Hi all, I would like to know if the SAP scope of list u201Cu201DALVu201Du201D could be made available in transaction ME5A. We are using Release 4.6C At the moment if we run ME5A the system will list open requisition in a certain format which makes it

  • XL Reporter Run-time Error "0"

    Hi All, I have just upgraded from 2007A SP00 PL42 to V8.8 SP00 PL10. When I click on Tools-->XL Reporter, I get the run-time error "0". Screenshot as follow: http://www.sendspace.com/file/qnii6r I did the following: - Uninstall SAP Business One Clien

  • GS70 White screen issue

    So, about a month ago. I RMA'ed my GS70. I just booted it up the other day and my screen was white. Now I got it back about a week ago. From an official MSI Center. It worked great for about a week. Now I just booted it up again. And it has the same