snaq.db
Class DBPoolDataSourceFactory

java.lang.Object
  extended by 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

Constructor Summary
DBPoolDataSourceFactory()
           
 
Method Summary
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
          Creates a DBPoolDataSource instance using the location or reference information specified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBPoolDataSourceFactory

public DBPoolDataSourceFactory()
Method Detail

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 specified
nameCtx - context relative to which the name parameter is specified, or null if name is relative to the default initial context
environment - 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.