public static interface SpringHostConnectionAccessor.ConnectionProvider
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Supply a connection to be used within
TransactionTemplate.execute(org.springframework.transaction.support.TransactionCallback)
Note that this should be a "regular" connection, not a WrappedConnection . |
com.atlassian.fugue.Option<String> |
getSchemaName()
Returns the configured schema name (if any), for connections provided by
getConnection() . |
@Nonnull Connection getConnection()
TransactionTemplate.execute(org.springframework.transaction.support.TransactionCallback)
Note that this should be a "regular" connection, not a WrappedConnection
.
Example implementations might be:
return dataSource.getConnection();
or
return sessionFactory.getSession().connection();
@Nonnull com.atlassian.fugue.Option<String> getSchemaName()
getConnection()
.
The host must ensure that the provided connection has autoCommit=false
.Copyright © 2015 Atlassian. All rights reserved.