Subject Re: RC3
Author evgeneyputilin <eugeney@offpoly.ru>
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy
<rrokytskyy@a...>" <rrokytskyy@a...> wrote:
> Hi,
>
> Did not hear news from you for a long time! ;)
>
> > Do you known if the bug that made
> > the prepared statements local to
> > the transaction context was fixed ?
>
> As far as I know, nothing special was done in this area. However, I
> also do not see any code that closes statements on transaction
> commit/rollback.
>
> However result sets are closed on commit. I do not know if this is
> incorrect, but...
This is Firebird feature. It have commitRetain, after commit all
ResultSet is open.
I patch local source next files to resolve this problem
org\firebirdsql\jdbc\FBConnection.java
org\firebirdsql\jca\FBLocalTransaction.java
org\firebirdsql\jca\FBManagedConnection.java
org\firebirdsql\jca\FBManagedConnectionFactory.java

And I have memory leak on server when I don't close PreparedSatement.
FB allow one PreparedSatement for many Query. And this Statment eat
server memory.
Example bad code
.....
{
PreparedSatement ps=conn.PrepareStatment(" select count(*) from
rdb$database");
ResultSet rs=ps.executeQuery();
while(rs.next)
{
System.out.println(rs.getInt(1));
}
}
.....
Best regards,
Eugeney Putilin
p.s. Sorry for bad English. If you undestand'n me, I may write in
Russian.