Martin Kal�n wrote:
How about adding a fetchSize attribute to the JdbcConnectionDescriptor
and perhaps also to the query ? This way, the fetch size is tunable
for jdbc drivers that support this. Any JDBC driver should implement
this method (its defined since JDBC 1.2) regardless of whether it
actually does something.
Also, we should perhaps have a reasonable default, e.g. 50 or
something, for PostgreSQL ?!

+1 would be easily to integrate in 1.0.x and 1.x

I'm currently looking at the branch and trunk jcd-connection-descriptor configuration mechanisms.

fetchSize (and maxRows) could be considered similar to eg batch-mode,
and therefore they seem to belong as attributes directly on
<jdbc-connection-descriptor/>.

However, two things:
 1) fetchSize (and/or maxRows) hints should not be set by OJB in managed
    environments
 2) the <attribute/> generic config mechanism in 1.1.x is much more
    easily maintained than hardcoded attributes

Both these would be easier to achieve if fechSize was an attribute of
the ConnectionFactory (ie ConnectionFactoryManagedImpl could ignore such
settings).

I went ahead and added fetchSize as a custom attribute of the connection pool.

I think it fits nicely there, since the hint is somewhat connection-centric
and we want to move away from hardcoded attributes.

Making ConnectionPoolDescriptor (actually PoolConfiguration) an 
AttributeContainer
made it easy to integrate custom JDBC properties for DriverManager in the same 
way.

I'm going to summarize all my changes in another thread.

Regards,
 Martin

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



Reply via email to