[原创] 有关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!

Similar Messages

  • ClassCastException while asting ResultSet to OracleResultSet. Using weblogic connection pool

    Hi,
    I am using weblogic server 5.1 and connection pools for accessing Oracle database.
    We wanted to use BLOB in oracle and I coded the java class to insert data into BLOB
    field.
    When I code a sample calss without using weblogic pool, I do not have any problem.
    But when I use the weblogic connection pool, I get classcastException as described
    below:
    I am using
    "insert into shipmentCorrection (" + insfields + ") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
    to insert a dummy record with empty_blob and then getting the BLOB locater by the
    following code:
    java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROM shipmentCorrection
    WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+ CorrectionNum +" and
    Bl_Type = '"+ blType +"'" );
    rset.next();
    BLOB blob = ((OracleResultSet)rset).getBLOB(1);
    java.io.OutputStream outstream = blob.getBinaryOutputStream();
    IN the above line of code where I cast the ResultSet to OracleResultSet, I get the
    classcastException as follows:
    I donno how to solve this problem. Could any one please help me on this ?
    java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
    at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
    at fmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
    .java:2471)
    at fmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
    java:1316)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
    jectAdapter.java:347)
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:69)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
    Thanks,
    Muralidaran Chakravarthy

    When using weblogic pool drivers it is not possible to cast to an Oracle
    JDBC driver, (or any other driver )
    pool driver hides the driver you have configured.
    "Muralidaran Chakravarthy" <[email protected]> wrote in message
    news:3ce16855$[email protected]..
    >
    Hi,
    I am using weblogic server 5.1 and connection pools for accessing Oracledatabase.
    We wanted to use BLOB in oracle and I coded the java class to insert datainto BLOB
    field.
    When I code a sample calss without using weblogic pool, I do not have anyproblem.
    But when I use the weblogic connection pool, I get classcastException asdescribed
    below:
    I am using
    "insert into shipmentCorrection (" + insfields + ") VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
    >
    to insert a dummy record with empty_blob and then getting the BLOB locaterby the
    following code:
    java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROMshipmentCorrection
    WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+CorrectionNum +" and
    Bl_Type = '"+ blType +"'" );
    rset.next();
    BLOB blob = ((OracleResultSet)rset).getBLOB(1);
    java.io.OutputStream outstream = blob.getBinaryOutputStream();
    IN the above line of code where I cast the ResultSet to OracleResultSet, Iget the
    classcastException as follows:
    I donno how to solve this problem. Could any one please help me on this ?
    java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
    at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
    atfmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
    java:2471)
    atfmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
    java:1316)
    atweblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
    jectAdapter.java:347)
    atweblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:69)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    java:15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
    Thanks,
    Muralidaran Chakravarthy

  • Problem in retriving varray when using weblogic connection pool

    Hi,
         I had similar problem when we I am using the weblogic connection pool. I had similar setup i.e weblogic 5.1 servicepack9 and oracle 8.1.7.
    I cofigarud the weblogic connection pool using Oracle thin driver.
    But if I am using with oracle thin driver directly I am able to retrive.
    If any one know how to retrive varray from procedure using weblogic connection pool please send me it.
    Thanx.
    Bye,
    Satya

    http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#setAutoCommit(boolean)

  • Weblogic Connection pool active even database listener down

    Just wanted to check if sometime noticed this.
    Today.. In production our Database listener was down and connection pools in weblogic were still working fine. But, when tried making a explicit call to DB it throws exception "The Network Adapter could not establish the connection"..
    Couple of days back our production database was restarted. Sill weblogic connection pool was active without restart.
    Any info. is appreciate..
    Thanks

    Hi Jung,
    There is no timeout current that you can set on the connection pool. It will
    be in a future release of WebLogic
    sree
    "Jung Yang" <[email protected]> wrote in message
    news:[email protected]..
    Thanks.
    Yes I know that part.
    However, I still would like to know how to get time out settings andchange
    if I can.
    Where can I do that?
    - jung
    "Sree Bodapati" <[email protected]> wrote in message
    news:[email protected]..
    set TestConnectionsOnReserve="true" in the pool and you should be all
    set.
    >>
    sree
    "Jung Yang" <[email protected]> wrote in message
    news:[email protected]..
    I am currently using WLS 6.0 SP2 RP2 with jdbc thin oracle driver.
    What is the timeout setting on weblogic connection pool?
    I would like to set max number of seconds waiting for reply to connect
    to
    a
    database so that it does not wait too long before realizing that it isdown.
    Also if there is a setting that can be configured, is it jdbc api
    implementation or weblogic specific?
    Thanks in advance.

  • Weblogic connection pool fails

    Hi
    I am trying to connect to sqlserver using the weblogic connection pool from the
    console.It throws me the following error inspite of adding the appropriate drivers
    in the classpath.It works out really fine when connection to oracle database when
    connecting to oracle it gives out :connection pool created, BUT WHEN TRYING TO
    ACCESS THE SQLSERVER ..OOOhh.
    anybody please immediate help is very much required and would be highly appreciated.
    Thanks
    Nov 1, 2001 9:18:40 AM EST> <Error> <JDBC> <Cannot startup connection pool "MessageLoggerDB"
    weblogic.com
    on.ResourceException:
    ould not create pool connection. The DBMS driver exception was:
    ava.sql.SQLException: I/O exception while talking to the server, java.io.EOFException:
    TdsInputStream.rea
    Fully - len 149 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2872)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:42)
    at weblogic.jdbc.mssqlserver4.TdsConnection.login(TdsConnection.java:57)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.login(MicrosoftConnection.java:53)
    at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:187)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34)
    at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:192

    This looks like you're using the mssqlserver4v70 driver to connect to
    an MS SQLServer 6.5. Is that the case?
    Joe
    Srini wrote:
    >
    Hi
    I am trying to connect to sqlserver using the weblogic connection pool from the
    console.It throws me the following error inspite of adding the appropriate drivers
    in the classpath.It works out really fine when connection to oracle database when
    connecting to oracle it gives out :connection pool created, BUT WHEN TRYING TO
    ACCESS THE SQLSERVER ..OOOhh.
    anybody please immediate help is very much required and would be highly appreciated.
    Thanks
    Nov 1, 2001 9:18:40 AM EST> <Error> <JDBC> <Cannot startup connection pool "MessageLoggerDB"
    weblogic.com
    on.ResourceException:
    ould not create pool connection. The DBMS driver exception was:
    ava.sql.SQLException: I/O exception while talking to the server, java.io.EOFException:
    TdsInputStream.rea
    Fully - len 149 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2872)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:42)
    at weblogic.jdbc.mssqlserver4.TdsConnection.login(TdsConnection.java:57)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.login(MicrosoftConnection.java:53)
    at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:187)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34)
    at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:192

  • Issues with Weblogic connection pool creation

    Hi,
    I need to create a Connection pool in weblogic to access a mdb file(MS Access) .
    Iam not able to see any precoded drivers in weblogic for accessing MS Access.
    Let me know if anyone has details on this.
    Thanks.

    I tried this one and this seems to be a trial version.
    Are there any free apis available? In case there are any other way do let me know.
    Thanks.

  • Error While reading CLOB from Oracle using WebLogic Connection Pool, Works fine with out using pool

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

  • 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

  • Connect to WebLogic connection pool externally?

    Running Oracle 8i (thin driver) & WL 5.1
    I can connect directly to the db using
    public class TestDB
         String dbURL = "jdbc:oracle:thin:@p1900:1521:p1900";
         String dbDriver = "oracle.jdbc.driver.OracleDriver";
         public boolean connect()
         Class.forName(this.getDbDriver());
         System.err.println("Driver load ok");
         dbConn = DriverManager.getConnection(this.getDbURL());
         System.err.println("Connected ok");
    return true;
    but is it possible to connect to WL connection pool from a program
    thats not within the WL server (i.e no problem from a servlet)?
    This is from weblogic.properties -
    weblogic.jdbc.connectionPool.hazardouswaste=\
    url=jdbc:oracle:thin:@p1900:1521:p1900,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=1,\
    maxCapacity=1,\
    capacityIncrement=1,\
    props=user=tact_dev;password=tact_dev,\
    allow=guest
    How can I get a conection from the hazardouswaste connection pool?
    I've tried this but it
    String dbURL = "jdbc:weblogic:pool:hazardouswaste";
    String dbDriver = "weblogic.jdbc.pool.Driver";
    I keep getting this -
    return getDbURL - jdbc:weblogic:pool:hazardouswaste
    java.sql.SQLException: Pool connect failed: null
    at weblogic.jdbcbase.pool.Driver.connect(Driver.java:184)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:199)
    at jsp_servlet.TestDB.connect(TestDB.java:62)
    at jsp_servlet.Test.main(Test.java:16)
    Any ideas
    harry

    [att1.html]

  • Weblogic 9.2 - Problem with Connection Pool not releasing resources

    We have a third party application that is running Weblogic 9.2 and has a connection pool to a SQL 2005 db for queries within it's batch process. What I have noticed is that it does not seem to be releasing SQL cpu back after the batch and this is causing issues with processes for other dB's within the instance. Has anyone encountered this issue and if so what is the solution (short of isolating it within it's own instance). Can the connection be reset to release resources?

    Yes it is a weblogic connection pool. What I mean is that when a batch run I can see the CPU for the SQL process associated with the connection increase but when the batch is completed the CPU remains high when I would expect it to move back down to an 'idle' level as after that as all it would be doing is the occasional "select 1' ping to keep the connection active.
    What i do see is that the cpu in activity monitor shows high cpu and it never goes down unless the connection is killed and re-established. As this is a shared instance other apps are complaining of slow running procs.

  • 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

  • Configure Database Connection to Weblogic 8.1 Connection Pool

    Hi,
    I've got an ADF BC web application which is working find for an embedded JDBC Oracle Database connection. It's Jdeveloper 10.1.2 deployed to Weblogic 8.1.
    Now I'm trying to change the Database connection so it can point to a weblogic connection pool through its JNDI name. The goal is to make .ear file transportable through different weblogic domains and databases, without recompile application.
    I've been trying to configure an "OracleConnectionPoolDataSource" selecting "third party driver" in Database connection wizard, but Jdeveloper throws error: Java Cast Exception, and don't let continue. What else have to do?
    thanks.

    I did that, but WebLogic ignores whatever I configure in Services->JDB->Connection Pools and Data Sources. Even if I remove them the application keeps on running.
    Because the server only reads the connection defined from JDeveloper, which is configured in the connections.xml file placed inside the deployed .ear file.
    I need to change this behaviour, and configure connections.xml pointing to Weblogic Datasource.
    Thanks for your attention.

  • SUN IDM 7.1 - Weblogic 8.1 SP6 Connection Pooling error

    Hi,
    We have a POC environment and IDM is being moved onto the weblogic server.
    I need to have the IDM use the weblogic connection pooling, however i am getting the following issue:
    Oracle is 10g and wl oracle drivver is     oracle.jdbc.driver.OracleDriver
    /lh setRepo -v -tOracle -iweblogic.jndi.WLInitialContextFactory -fCIIDMDS -ut3://localhost:29003/" -U"weblogic" -P"password"
    Defaulting administrator to 'configurator'.
    Defaulting credentials to 'configurator'.
    DB Server @ jdbc:hsqldb:hsql://127.0.0.1:53111/idm
    Checking 'OracleDataStore:CIIDMDS'...
    ==> java.sql.SQLException: Internal error: Invalid NLS Conversion ratio
    com.waveset.util.IOException:
    ==> java.sql.SQLException: Internal error: Invalid NLS Conversion ratio
    at com.waveset.repository.RelationalDataStore.checkDatabaseMetaData(RelationalDataStore.java:4155)
    at com.waveset.repository.RelationalDataStore.init(RelationalDataStore.java:3788)
    at com.waveset.install.RepoMan.check(RepoMan.java:1194)
    at com.waveset.install.RepoMan.setRepo(RepoMan.java:1082)
    at com.waveset.install.RepoMan.main(RepoMan.java:1314)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.waveset.util.CommandProcess.invokeMain(CommandProcess.java:212)
    at com.waveset.util.CommandProcess.launch(CommandProcess.java:162)
    at com.waveset.util.CommandProcess.run(CommandProcess.java:300)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.waveset.util.Command.main(Command.java:117)
    Caused by: java.sql.SQLException: Internal error: Invalid NLS Conversion ratio
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:164)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_814_WLStub.getMetaData(Unknown Source)
    at weblogic.jdbc.rmi.SerialConnection.getMetaData(SerialConnection.java:312)
    at com.waveset.util.PooledConnection.getMetaData(PooledConnection.java:213)
    at com.waveset.repository.RelationalDataStore.checkDatabaseMetaData(RelationalDataStore.java:3940)
    ... 16 more
    Caused by: java.sql.SQLException: Internal error: Invalid NLS Conversion ratio
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
    at oracle.jdbc.driver.PhysicalConnection.getMaxCharSize(PhysicalConnection.java:4485)
    at weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection.getMaxCharSize(Unknown Source)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection.getMaxCharSize(Unknown Source)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Wrapped exception:
    java.sql.SQLException: Internal error: Invalid NLS Conversion ratio
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:164)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_814_WLStub.getMetaData(Unknown Source)
    at weblogic.jdbc.rmi.SerialConnection.getMetaData(SerialConnection.java:312)
    at com.waveset.util.PooledConnection.getMetaData(PooledConnection.java:213)
    at com.waveset.repository.RelationalDataStore.checkDatabaseMetaData(RelationalDataStore.java:3940)
    at com.waveset.repository.RelationalDataStore.init(RelationalDataStore.java:3788)
    at com.waveset.install.RepoMan.check(RepoMan.java:1194)
    at com.waveset.install.RepoMan.setRepo(RepoMan.java:1082)
    at com.waveset.install.RepoMan.main(RepoMan.java:1314)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.waveset.util.CommandProcess.invokeMain(CommandProcess.java:212)
    at com.waveset.util.CommandProcess.launch(CommandProcess.java:162)
    at com.waveset.util.CommandProcess.run(CommandProcess.java:300)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.waveset.util.Command.main(Command.java:117)
    Caused by: java.sql.SQLException: Internal error: Invalid NLS Conversion ratio
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
    at oracle.jdbc.driver.PhysicalConnection.getMaxCharSize(PhysicalConnection.java:4485)
    at weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection.getMaxCharSize(Unknown Source)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection.getMaxCharSize(Unknown Source)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    Hi,
    Are you getting any other Exception when performing basic operations other than ones you had mentioned like search,delete,report etc..?
    What was your JDK version earlier and now?
    Have you re-build the custom java classes if any?
    Have you re-build the custom objects like Forms,WF,TDs etc..?
    Regards,
    Ferose

  • WL Connection Pool bad behaviour

    My WebLogic server is configurated with two connection pools towards an Oracle
    and a Sql db servers.
    Unfortunately, when a DB server goes down the WebLogic connection pool is not
    refreshed until I RE-START the WebLogic server.
    In particular, it seesms that a db failure causes WebLogic connection pool to
    have bad connections ("connection CLOSED", in jdbc log...) that are not good to
    execute Stored Procedures.
    Have anyone find this problem?
    Could someone recommend me a solution to face to this problem?
    Thank you very much in advance!
    Mauro

    Mauro,
    Could you post text of the exception and the source code where it happens?
    Slava
    Hi Slava,
    yes of course, I tried!
    With TestOnReserve/Release turned ON WebLogic understands that the poolconnections
    are "closed" and when I ask a connection the exception "No ResourcesAvailable"
    is thrown.
    On the contrary, with TestOnReserve turned OFF, WebLogic does not test thepool
    and grants the connection on demand, but the stored procedures (only thestored
    procedures!!??) executed on this connection throw the exception("connection closed").
    >
    I tried also to catch the failure and to refresh the connection poolthrough the
    weblogic.jdbc.JdbcServices (please see the attached file), but the reset()method
    has no effects...
    My configuration is WebLogic6.0 server with Service Pack 2 installed. Maybe that
    the JdbcServices are deprecated in this version.
    Thank you very much!
    Mauro
    "Slava Imeshev" <[email protected]> wrote:
    Hi Mauro,
    Have you turned TestOnReserve on?
    Regards,
    Slava Imeshev
    "Mauro De Santis" <[email protected]> wrote in message
    news:3b2e2557$[email protected]..
    My WebLogic server is configurated with two connection pools towardsan
    Oracle
    and a Sql db servers.
    Unfortunately, when a DB server goes down the WebLogic connection poolis
    not
    refreshed until I RE-START the WebLogic server.
    In particular, it seesms that a db failure causes WebLogic connectionpool
    to
    have bad connections ("connection CLOSED", in jdbc log...) that arenot
    good to
    execute Stored Procedures.
    Have anyone find this problem?
    Could someone recommend me a solution to face to this problem?
    Thank you very much in advance!
    Mauro

  • How can i use connection pool within the sqlj?

    hello
    i am a beginner to sqlj,i find all of the sample code from the oracle DON'T use connectionpool,they only write the database url to "connection.properties" file,but i think in the production environment we should use the connectionpool to optimise the querying,i usually use the weblogic connection pool.
    how can i use the connection pool within the sqlj?
    thank you very much!

    Im not sure if I understand. :)
    English is not my best language...
    Looking up the connection again? Do you mean I have to create new DataSource object and bind it again to ServletContext?

