There are 2 halves to the jca spec. We use the spi half for everything. For a database we do not use cci but rather jdbc
javax.resource.cci.ConnectionFactory replaced by javax.sql.DataSource javax.resource.cci.Connection replaced by java.sql.Connection There are a couple of jca wrappers around jdbc drivers or you can use the firebirdsql jca-jdbc driver directly. david jencks On 2002.05.21 08:47:57 -0400 Andre Selton wrote: > Hi, > > How I can access a database from a connection ? > Looking at the j2ee connector spec I can find the > first steps to do this connection are : > > Context initctx = new InitialContext(); > ConnectionFactory cfx = (ConnectionFactory) > initctx.lookup("java:/DefaultDS"); > javax.resource.cci.Connection cx = > cfx.getConnection(); > > Ok. But how I can use this cx variable to get a > java.sql.Connection to then make my database calls ? > > java.sql.Connection con = ???; > Statement st = con.createStatement(); > java.sql.ResultSet rs = st.executeQuery("SELECT > * from employee"); > while (rs.next()) { > ... > } > st.close(); > con.close(); > cx.close(); > > TIA. > > Andre S. > > __________________________________________________ > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience > http://launch.yahoo.com > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user