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) |
io.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 com.atlassian.sal.core.rdbms.WrappedConnection.
Example implementations might be:
return dataSource.getConnection();
or
return sessionFactory.getSession().connection();
@Nonnull io.atlassian.fugue.Option<String> getSchemaName()
getConnection().
The host must ensure that the provided connection has autoCommit=false.
Copyright © 2019 Atlassian. All rights reserved.