public class AGConnFactory extends Object implements org.apache.commons.pool.PoolableObjectFactory, Closeable
AGRepositoryConnection API
to the commons-pool factory interface,
leaving creation of the connection (and configuration)
to a subclass, defined by users of this library.| Constructor and Description |
|---|
AGConnFactory(AGConnConfig props) |
AGConnFactory(AGConnConfig props,
AGPoolConfig poolProps) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(Object obj)
Calls
AGRepositoryConnection.rollback() and
resets AGRepositoryConnection.setAutoCommit(boolean)
if it has changed. |
void |
close()
Release resources.
|
void |
destroyObject(Object obj) |
Object |
makeObject() |
void |
passivateObject(Object obj) |
boolean |
validateObject(Object obj)
|
public AGConnFactory(AGConnConfig props)
public AGConnFactory(AGConnConfig props, AGPoolConfig poolProps)
public Object makeObject() throws Exception
makeObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic void activateObject(Object obj) throws Exception
AGRepositoryConnection.rollback() and
resets AGRepositoryConnection.setAutoCommit(boolean)
if it has changed.activateObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic void destroyObject(Object obj) throws Exception
destroyObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic void passivateObject(Object obj) throws Exception
passivateObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic boolean validateObject(Object obj)
validateObject in interface org.apache.commons.pool.PoolableObjectFactorypublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017 Franz Inc.. All rights reserved.