Subject Re: Connection Pooling in JBird1.5rc3
Author Roman Rokytskyy
> What are managed environments - how can I use them?

managed env. is for example an environment, where transaction is
managed by extrnal to the application transaction manager. for
example, when you write an ejb component, you just tell the ejb
container how transaction has to be managed, you don't do it yourself.

> Is it garanteed to be transparent? Aren't there any drawbacks?

slight performance degradation during calls (we wrap original prepared
statement with dynamic proxy) and big performance gain because of
reduced preparation time.

> What if the statement which originally prepared the statement is
> closed?

i think you mean connection. in this case all statements are closed
too. any subsequent operation on the closed statement results in
SQLException.

> Will old PreparedStatements be discarded?

in current implementation - only when connection that prepared them is
closed (i.e. removed from the pool due to idle timeout).

> We have some classloading system, wich allows us to modify classes
> during the runtime [which means new queries to be prepared]. The
> database-driver is not reloaded. So we dont want the Cache to fill
> up.

if you specify maxStatements property, only the specified number of
prepared statements will be kept in cache.

> Thus the preparation is in no conjunction to the connection?

statement belongs to connection, but does not care about the transaction.

> This is also impossible with the conncection pool, isn't it ?

see DataSource.getConnection(String, String) method.

Roman