geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Dushok <bdus...@mac.com>
Subject Re: Database pool problem
Date Mon, 04 Sep 2006 21:44:39 GMT
Vamsi,

        Thanks!   Based upon your message I changed my code to:

	javax.naming.InitialContext ctx = new javax.naming.InitialContext();
         javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup 
("java:comp/env/jdbc/cl");
         java.sql.Connection con = (java.sql.Connection) 
ds.getConnection();

	It now appears to work.

	Thanks again,
	Bob

On Sep 3, 2006, at 11:28 PM, Vamsavardhana Reddy wrote:

> Hi Bob,
>
> You will need to add a cast in the second line of code above.  It  
> should look like the following:
>
> javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup 
> ("java:comp/env/jdbc/cl");
>
> Vamsi


Mime
View raw message