Hi!
Shouldn't chached PreparedStatements act just like all other cached objects, like bean
instances? I mean when a PreparedStatement has been unused for an amount of time it
will be timed-out and the PreparedStatement should be closed. A timeout setting in
combination with max-number-of-statements setting should be ok. Or?
/Lennart
----- Original Message -----
From: Ari Suutari <[EMAIL PROTECTED]>
To: JBoss-User <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 7:39 AM
Subject: Re: [jBoss-User] maximum open cursors problemed solved
> Hi,
>
> > > This is a JAWS/Minerva problem in JBoss2.0-Final, this is not user
> > > code. The problem is that Minerva always caches PreparedStatements to
> > > no limit which leaves cursors open. Since JAWS uses prepared
> > > statements, then you can run into maximum open cursors in your DB.
> >
> > I hear you, fundemental flaw since this is supposed to happen at a lower
> > level.
> > Minerva must have been written during the very early days, when the
> drivers
> > didn't handle the caching at the driver level.
> > well, maybe this will change :)
>
> I don't think that this is a flaw at all (there should be a limit
> how many statements to cache but that's all). It is correct programming
> to leave a PreparedStatement un-closed (ResultSet however, must be
> closed always) for further re-use. When you re-execute statement
> again, it is faster than creating new statement and executing that.
>
> We have a JDBC-based system running in many installations
> which does very much the same as Minerva is doing and it works great!
>
> Ari S.
>
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]