Package org.datanucleus.store.connection
Class AbstractConnectionFactory
- java.lang.Object
-
- org.datanucleus.store.connection.AbstractConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
public abstract class AbstractConnectionFactory extends java.lang.Object implements ConnectionFactory
Abstract implementation of a ConnectionFactory for a DataNucleus-supported datastore.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRESOURCE_NAME_NONTXstatic java.lang.StringRESOURCE_NAME_TXprotected java.lang.StringresourceNameName of this resource ("tx", "non-tx" etc).protected java.lang.StringresourceTypeType of resource represented by this ConnectionFactory.protected StoreManagerstoreMgr
-
Constructor Summary
Constructors Constructor Description AbstractConnectionFactory(StoreManager storeMgr, java.lang.String resourceName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Release any resources that have been allocated.java.lang.StringgetResourceName()Accessor for the resource name (e.g "jdbc/tx").java.lang.StringgetResourceType()Type of resource that this ConnectionFactory represents.java.lang.StringtoString()Method to return a string form of this object for convenience debug.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.datanucleus.store.connection.ConnectionFactory
createManagedConnection
-
-
-
-
Field Detail
-
storeMgr
protected StoreManager storeMgr
-
resourceType
protected final java.lang.String resourceType
Type of resource represented by this ConnectionFactory. See ConnectionResourceType.
-
resourceName
protected final java.lang.String resourceName
Name of this resource ("tx", "non-tx" etc).
-
RESOURCE_NAME_TX
public static final java.lang.String RESOURCE_NAME_TX
- See Also:
- Constant Field Values
-
RESOURCE_NAME_NONTX
public static final java.lang.String RESOURCE_NAME_NONTX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractConnectionFactory
public AbstractConnectionFactory(StoreManager storeMgr, java.lang.String resourceName)
Constructor.- Parameters:
storeMgr- The store manager needing the connectionresourceName- Name of resource (tx, nontx)
-
-
Method Detail
-
getResourceName
public java.lang.String getResourceName()
Description copied from interface:ConnectionFactoryAccessor for the resource name (e.g "jdbc/tx").- Specified by:
getResourceNamein interfaceConnectionFactory- Returns:
- The resource name
-
getResourceType
public java.lang.String getResourceType()
Description copied from interface:ConnectionFactoryType of resource that this ConnectionFactory represents. See ConnectionResourceType.- Specified by:
getResourceTypein interfaceConnectionFactory- Returns:
- Resource type ("JTA", "RESOURCE_LOCAL")
-
close
public void close()
Description copied from interface:ConnectionFactoryRelease any resources that have been allocated.- Specified by:
closein interfaceConnectionFactory
-
toString
public java.lang.String toString()
Method to return a string form of this object for convenience debug.- Overrides:
toStringin classjava.lang.Object- Returns:
- The String form
-
-