org.slim3.container.plugin
Class DataSourcePlugin

java.lang.Object
  extended by org.slim3.container.plugin.DataSourcePlugin
All Implemented Interfaces:
Plugin

public class DataSourcePlugin
extends Object
implements Plugin

A plugin implementation class for data source.

Author:
higa

Field Summary
protected static String DATA_SOURCES_KEY
          The data source key.
protected static String DRIVER_SUFFIX
          The driver class suffix.
protected static String FREE_POOL_TIMEOUT_SUFFIX
          The free pool timeout suffix.
protected static String JNDI_SUFFIX
          The JNDI suffix.
protected static Log log
          The log.
protected static String LOGIN_TIMEOUT_SUFFIX
          The driver class suffix.
protected static String MAX_ACTIVE_SIZE_SUFFIX
          The driver class suffix.
protected static String PASSWORD_SUFFIX
          The password suffix.
protected static String READ_ONLY_SUFFIX
          The read only suffix.
protected  DataSourceImpl slim3DataSource
          The data source for Slim3.
protected static String TRANSACTION_ISOLATION_LEVEL_SUFFIX
          The transaction isolation level suffix.
protected static String URL_SUFFIX
          The url suffix.
protected static String USER_SUFFIX
          The user suffix.
protected static String VALIDATION_QUERY_SUFFIX
          The validation query suffix.
 
Constructor Summary
DataSourcePlugin()
           
 
Method Summary
 void destroy()
          This method is called when an application stops.
 void initialize()
          This method is called when an application starts.
protected  void initialize(String dsName)
          Initializes the configuration.
protected  void initializeForJndi(String dsName, String jndi)
          Initializes the JNDI configuration.
protected  void initializeForSlim3(String dsName)
          Initializes the Slim3 configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_SOURCES_KEY

protected static final String DATA_SOURCES_KEY
The data source key.

See Also:
Constant Field Values

JNDI_SUFFIX

protected static final String JNDI_SUFFIX
The JNDI suffix.

See Also:
Constant Field Values

DRIVER_SUFFIX

protected static final String DRIVER_SUFFIX
The driver class suffix.

See Also:
Constant Field Values

URL_SUFFIX

protected static final String URL_SUFFIX
The url suffix.

See Also:
Constant Field Values

USER_SUFFIX

protected static final String USER_SUFFIX
The user suffix.

See Also:
Constant Field Values

PASSWORD_SUFFIX

protected static final String PASSWORD_SUFFIX
The password suffix.

See Also:
Constant Field Values

LOGIN_TIMEOUT_SUFFIX

protected static final String LOGIN_TIMEOUT_SUFFIX
The driver class suffix.

See Also:
Constant Field Values

READ_ONLY_SUFFIX

protected static final String READ_ONLY_SUFFIX
The read only suffix.

See Also:
Constant Field Values

TRANSACTION_ISOLATION_LEVEL_SUFFIX

protected static final String TRANSACTION_ISOLATION_LEVEL_SUFFIX
The transaction isolation level suffix.

See Also:
Constant Field Values

MAX_ACTIVE_SIZE_SUFFIX

protected static final String MAX_ACTIVE_SIZE_SUFFIX
The driver class suffix.

See Also:
Constant Field Values

FREE_POOL_TIMEOUT_SUFFIX

protected static final String FREE_POOL_TIMEOUT_SUFFIX
The free pool timeout suffix.

See Also:
Constant Field Values

VALIDATION_QUERY_SUFFIX

protected static final String VALIDATION_QUERY_SUFFIX
The validation query suffix.

See Also:
Constant Field Values

log

protected static Log log
The log.


slim3DataSource

protected DataSourceImpl slim3DataSource
The data source for Slim3.

Constructor Detail

DataSourcePlugin

public DataSourcePlugin()
Method Detail

initialize

public void initialize()
                throws Exception
Description copied from interface: Plugin
This method is called when an application starts.

Specified by:
initialize in interface Plugin
Throws:
Exception - if an exception is encountered

destroy

public void destroy()
             throws Exception
Description copied from interface: Plugin
This method is called when an application stops.

Specified by:
destroy in interface Plugin
Throws:
Exception - if an exception is encountered

initialize

protected void initialize(String dsName)
                   throws Exception
Initializes the configuration.

Parameters:
dsName - data source name.
Throws:
Exception - if an exception is encountered

initializeForJndi

protected void initializeForJndi(String dsName,
                                 String jndi)
                          throws Exception
Initializes the JNDI configuration.

Parameters:
dsName - data source name.
jndi - JNDI name.
Throws:
Exception - if an exception is encountered

initializeForSlim3

protected void initializeForSlim3(String dsName)
                           throws Exception
Initializes the Slim3 configuration.

Parameters:
dsName - data source name.
Throws:
Exception - if an exception is encountered


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.