Package org.datanucleus.store.connection
Interface ConnectionFactory
- All Known Implementing Classes:
AbstractConnectionFactory
public interface ConnectionFactory
Factory for connections to the datastore.
To be implemented by all StoreManagers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Release any resources that have been allocated.createManagedConnection
(ExecutionContext ec, Map<String, Object> transactionOptions) Create the ManagedConnection.Accessor for the resource name (e.g "jdbc/tx").Type of resource that this ConnectionFactory represents.
-
Method Details
-
createManagedConnection
ManagedConnection createManagedConnection(ExecutionContext ec, Map<String, Object> transactionOptions) Create the ManagedConnection. Only used by ConnectionManager so do not call this.- Parameters:
ec
- ExecutionContext that the connection is bound to during its lifecycle (if any)transactionOptions
- the Transaction options this connection will be enlisted to, null if non existent- Returns:
- The ManagedConnection.
-
close
void close()Release any resources that have been allocated. -
getResourceType
String getResourceType()Type of resource that this ConnectionFactory represents. See ConnectionResourceType.- Returns:
- Resource type ("JTA", "RESOURCE_LOCAL")
-
getResourceName
String getResourceName()Accessor for the resource name (e.g "jdbc/tx").- Returns:
- The resource name
-