public interface ConnectionFactory
Modifier and Type | Field and Description |
---|---|
static String |
DATANUCLEUS_CONNECTION_RESOURCE_TYPE
User-visible configuration property name
|
static String |
DATANUCLEUS_CONNECTION2_RESOURCE_TYPE
User-visible configuration property name
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Release any resources that have been allocated.
|
ManagedConnection |
createManagedConnection(ExecutionContext ec,
Map transactionOptions)
Create the ManagedConnection.
|
ManagedConnection |
getConnection(ExecutionContext ec,
Transaction transaction,
Map options)
Obtain a connection from the Factory.
|
String |
getResourceType()
Type of resource that this ConnectionFactory represents.
|
static final String DATANUCLEUS_CONNECTION_RESOURCE_TYPE
static final String DATANUCLEUS_CONNECTION2_RESOURCE_TYPE
ManagedConnection getConnection(ExecutionContext ec, Transaction transaction, Map options)
ec
- ExecutionContext that the connection is bound to during its lifecycle (or null)transaction
- The transaction to enlist withoptions
- Any options for then creating the connectionManagedConnection
ManagedConnection createManagedConnection(ExecutionContext ec, Map transactionOptions)
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 existentvoid close()
String getResourceType()
Copyright © 2017. All rights reserved.