public class JtaAwareConnectionProviderImpl extends Object implements org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, org.hibernate.service.spi.Configurable, org.hibernate.service.spi.Stoppable
ConnectionProvider
implementation intended for testing Hibernate/JTA interaction. In that limited scope we
only ever have one single resource (the database connection) so we do not at all care about full-blown XA
semantics. This class behaves accordingly. This class also assumes usage of and access to JBossTS/Arjuna.Modifier and Type | Class and Description |
---|---|
static class |
JtaAwareConnectionProviderImpl.XAResourceWrapper |
Constructor and Description |
---|
JtaAwareConnectionProviderImpl() |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(Connection conn) |
void |
configure(Map configurationValues) |
protected Transaction |
findCurrentTransaction() |
Connection |
getConnection() |
boolean |
isUnwrappableAs(Class unwrapType) |
void |
stop() |
boolean |
supportsAggressiveRelease() |
<T> T |
unwrap(Class<T> unwrapType) |
public void configure(Map configurationValues)
configure
in interface org.hibernate.service.spi.Configurable
public void stop()
stop
in interface org.hibernate.service.spi.Stoppable
public Connection getConnection() throws SQLException
getConnection
in interface org.hibernate.engine.jdbc.connections.spi.ConnectionProvider
SQLException
public void closeConnection(Connection conn) throws SQLException
closeConnection
in interface org.hibernate.engine.jdbc.connections.spi.ConnectionProvider
SQLException
public boolean supportsAggressiveRelease()
supportsAggressiveRelease
in interface org.hibernate.engine.jdbc.connections.spi.ConnectionProvider
protected Transaction findCurrentTransaction()
public boolean isUnwrappableAs(Class unwrapType)
isUnwrappableAs
in interface org.hibernate.service.spi.Wrapped
public <T> T unwrap(Class<T> unwrapType)
unwrap
in interface org.hibernate.service.spi.Wrapped
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.