org.erif.util
Class DbUtil
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--org.erif.util.DbUtil
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class DbUtil
- extends javax.servlet.http.HttpServlet
DbUtil needs to be init with the "dburl" to get connections from.
See your web.xml, load-on-startup, init-param... for instance:
<servlet-name>dbutil</servlet-name>
<servlet-class>org.erif.util.DbUtil</servlet-class>
<init-param>
<param-name>dburl</param-name>
<param-value>jdbc/zspace.calendar</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- See Also:
- Serialized Form
Method Summary |
static java.sql.Connection |
getConnection()
Gets a new Connection from the pool manager |
void |
init()
|
static void |
setDbURL(java.lang.String s)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DbUtil
public DbUtil()
init
public void init()
throws javax.servlet.ServletException
- Overrides:
init
in class javax.servlet.GenericServlet
setDbURL
public static void setDbURL(java.lang.String s)
getConnection
public static java.sql.Connection getConnection()
throws java.sql.SQLException
- Gets a new Connection from the pool manager
Copyright © 2003 - kaolin fire