Discussions

General J2EE: Connection pooling with SqlServer on weblogic 5.1

  1. Hi all

    we are using connection pooling with Sql Server 7.0.my entries in weblogic.properties file are

    weblogic.jdbc.connectionPool.Devdatadb=\
          url=jdbc:weblogic:mssqlserver4:compaq3:1433,\
          driver=weblogic.jdbc.mssqlserver4.Driver,\
          loginDelaySecs=1,\
          initialCapacity=2,\
          maxCapacity=3,\
          capacityIncrement=2,\
          allowShrinking=true,\
          shrinkPeriodMins=15,\
          refreshTestMinutes=10,\
          testTable=dual,\
          props=user=sa;password=;server=compaq3;db=devdata;,\
    allow=guest,

    weblogic.allow.reserve.weblogic.jdbc.mssqlserver4.Devdatadb=everyone
    weblogic.jdbc.DataSource.weblogic.jdbc.mssqlserver4.devdata=Devdatadb

    when all 3 connections are busy andif a request comes then it should ideally wait for connection instead of that it throws weblogic.ResourceNotAvailable.

    can anyone help??

    Thanks in advance


    Praveen Simlote



  2. We came accross problems with this on a previous project when using the dev version of the JDBC driver which was limited to 3 connections. You can either just wait till you have a deployment license and up the connection pool size or you could write a utility class that gets connections from the pool and basically does -

    try to get connection
    if noresourceException caught wait then try again
    up until some maximum timeout.

    At least by putting the exception handling in the helper class you don't tie you're bean to any specific weblogic classes.

    Its a bit anoying really. I'm not sure if there is a speced way that connection pools should behave when they have no connections left. I don't know if all servers tend to throw an exception of some sort or whether some will just wait.

    Stu