[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ojb-user
Subject:    Re: [Fwd: Problem in Releasing Connection]
From:       Armin Waibel <arminw () apache ! org>
Date:       2005-09-19 10:20:03
Message-ID: 432E90D3.2030803 () apache ! org
[Download RAW message or body]

Hi,

it's guaranteed that at the latest method call
PersistenceBroker#close()
release the used connection back to connection pool or close the used
connection - dependent on the used ConnectionFactory.

Are you sure that you never lookup connections directly from OJB and
close these connections by yourself or that you don't close used PB 
instances?

More information about connection handling can be found here
http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a%0A++++++++++++++++

regards,
Armin

Jakob Braeuchi wrote:
> 
> ------------------------------------------------------------------------
> 
> Subject:
> Problem in Releasing Connection
> From:
> Sudhir Kumar <sudhir.kumar@enrichsolutions.com>
> Date:
> Wed, 14 Sep 2005 14:56:27 -0600
> To:
> jbraeuchi@gmx.ch
> 
> To:
> jbraeuchi@gmx.ch
> 
> 
> Hi,
> 
>  
> 
>             I am using OJB in our project. We are using oracle 10g as a  
> database.
> 
>  
> 
>             I am using the following steps to retrieve/insert records 
> the data from the tables
> 
>  
> 
>  
> 
>             PersistenceBroker  broker = 
> PersistenceBrokerFactory.defaultPersistenceBroker();
> 
>  
> 
>             broker.beginTransaction();
> 
>             broker.insert(Object obj);
> 
>            
> 
>             broker.commitTransaction();
> 
>  
> 
>             broker.close();
> 
>  
> 
>  
> 
>             We have a utility which runs on every 10 sec. and after few 
> minutes we are getting an error that “Unable to get object from 
> connection pool”
> 
>             I suspect that by using this way the connection is not 
> released and it is not returning to pool.
> 
>  
> 
>             Can u suggest me how to close the connection and return the 
> connection to pool.
> 
>  
> 
>             Any help will be highly appreciated. Thanks for helping.
> 
>  
> 
> Thanks and regards,
> 
> Sudhir Kumar
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic