Jennifer Labit wrote:
> All,
>
> I need to be able to connect to my connection pool using something like
> this:
>
> DriverManager.getConnection("jdbc:xxx:yyy:MyPoolName")
> ...
>
> What is the jdbc connection url that I would use to do that with jBoss?
DriverManager won't give you a connection from a pool. It will create a
new connection every time you call getConnection.
>
> I know the opinions on this list are that this isn't the ideal way to do it,
> however, in this situation the database connection code needs to be
> appserver independent and this is the best way to achieve that goal.
No it isn't. The _standard_ way to do this in an EJB is to do a JNDI
lookup for a name that looks like "java:comp/env/jdbc/MyPoolName". This
is portable across application servers because the spec says that it has
to work.
-danch
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user