snaq.db
Class DBPoolDataSourceFactory
java.lang.Object
snaq.db.DBPoolDataSourceFactory
- All Implemented Interfaces:
- ObjectFactory
public class DBPoolDataSourceFactory
- extends Object
- implements ObjectFactory
Factory for creating instances of the DBPoolDataSource
class.
- Author:
- Giles Winstanley
DBPoolDataSourceFactory
public DBPoolDataSourceFactory()
getObjectInstance
public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
throws Exception
- Creates a
DBPoolDataSource
instance using the location or reference information specified.
The ConnectionPool
parameters are extracted from the obj
reference object.
- Specified by:
getObjectInstance
in interface ObjectFactory
- Parameters:
obj
- Reference
object containing information for creating the ConnectionPool
name
- name of this object relative to nameCtx
, or null if no name is specifiednameCtx
- context relative to which the name
parameter is specified, or null if name
is relative to the default initial contextenvironment
- possibly null environment that is used in creating the object
- Returns:
- The
DBPoolDataSource
instance as specified, or null if it cannot be found/created.
- Throws:
Exception
- if this object factory encountered an exception while attempting to create the DBPoolDataSource
, and no other object factories are to be tried.