org.mmbase.module.database
Class JDBC
java.lang.Object
|
+--org.mmbase.module.Module
|
+--org.mmbase.module.ProcessorModule
|
+--org.mmbase.module.database.JDBC
- All Implemented Interfaces:
- JDBCInterface, ProcessorInterface
- public class JDBC
- extends ProcessorModule
- implements JDBCInterface
JDBC Module the module that provides you access to the loaded JDBC interfaces
we use this as the base to get multiplexes/pooled JDBC connects.
- Version:
- $Id: JDBC.java,v 1.20 2001/07/02 15:09:48 pierre Exp $
|
Constructor Summary |
JDBC()
|
|
Method Summary |
void |
checkTime()
|
MultiConnection |
getConnection(java.lang.String url)
|
MultiConnection |
getConnection(java.lang.String url,
java.lang.String name,
java.lang.String password)
|
java.lang.String |
getDatabaseName()
|
java.sql.Connection |
getDirectConnection(java.lang.String url)
|
java.sql.Connection |
getDirectConnection(java.lang.String url,
java.lang.String name,
java.lang.String password)
|
java.util.Vector |
getList(scanpage sp,
StringTagger tagger,
java.lang.String value)
Generate a list of values from a command to the processor |
java.lang.String |
getPassword()
|
java.lang.String |
getUser()
|
void |
init()
Initializes the module. |
java.util.Vector |
listConnections(StringTagger tagger)
|
java.util.Vector |
listPools(StringTagger tagger)
|
java.lang.String |
makeUrl()
Routine build the url to give to the DriverManager
to open the connection. |
java.lang.String |
makeUrl(java.lang.String dbm)
Routine build the url to give to the DriverManager
to open the connection. |
java.lang.String |
makeUrl(java.lang.String host,
int port,
java.lang.String dbm)
Routine build the url to give to the DriverManager
to open the connection. |
java.lang.String |
makeUrl(java.lang.String host,
java.lang.String dbm)
Routine build the url to give to the DriverManager
to open the connection. |
void |
onload()
|
void |
reload()
Reload the properties and driver |
void |
shutdown()
|
void |
unload()
|
| Methods inherited from class org.mmbase.module.Module |
getClassName, getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModuleInfo, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setClassName, setInitParameter, setMaintainer, setName, setVersion, startModule, startModules, state |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBC
public JDBC()
onload
public void onload()
- Overrides:
onload in class ProcessorModule
init
public void init()
- Description copied from class:
Module
- Initializes the module.
Init can be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.
- Overrides:
init in class ProcessorModule
reload
public void reload()
- Reload the properties and driver
- Overrides:
reload in class ProcessorModule
unload
public void unload()
- Overrides:
unload in class ProcessorModule
shutdown
public void shutdown()
- Overrides:
shutdown in class ProcessorModule
makeUrl
public java.lang.String makeUrl()
- Routine build the url to give to the DriverManager
to open the connection. This way a servlet/module
doesn't need to care about what database it talks to.
- Specified by:
makeUrl in interface JDBCInterface
- See Also:
DriverManager.getConnection(java.lang.String)
makeUrl
public java.lang.String makeUrl(java.lang.String dbm)
- Routine build the url to give to the DriverManager
to open the connection. This way a servlet/module
doesn't need to care about what database it talks to.
- Specified by:
makeUrl in interface JDBCInterface
- See Also:
DriverManager.getConnection(java.lang.String)
makeUrl
public java.lang.String makeUrl(java.lang.String host,
java.lang.String dbm)
- Routine build the url to give to the DriverManager
to open the connection. This way a servlet/module
doesn't need to care about what database it talks to.
- Specified by:
makeUrl in interface JDBCInterface
- See Also:
DriverManager.getConnection(java.lang.String)
makeUrl
public java.lang.String makeUrl(java.lang.String host,
int port,
java.lang.String dbm)
- Routine build the url to give to the DriverManager
to open the connection. This way a servlet/module
doesn't need to care about what database it talks to.
- Specified by:
makeUrl in interface JDBCInterface
- See Also:
DriverManager.getConnection(java.lang.String)
getConnection
public MultiConnection getConnection(java.lang.String url,
java.lang.String name,
java.lang.String password)
throws java.sql.SQLException
- Specified by:
getConnection in interface JDBCInterface
getConnection
public MultiConnection getConnection(java.lang.String url)
throws java.sql.SQLException
- Specified by:
getConnection in interface JDBCInterface
getDirectConnection
public java.sql.Connection getDirectConnection(java.lang.String url,
java.lang.String name,
java.lang.String password)
throws java.sql.SQLException
- Specified by:
getDirectConnection in interface JDBCInterface
getDirectConnection
public java.sql.Connection getDirectConnection(java.lang.String url)
throws java.sql.SQLException
- Specified by:
getDirectConnection in interface JDBCInterface
checkTime
public void checkTime()
- Specified by:
checkTime in interface JDBCInterface
getList
public java.util.Vector getList(scanpage sp,
StringTagger tagger,
java.lang.String value)
throws ParseException
- Description copied from class:
ProcessorModule
- Generate a list of values from a command to the processor
- Overrides:
getList in class ProcessorModule
- Following copied from class:
org.mmbase.module.ProcessorModule
- Parameters:
sp - the page contextparams - contains the attributes for the listcommand - the list command to execute.
listPools
public java.util.Vector listPools(StringTagger tagger)
listConnections
public java.util.Vector listConnections(StringTagger tagger)
getUser
public java.lang.String getUser()
- Specified by:
getUser in interface JDBCInterface
getPassword
public java.lang.String getPassword()
- Specified by:
getPassword in interface JDBCInterface
getDatabaseName
public java.lang.String getDatabaseName()
- Specified by:
getDatabaseName in interface JDBCInterface
MMBase 2001