On Tue, 27 Mar 2001, Chris Dole wrote:
> Hello,
>
> I'm writing a stateless session bean and need to get a connection to my
> connection pool. Does anyone have a code snippet for how to do this?
> Specifically, what is the URL to use in the call to either or both of:
>
> DriverManager.getConnection("jdbc:xxx:yyy:MyPoolName")
>
> or to:
>
> DataSource ds = (DataSource)(new
> InitialContext()).lookup("java:xxx/yyy/zzz/MyPoolName")
>
> Is any one of the above preferable over the other? I know that DataSource
> is newer...
the second choice is preferable as you getting connection from the pool.
IIRC, you're actually getting a minerva's XAClientConnection which wraps
the underlying connection. in XAClientConnection, when you close the
*connection*, it is actually returning the underlying connection to the
pool.
hth.
.r
> Any help much appreciated!
>
> Thanks,
> Chris
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user