com.ca.jcs.stub
Class StubMetaConnectionFactory

java.lang.Object
  extended by org.apache.commons.pool.BasePoolableObjectFactory
      extended by com.ca.jcs.stub.StubMetaConnectionFactory
All Implemented Interfaces:
Activatable, PoolableObjectFactory

public class StubMetaConnectionFactory
extends BasePoolableObjectFactory
implements Activatable

Sample 'dummy' connection factory used by the sample connection pooling class Shows connection factory interface $Id: StubMetaConnectionFactory.java 42493 2009-05-11 06:00:12Z hopno02 $


Constructor Summary
StubMetaConnectionFactory(Attributes attrs)
          Called by the custom connection pooling class and given all available connector level attributes The attributes should be all the context that the factory needs to create connections
 
Method Summary
 void activate()
          Optional factory activation method can be implemented
 void deactivate()
          * Optional factory de-activation method can be implemented
 void destroyObject(Object o)
          This is where a connection is teared down from the pool
 Object makeObject()
          This is where a connection gets created and given to the pool
 
Methods inherited from class org.apache.commons.pool.BasePoolableObjectFactory
activateObject, passivateObject, validateObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubMetaConnectionFactory

public StubMetaConnectionFactory(Attributes attrs)
Called by the custom connection pooling class and given all available connector level attributes The attributes should be all the context that the factory needs to create connections

Method Detail

makeObject

public Object makeObject()
                  throws Exception
This is where a connection gets created and given to the pool

Specified by:
makeObject in interface PoolableObjectFactory
Specified by:
makeObject in class BasePoolableObjectFactory
Returns:
Throws:
Exception

destroyObject

public void destroyObject(Object o)
                   throws Exception
This is where a connection is teared down from the pool

Specified by:
destroyObject in interface PoolableObjectFactory
Overrides:
destroyObject in class BasePoolableObjectFactory
Parameters:
o -
Throws:
Exception

activate

public void activate()
              throws NamingException
Optional factory activation method can be implemented

Specified by:
activate in interface Activatable
Throws:
NamingException

deactivate

public void deactivate()
                throws NamingException
* Optional factory de-activation method can be implemented

Specified by:
deactivate in interface Activatable
Throws:
NamingException


Created 2011-07-14 13:27 EST