Maybe you are looking for

  • Satellite A300D-15B - Upgrade from Windows 7 32bit to 64bit?

    I've added an extra 4GB of memory to my Satellite A300D-15B (PSAKCE). When I try to run the Windows 7 64bit upgrade it fails with a blue screen. Is it possible to upgrade this model to 64 bit Windows 7?

  • Pass parameter to Bex Query via Query String

    Hello, I am trying to pass a parameter into a Bex Query from a 7.0 portal. I created a Bex query iView and I have tried various permutations with the Bex Query String property of the iview but nothing seems to work. The query runs but the parameter i

  • Dynamic report output in a webdynpro alv

    Hi, I have created a dynamic report in the R/3 system . In this report, i am creating a report program within the report and subsequently executing this dynamically created report and displaying in the ALV.. Is it possible to handle such a scenario i

  • Embedded spreadsheet in PDF

    I have embedded a spreadsheet into my PDF but.. i created the PDF using publisher and i'm now using acrobat 8 to create a menu using bookmarks, if i now edit the spreadsheet is there a way that i can get the new version of the PDF into acrobat and ke

  • Adobe form displayed is different from that in Designer

    Hello All,   Has anyone come across this situation before ? I have created a simple adobe form in NDS (Designer) but the deployed form that appears in IE is different. Any feedback or suggestions will be appreciated. Thank you. from Kwok Wei