Subject | Re: RC3 |
---|---|
Author | Roman Rokytskyy <rrokytskyy@acm.org> |
Post date | 2003-02-06T13:09:02Z |
Evgeney,
means isc_commit_transaction and not isc_commit_retaining. Check JDBC
specification.
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).
have to close prepared statement after use. However, JayBird has some
protection against this: all statements will be closed automatically
when connection is closed.
will be good enough for communication.
Best regards,
Roman Rokytskyy
> This is Firebird feature. It have commitRetain, after commit allRight, but JDBC does not define commit retaining. Connection.commit()
> ResultSet is open.
means isc_commit_transaction and not isc_commit_retaining. Check JDBC
specification.
> I patch local source next files to resolve this problemWhat problem are you trying to solve?
> 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 closePreparedSatement.
> FB allow one PreparedSatement for many Query. And this Statmenteat
> 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 codeAs you write, this is a bad code, or more correctly, buggy code. You
> .....
> {
> PreparedSatement ps=conn.PrepareStatment(" select count(*) from
> rdb$database");
> ResultSet rs=ps.executeQuery();
> while(rs.next)
> {
> System.out.println(rs.getInt(1));
> }
> }
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 inYou can post it in Russian to me privately. I hope that my Russian
> Russian.
will be good enough for communication.
Best regards,
Roman Rokytskyy