org.apache.commons.dbcp.datasources
Class SharedPoolDataSourceFactory

java.lang.Object
  |
  +--org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory
        |
        +--org.apache.commons.dbcp.datasources.SharedPoolDataSourceFactory
All Implemented Interfaces:
ObjectFactory

public class SharedPoolDataSourceFactory
extends org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory

A JNDI ObjectFactory which creates SharedPoolDataSources

Version:
$Revision: 1.4 $ $Date: 2004/02/28 12:18:17 $

Constructor Summary
SharedPoolDataSourceFactory()
           
 
Method Summary
static void closeAll()
          Close all pools associated with this class.
protected static Object deserialize(byte[] data)
          used to set some properties saved within a Reference
protected  org.apache.commons.dbcp.datasources.InstanceKeyDataSource getNewInstance(Reference ref)
          Creates an instance of the subclass and sets any properties contained in the Reference.
 Object getObjectInstance(Object refObj, Name name, Context context, Hashtable env)
          implements ObjectFactory to create an instance of SharedPoolDataSource or PerUserPoolDataSource
protected  boolean isCorrectClass(String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedPoolDataSourceFactory

public SharedPoolDataSourceFactory()
Method Detail

isCorrectClass

protected boolean isCorrectClass(String className)
Specified by:
isCorrectClass in class org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory
Returns:
true if and only if className is the value returned from getClass().getName().toString()

getNewInstance

protected org.apache.commons.dbcp.datasources.InstanceKeyDataSource getNewInstance(Reference ref)
Description copied from class: org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory
Creates an instance of the subclass and sets any properties contained in the Reference.

Specified by:
getNewInstance in class org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory

closeAll

public static void closeAll()
                     throws Exception
Close all pools associated with this class.

Exception

getObjectInstance

public Object getObjectInstance(Object refObj,
                                Name name,
                                Context context,
                                Hashtable env)
                         throws IOException,
                                ClassNotFoundException
implements ObjectFactory to create an instance of SharedPoolDataSource or PerUserPoolDataSource

Specified by:
getObjectInstance in interface ObjectFactory
IOException
ClassNotFoundException

deserialize

protected static final Object deserialize(byte[] data)
                                   throws IOException,
                                          ClassNotFoundException
used to set some properties saved within a Reference

IOException
ClassNotFoundException


Copyright © 2001-2004 The Apache Software Foundation. All Rights Reserved.