Hi,
    We faced a similar problem a few days back. The problem was that we were closing the connections explicitly after using it, but, still the problem persisted.         Following is the snippet of code that we used to release the connection-
try{
    if (aoConnection != null)
     aoConnection.close();
   }
   catch (Exception e){
        e.printStackTrace();
    }
The above code did not close and put the connections back into the pool.
The java documentation mentioned that - "In some cases, it is desirable to immediately release a Connection's database and JDBC resources instead of waiting for them to be automatically released; the close method provides this immediate release. "
 
However, surprisingly, when we equated the connection object to null, after calling close() ,we got the desired effect.
If close() is supposed to provide the same effect, why was it that we had to explicitly equate the connection reference to null ?
 
Any pointers ?
 
Thanks in advance,
Ashutosh
 
 
 
----- Original Message -----
From: "Milind Kulkarni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 3:22 PM
Subject: Re: No resources available

> Seems that you are exhausting the connection pool in WebLogic server. You
> have 2  options - increase the size of the Connection pool. Secondly check
> your code and ensure that you close all the Connections and Resultset after
> the procesing is over.
> Regards,
> Milind
>
>
>
>
>                     Vikramjit Singh
>                     <vikramjits@GTLLI        To:    
[EMAIL PROTECTED]
>                     MITED.COM>               cc:
>                     Sent by: A               Subject:     No resources available
>                     mailing list for
>                     Enterprise
>                     JavaBeans
>                     development
>                     <EJB-INTEREST@JAV
>                     A.SUN.COM>
>
>
>                     08/21/2002 02:40
>                     PM
>                     Please respond to
>                     Vikramjit Singh
>
>
>
>
>
>
> Hi everybody,
>
> I am working on weblogic 6.1 and have succesfully deployed a BMP.
> When i am running my client class, in which i am inserting 4 records into
> the database only the first 3 records get inserted then i get the following
> error
>
> weblogic.common.ResourceException: No resources available
>         at
> weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
> java:533)
>         at
> weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
> java:379)
>         at
> weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
> cator.java:347)
>         at
> weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
> ava:169)
>         at
> weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
> Pool.java:130)
>         at
> weblogic.jdbcbase.common.internal.RmiDataSource.getPoolConnection(Rmi
> DataSource.java:180)
>         at
> weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
> ce.java:49)
>         at ejb.bmp.TaxEJB.getConnection(TaxEJB.java:236)
>         at ejb.bmp.TaxEJB.ejbCreate(TaxEJB.java:34)
>         at ejb.bmp.TaxEJBImpl.ejbCreate(TaxEJBImpl.java:213)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at weblogic.ejb20.manager.DBManager.create(DBManager.java:408)
>         at
> weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:353)
>         at ejb.bmp.TaxEJBHomeImpl.create(TaxEJBHomeImpl.java:75)
>         at
> ejb.bmp.TaxEJBHomeImpl_WLSkel.invoke(TaxEJBHomeImpl_WLSkel.java:66)
>         at
> weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
> va:373)
>
> Earlier what was happening was that only one record was being inserted,
> which got solved after i increased my column width name. But why do i get
> the above exception. Cud anybody give a clue.
>
>
> Regards,
> Vikramjit Singh,
> GTL Ltd.
> Ph. 7612929-1059
>
> ===========================================================================
> To unsubscribe, send email to
[EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
>
[EMAIL PROTECTED] and include in the body of the message "help".
>

Reply via email to