Subject Re: RC3
Author Roman Rokytskyy <rrokytskyy@acm.org>
Evgeney,

> This is Firebird feature. It have commitRetain, after commit all
> ResultSet is open.

Right, but JDBC does not define commit retaining. Connection.commit()
means isc_commit_transaction and not isc_commit_retaining. Check JDBC
specification.

> 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

What problem are you trying to solve?

> 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.

PreparedStatement should be prepared once and used many times. JDBC
driver does not have PreparedStatement pool and will not have any.
This feature usually is implemented in JDBC connection pool. PoolMan
has it, I have it in my pool too (most likely I will contribute my
pool to the project after release).

> 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));
> }
> }

As you write, this is a bad code, or more correctly, buggy code. You
have to close prepared statement after use. However, JayBird has some
protection against this: all statements will be closed automatically
when connection is closed.

> p.s. Sorry for bad English. If you undestand'n me, I may write in
> Russian.

You can post it in Russian to me privately. I hope that my Russian
will be good enough for communication.

Best regards,
Roman Rokytskyy