> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
> 
> In J2EE, it is common to have session EJBs working with JDBC 
> connection. You obtain connection whenever you need it and 
> return to the pool when you are done.

Semantic clarification:

You get the DataSource, and call getConnection().  The DataSource
may have pooled the connection or not.  That's not really the
point.  You never explicitly return it to a pool.  You call
connection.close(), and if the connection is pooled then it is
silently returned to the pool.

That is a key distinction.

You LOOKUP the DataSource, which can be shared between all threads,
and then you USE it to get the connection INSTANCE.  The instance
is used the same way WHETHER IT IS POOLED OR NOT.

I am advocating the same thing for the CM


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

Reply via email to