org.mmbase.module.database
Class Naming
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.database.Naming
- All Implemented Interfaces:
- JDBCInterface, ProcessorInterface
- public class Naming
- extends ProcessorModule
- implements JDBCInterface
This class is used to retrieve a connection, which is provided by naming resources.
With the usage of naming resource, it is possible to configure the database resource
inside the application server and let the application server do the pooling. Since
this is a J2EE concept, this class provides support for usage of this.
- Version:
- $Id: Naming.java,v 1.4 2005/12/24 11:35:45 michiel Exp $
- Author:
- Eduard Witteveen
| Methods inherited from class org.mmbase.module.Module |
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules, state |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Naming
public Naming()
init
public void init()
- Init this module. Will check if properties are available and try to get a datasource, to
test if we can use it.
- Overrides:
init in class ProcessorModule
reload
public void reload()
- is a reload the same as an init?
- Overrides:
reload in class ProcessorModule
getConnection
public MultiConnection getConnection(String url,
String name,
String password)
throws SQLException
- Specified by:
getConnection in interface JDBCInterface
- Throws:
SQLException
getConnection
public MultiConnection getConnection(String url)
throws SQLException
- Specified by:
getConnection in interface JDBCInterface
- Throws:
SQLException
getDirectConnection
public Connection getDirectConnection(String url)
throws SQLException
- Specified by:
getDirectConnection in interface JDBCInterface
- Throws:
SQLException
getDirectConnection
public Connection getDirectConnection(String url,
String name,
String password)
throws SQLException
- Specified by:
getDirectConnection in interface JDBCInterface
- Throws:
SQLException
unload
public void unload()
- Description copied from class:
ProcessorModule
- What should this do, when is this called?
- Overrides:
unload in class ProcessorModule
shutdown
public void shutdown()
- Description copied from class:
Module
- Shuts down the module. This method is called by shutdownModules.
- Overrides:
shutdown in class Module
makeUrl
public String makeUrl()
- Specified by:
makeUrl in interface JDBCInterface
makeUrl
public String makeUrl(String dbm)
- Specified by:
makeUrl in interface JDBCInterface
makeUrl
public String makeUrl(String host,
String dbm)
- Specified by:
makeUrl in interface JDBCInterface
makeUrl
public String makeUrl(String host,
int port,
String dbm)
- Specified by:
makeUrl in interface JDBCInterface
getUser
public String getUser()
- Specified by:
getUser in interface JDBCInterface
getPassword
public String getPassword()
- Specified by:
getPassword in interface JDBCInterface
getDatabaseName
public String getDatabaseName()
- Specified by:
getDatabaseName in interface JDBCInterface
checkTime
public void checkTime()
- Specified by:
checkTime in interface JDBCInterface
MMBase build 1.8.1.20060716