users@glassfish.java.net

Where is com.sun.appserv.DataSource ?

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 May 2007 14:39:34 PDT

Hello,

I just read this tutorial https://glassfish.dev.java.net/javaee5/docs/DG/beamj.html#beams and created a JDBC connection pool for my MySQL database.

Now I want to use to my JDBC connection pool with this code :

InitialContext ctx = new InitialContext();
com.sun.appserv.DataSource ds = (com.sun.appserv.DataSource)
   ctx.lookup("jdbc/MyBase");
Connection con = ds.getConnection();
Connection drivercon = ds.getConnection(con);
// Do db operations.
con.close();

The problem is that I don't have the class com.sun.appserv.DataSource in my class path and can't find the jar file where this class is located (I already try to import all jar in the glassfish lib directory). Where is this class ?

Thanks in advance for your help.
[Message sent by forum member 'nicolasbolbol' (nicolasbolbol)]

http://forums.java.net/jive/thread.jspa?messageID=216556