Hi,

are you using the save() method or the save(Connection) method ?

In the save() method, connections should be returned to the pool even if an
error occurs.
in the save(Connection) method, if an error occurs, no rollback or return
of the connection is made. You are responsible yourself that all
connections are returned in all circumstances, even if an error occurs.
This is usually achieved by code similar to this:

Connection connection = null;
try
{
  connection = getConnectionFromSomwhere();
  // do whatever you want to do with the connection
  // maybe ? connection.commit()
}
finally
{
  if (connection != null)
  {
    try
    {
      connection.close();
    }
    catch(Exception e)
    { }
  }
}

   Thomas


Roel van Dijk <[EMAIL PROTECTED]> schrieb am 08.07.2005 15:08:50:

> I am using Torque as a part of Jetspeed, and I am updating something
> in the database. I am using an Oracle database without any troubles so
> far.
>
> However, when I try to insert a null-value into a fields which cannot
> be null according to the database, I receive an Oracle error message
> (as I expected). However, the connection on which this error was
> received is never released into the connection pool.
>
> Therefore, after 10 of these errors, my entire connection pool is
> filled, and I cannot make any new connections to the database. The
> application hangs from then on.
>
> Is there a way to free up these connections after I have caught this
> database exception?
> --
> Roel -- [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to