Dave Glasser wrote:
>
> On Sun, 14 Jan 2001 23:25:36 -0500, Jay Walters
> <[EMAIL PROTECTED]> wrote:
>
> >Remember that java.sql.Connection is an interface, so the container can
> >easily provide a wrapper in between your application and the real JDBC
> >driver to do whatever it wants. There was just an article in Java Report
> >about ways to extend JDBC drivers yourself using essentially the same
> >techniques.
> >
>
> Thanks for the reply. I dug into the source code for the J2EE RI and
> found out that is indeed what happens. I can work with this easily
> enough, but I don't like it for two reasons; one, it breaks the
> semantics of the Connection.close() method as described in the API
> docs, and two, the 1.1 spec is very vague on the subject, so one can
> only hope that all of the various containers out there will implement
> a wrapper correctly. I think I'd prefer to see a
> DataSource.releaseConnection(Connection) method. It would be a little
> bit more intuitive to use.
I don't see what your problem is. An API's "semantics" are always in two parts.
Part 1 is (or should be) a rigorous specification of what the API does in terms
of the application itself - e.g. Connection.close() destroys the ability to use
the the Connection. Part 2 is a sketch of the "intent" of the API which can
never be rigorous, eg Connection.close does errr something to do with freeing up
resources. DataSource.releaseConnection() and Connection.close() could have
identical Part 1 semantics. The part 2 semantics are a matter of implementer
choice.
Ian McCallion
Alexis Systems Limited
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".