org.mmbase.module.database
Class JDBC

Package class diagram package JDBC
java.lang.Object
  extended by org.mmbase.util.functions.FunctionProvider
      extended by org.mmbase.util.functions.DescribedFunctionProvider
          extended by org.mmbase.module.Module
              extended by org.mmbase.module.ProcessorModule
                  extended by org.mmbase.module.database.JDBC
All Implemented Interfaces:
Descriptor

public class JDBC
extends ProcessorModule

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. It is also possible to define a DataSource, then this module can remain unused.

Version:
$Id: JDBC.java 45150 2011-02-10 09:18:12Z michiel $
Author:
vpro

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mmbase.module.ProcessorModule
ProcessorModule.GetNodeListFunction, ProcessorModule.ProcessFunction, ProcessorModule.ReplaceFunction
 
Field Summary
 
Fields inherited from class org.mmbase.module.ProcessorModule
PARAM_PAGEINFO, PARAMS_PAGEINFO
 
Fields inherited from class org.mmbase.module.Module
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIME
 
Fields inherited from class org.mmbase.util.functions.DescribedFunctionProvider
description, guiName, name
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
JDBC(String name)
           
 
Method Summary
 void checkTime()
           
 MultiConnection getConnection(String url)
           
 MultiConnection getConnection(String url, String name, String password)
           
 String getDatabaseName()
           
 Connection getDirectConnection(String url)
           
 Connection getDirectConnection(String url, String name, String password)
           
 Vector getList(PageInfo sp, StringTagger tagger, String value)
          User interface stuff
 String getPassword()
           
 DatabaseSupport getSupport()
           
 String getUser()
           
 void init()
          
 List<String> listConnections(StringTagger tagger)
           
 List<String> listPools(StringTagger tagger)
           
 String makeUrl()
          Routine build the url to give to the DriverManager to open the connection.
 String makeUrl(String dbm)
          Routine build the url to give to the DriverManager to open the connection.
 String makeUrl(String host, int port, String dbm)
          Routine build the url to give to the DriverManager to open the connection.
 String makeUrl(String host, String dbm)
          Routine build the url to give to the DriverManager to open the connection.
 void onload()
          
 void reload()
          What should this do, when is this called?
protected  void shutdown()
           
 String toString()
          Give some info about the jdbc connection
 void unload()
          What should this do, when is this called?
 
Methods inherited from class org.mmbase.module.ProcessorModule
getListBuilder, getNodeList, process, replace, replace
 
Methods inherited from class org.mmbase.module.Module
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdownModules, startModule, startModules
 
Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName
 
Methods inherited from class org.mmbase.util.functions.FunctionProvider
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDBC

public JDBC(String name)
Method Detail

onload

public void onload()
Description copied from class: ProcessorModule

Overrides:
onload in class ProcessorModule

init

public void init()
Description copied from class: ProcessorModule

Overrides:
init in class ProcessorModule

reload

public void reload()
What should this do, when is this called? Reload the properties and driver

Overrides:
reload in class ProcessorModule

unload

public void unload()
Description copied from class: ProcessorModule
What should this do, when is this called?

Overrides:
unload in class ProcessorModule

shutdown

protected void shutdown()
Overrides:
shutdown in class Module

getSupport

public DatabaseSupport getSupport()
Since:
MMBase-1.8.5

makeUrl

public 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.

See Also:
DriverManager.getConnection(java.lang.String)

makeUrl

public String makeUrl(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.

See Also:
DriverManager.getConnection(java.lang.String)

makeUrl

public String makeUrl(String host,
                      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.

See Also:
DriverManager.getConnection(java.lang.String)

makeUrl

public String makeUrl(String host,
                      int port,
                      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.

See Also:
DriverManager.getConnection(java.lang.String)

getConnection

public MultiConnection getConnection(String url,
                                     String name,
                                     String password)
                              throws SQLException
Throws:
SQLException
Javadoc:

getConnection

public MultiConnection getConnection(String url)
                              throws SQLException
Throws:
SQLException
Javadoc:

getDirectConnection

public Connection getDirectConnection(String url,
                                      String name,
                                      String password)
                               throws SQLException
Throws:
SQLException
Javadoc:

getDirectConnection

public Connection getDirectConnection(String url)
                               throws SQLException
Throws:
SQLException
Javadoc:

checkTime

public void checkTime()
Javadoc:

getList

public Vector getList(PageInfo sp,
                      StringTagger tagger,
                      String value)
User interface stuff

Overrides:
getList in class ProcessorModule
Javadoc:

listPools

public List<String> listPools(StringTagger tagger)
Javadoc:

listConnections

public List<String> listConnections(StringTagger tagger)
Javadoc:

getUser

public String getUser()
Javadoc:

getPassword

public String getPassword()
Javadoc:

getDatabaseName

public String getDatabaseName()
Javadoc:

toString

public String toString()
Give some info about the jdbc connection

Overrides:
toString in class Object
Returns:
a String whith some information about the connection


MMBase2 Core 2.0-SNAPSHOT - 2013-05-29T22:08