public abstract class AbstractConnectionFactory extends Object implements ConnectionFactory
Modifier and Type | Field and Description |
---|---|
protected Map |
options |
protected String |
resourceType |
protected StoreManager |
storeMgr |
DATANUCLEUS_CONNECTION_RESOURCE_TYPE, DATANUCLEUS_CONNECTION2_RESOURCE_TYPE, RESOURCE_TYPE_OPTION
Constructor and Description |
---|
AbstractConnectionFactory(StoreManager storeMgr,
String resourceType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Release any resources that have been allocated.
|
ManagedConnection |
getConnection(ExecutionContext ec,
Transaction txn,
Map options)
Obtain a connection from the Factory.
|
String |
toString()
Method to return a string form of this object for convenience debug.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createManagedConnection
protected StoreManager storeMgr
protected Map options
protected String resourceType
public AbstractConnectionFactory(StoreManager storeMgr, String resourceType)
storeMgr
- The store manager needing the connectionresourceType
- Type of resource (tx, nontx)public ManagedConnection getConnection(ExecutionContext ec, Transaction txn, Map options)
ConnectionFactory
getConnection
in interface ConnectionFactory
ec
- ExecutionContext that the connection is bound to during its lifecycle (or null)options
- Any options for then creating the connectionManagedConnection
public void close()
ConnectionFactory
close
in interface ConnectionFactory
Copyright © 2019. All rights reserved.