Greetings,
 as some of you know there have been previous discussions on the list
about the responsibility for validation of discarded Connection instances
in the object pools in OJB's default ConnectionManagerPooledImpl and
ConnectionManagerDBCPImpl.

A user-submitted patch applied to OJB's pooling code improved a
specific situation where many closed/discarded were sitting idle
in the OJB Connection pool.

However, we later started raising some concerns about this patch
and if it was not interfering with the Commons Pool API (which
is very configurable/flexible but almost too complex at times).

After having a few stabs at trying to improve the documentation
in that area and also making internal method names more straigh-
forward it became more and more clear that all extra added
validation logic in OJB should better be left to Commons Pool
and the very strict lifecycle contract it adhers to.

We have done some refactoring/moving of things around in
the connection factories and believe that the current
situation is much easier to overview also for the fair few
folks that have implemented/extended their own connection
factories. Basically it boils down to making the JavaDoc very
strict about pre- and post-conditions at some points
and re-use of some central functions in the abstract base
that OJB's default pooled impl and DBCP impl share.



Folks interested in the Connection handling area, if you
update the connection factories from CVS on the
OJB_1_0_RELEASE branch, have a look at the latest
repository.dtd or take a sneak peek of what will probably
become the next version of the OJB website [1] I think
this whole mechanism is now much clearer and much better
documented in OJB.

On a side note: the "abandoned config" mechanism in DBCP
to detect bad programming patterns used to not work (?).
I have not made a fully reproducable test-scenario
but I would assume that no one has been able to actually
getting logged discarded connections due to abandoned
eviction? This should now be fixed in CVS and there
is a testcase to prove it (that severely stuffs upp
OJB's testsuite at the moment, so it will need to
be smoothed on the rough edges before you will see it
in CVS...).

Regards,
 Martin

[1] 
http://people.apache.org/~mkalen/ojb/site/docu/guides/repository.html#Attributes-N102EE

NB! The documentation link goes to my personal ASF homepage with a preview
of a suggested doc update in some areas. Please do not use this URL for linking
to the OJB website, as the content under "~mkalen" will likely dissapear within
a few days.

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



Reply via email to