org.mmbase.module.database
Class Naming

java.lang.Object
  |
  +--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.3 2002/10/09 14:07:12 michiel Exp $
Author:
Eduard

Constructor Summary
Naming()
           
 
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.lang.String getPassword()
           
 java.lang.String getUser()
           
 void init()
          Init this module.
 java.lang.String makeUrl()
           
 java.lang.String makeUrl(java.lang.String dbm)
           
 java.lang.String makeUrl(java.lang.String host, int port, java.lang.String dbm)
           
 java.lang.String makeUrl(java.lang.String host, java.lang.String dbm)
           
 void reload()
          is a reload the same as an init?
 void shutdown()
          Shuts down the module.
 void unload()
           
 
Methods inherited from class org.mmbase.module.ProcessorModule
cacheCheck, getList, getListBuilder, getNodeList, onload, process, replace, replace
 
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, shutdownModules, startModule, startModules, state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Naming

public Naming()
Method Detail

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(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)
                                        throws java.sql.SQLException
Specified by:
getDirectConnection 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

unload

public void unload()
Overrides:
unload in class ProcessorModule

shutdown

public void shutdown()
Description copied from class: Module
Shuts down the module.
Overrides:
shutdown in class ProcessorModule

makeUrl

public java.lang.String makeUrl()
Specified by:
makeUrl in interface JDBCInterface

makeUrl

public java.lang.String makeUrl(java.lang.String dbm)
Specified by:
makeUrl in interface JDBCInterface

makeUrl

public java.lang.String makeUrl(java.lang.String host,
                                java.lang.String dbm)
Specified by:
makeUrl in interface JDBCInterface

makeUrl

public java.lang.String makeUrl(java.lang.String host,
                                int port,
                                java.lang.String dbm)
Specified by:
makeUrl in interface JDBCInterface

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

checkTime

public void checkTime()
Specified by:
checkTime in interface JDBCInterface


MMBase build 1.6.5.20030923