Results 1 to 1 of 1
Thread: JSP - using connection cache
-
JSP - using connection cache
Code below shows how to use connection cache from JSP:
Note: myconnection contains the cache name to be used
Java Code:javax.naming.InitialContext ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/myconnection"); java.sql.Connection con = ds.getConnection(); java.sql.PreparedStatement stmt = con.prepareStatement(sql); java.sql.ResultSet rs = stmt.executeQuery(); while (rs.next()) { //do something }
Similar Threads
-
clear cache
By Jadellll in forum New To JavaReplies: 0Last Post: 03-20-2008, 09:27 AM -
BuffededImage cache
By tim in forum New To JavaReplies: 1Last Post: 01-24-2008, 12:00 AM -
cache problem in jsp
By lpwing in forum JavaServer Pages (JSP) and JSTLReplies: 4Last Post: 01-15-2008, 07:43 AM -
how to restict cache
By fred in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 07-24-2007, 01:56 AM -
cache problem
By MichYer in forum Java AppletsReplies: 3Last Post: 07-11-2007, 09:13 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks