Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    4
    Rep Power
    0

    Default Datasourceproblem

    Hi all ,

    I am using TCL file with multiple queries as input to the web services.

    Following method getting the connection object

    protected Connection getConnection() throws SQLException {
    if (conn == null) {
    String config = getConfigName();

    try{
    conn = ServiceLookUp.getInstance().getDataSource(config). getConnection();
    }catch(ServiceLookUpException slx){
    throw new SQLException(slx.getMessage());

    }
    return conn;
    }

    **** ServiceLookUp class is single tone class .
    ********** My Resource tag in server.xml file

    <Resource name="jdbc/test"
    auth="Container"
    scope="Shareable"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSour ceFactory"
    maxActive="30"
    maxIdle="10"
    maxWait="10000"
    url="jdbc:oracle:thin:@***.***.***.***:1521:MCSTEM P"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    username="mcstest"
    password="mcstest"
    removeAbandoned="true"
    removeAbandonedTimeout="60"
    logAbandoned="true" />


    For multiple TCL client I getting the same object across the application


    If I am running multiple tcl clients , I am getting the resultset exhausted and connection already closed errors.

    Because of same object is sharing the multiple tcl clients. One tcl is closed the connection Other tcl client is trying to asses the same connection.

    Let me know the how to get the different connection object for different TCL client

    Please do need full, Thanks

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Please stick to one thread. Multiple threads for the same problem confuses reader trying to help you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •