BTW, this was very easy to implement. Did it Sunday and sill managed to make it to a movie (I highly recommend you all see "Children of Man"). The architecture had a very convient place to put the proxy creation code, and it was easy to catch events to release the proxy connection. Kudos to Jencks!

-dain

On Jan 9, 2007, at 10:02 AM, Dain Sundstrom wrote:

The ConnectionTrackingCoordinator now supports lazy connector activation via the optional 'lazyActivation' GBean attribute. Currently, the CTC tracks all connections opened in a component instance and when the component is reentered, all previously open connections are reconnected. The new optional mode waits to reconnect connection until they are actually used. If the connection is not used, then it is not connected. This is accomplished by proxying the Connection instance. The proxy implements all interfaces that the Connection implemented, so the proxy can still be cast to a vendor specific connection interface (think Oracle JDBC Connection sub-interface).

One very nice side effect of this feature is that is reduces the burden to track open connections on a per component basis. Without lazy activation, each component instance must track previously open connections, so that they can be reconnected. With lazy activation, the proxy is performing this tracking, so the component is free to not track that information. Of course, components will still want to demarc component entrance and exit so the Connector system can return handles to the connection pool (for connectors that support disassociation), but that is a much simpler task. This relaxation of the requirements for a component integrator is very important to OpenEJB3 as we now use JPA for CMP and will not be able to implement all of the connector tracking rules that we were when we had complete control over the CMP implementation. This will also make integration with component frameworks Spring much easier since connection tracking can be optional.

I have applied this improvement to trunk where is it on by default and to branch/1.2 where it is not active. I have also verified that the it does not break the tck for 1.2 in either mode.

-dain

Reply via email to