public abstract class AbstractConnectionFactory extends Object implements ConnectionFactory
Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_NAME_NONTX |
static String |
RESOURCE_NAME_TX |
protected String |
resourceName
Name of this resource ("tx", "non-tx" etc).
|
protected String |
resourceType
Type of resource represented by this ConnectionFactory.
|
protected StoreManager |
storeMgr |
DATANUCLEUS_CONNECTION_RESOURCE_TYPE, DATANUCLEUS_CONNECTION2_RESOURCE_TYPE
Constructor and Description |
---|
AbstractConnectionFactory(StoreManager storeMgr,
String resourceName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Release any resources that have been allocated.
|
String |
getResourceName()
Accessor for the resource name (e.g "jdbc/tx").
|
String |
getResourceType()
Type of resource that this ConnectionFactory represents.
|
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 final String resourceType
protected final String resourceName
public static final String RESOURCE_NAME_TX
public static final String RESOURCE_NAME_NONTX
public AbstractConnectionFactory(StoreManager storeMgr, String resourceName)
storeMgr
- The store manager needing the connectionresourceName
- Name of resource (tx, nontx)public String getResourceName()
ConnectionFactory
getResourceName
in interface ConnectionFactory
public String getResourceType()
ConnectionFactory
getResourceType
in interface ConnectionFactory
public void close()
ConnectionFactory
close
in interface ConnectionFactory
Copyright © 2019. All rights reserved.