com.microdeveloper.db.jndi
Class ConnectionPoolTest
java.lang.Object
com.microdeveloper.db.jndi.ConnectionPoolTest
- All Implemented Interfaces:
- Serializable
public class ConnectionPoolTest
- extends Object
- implements Serializable
ConnectionPoolTest is used to ensure that the Connection Pool and JNDI is working properly. It cannot be used in a
standalone manner and must be used from within the context of a web service where the JNDI service is available.
Most commonly, this would be a simple JSP page as in this example:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head><title>JSP Page</title></head>
<body>
<% com.microdeveloper.db.jndi.ConnectionPoolTest ocp = new com.microdeveloper.db.jndi.ConnectionPoolTest("ORCL");
ocp.init(); %>
<h2>Results</h2>
Message: <%= ocp.getMessage() %>
</body>
</html>
Revision History:
Jan 18, 2005 12:40:22 Created.
- Version:
- 1.0
- Author:
- Gregg Lagnese
- See Also:
- Serialized Form
Method Summary |
String |
getMessage()
Returns the current message that verifies the init performed successfully. |
void |
init(String JNDIName)
Establish the connection and test it by performing the simple query
"SELECT 'Success obtaining connection' FROM DUAL" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
message
String message
ConnectionPoolTest
public ConnectionPoolTest()
init
public void init(String JNDIName)
- Establish the connection and test it by performing the simple query
"SELECT 'Success obtaining connection' FROM DUAL"
- Parameters:
JNDIName
- the JNDI name to connect to
getMessage
public String getMessage()
- Returns the current message that verifies the init performed successfully.
- Returns:
- the String "Success obtaining connection" if the init was successful or "Not Connected" if not
Copyright©2001-2007 MicroDeveloper, Inc. All Rights Reserved.