%-- ============================================================================+ | Copyright (c) 1999 Oracle Corporation, Redwood Shores, CA, USA | | All rights reserved. | +===========================================================================+ | FILENAME | | testDS.jsp | | | | DESCRIPTION | | | | NOTES | | | | DEPENDENCIES | | | | | | HISTORY | | 27-AUG-2003 sacsharm.us created | | | | $Header: testDS.jsp 26.0 2004/12/10 22:56:15 yohuang noship $ | | | +===========================================================================+ --%> <%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="javax.naming.*" %> <%@ page import="javax.sql.DataSource" %> <% final JspWriter streamOut = out; Runnable testDeployRunnable = new Runnable() { public void run() { try { DataSource ds = null; Context ic = new InitialContext(); ds = (DataSource) ic.lookup("jdbc/WorkflowDS"); if (ds != null) { java.sql.Connection conn = ds.getConnection(); String selectStatement = "select 'Installed Workflow version is '||text from wf_resources where name like 'WF_VERSION' and language = 'US'"; try { PreparedStatement prepStmt = conn.prepareStatement(selectStatement); ResultSet rs = prepStmt.executeQuery(); while (rs.next()) { streamOut.write(rs.getString(1)); } rs.close(); prepStmt.close(); } catch (Exception e) { streamOut.write(e.toString()); throw e; } finally { if (conn != null) conn.close(); } } else { streamOut.write("Null Data Source Retrieved"); } } catch (Exception e) { try { streamOut.write(e.toString() + "