Package org.hibernate.testing.jta
Class JtaAwareConnectionProviderImpl
- java.lang.Object
-
- org.hibernate.testing.jta.JtaAwareConnectionProviderImpl
-
- All Implemented Interfaces:
java.io.Serializable
,org.hibernate.engine.jdbc.connections.spi.ConnectionProvider
,org.hibernate.service.Service
,org.hibernate.service.spi.Configurable
,org.hibernate.service.spi.Stoppable
,org.hibernate.service.spi.Wrapped
public class JtaAwareConnectionProviderImpl extends java.lang.Object implements org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, org.hibernate.service.spi.Configurable, org.hibernate.service.spi.Stoppable
AConnectionProvider
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.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JtaAwareConnectionProviderImpl.XAResourceWrapper
-
Constructor Summary
Constructors Constructor Description JtaAwareConnectionProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeConnection(java.sql.Connection conn)
void
configure(java.util.Map configurationValues)
protected Transaction
findCurrentTransaction()
java.sql.Connection
getConnection()
boolean
isUnwrappableAs(java.lang.Class unwrapType)
void
stop()
boolean
supportsAggressiveRelease()
<T> T
unwrap(java.lang.Class<T> unwrapType)
-
-
-
Method Detail
-
configure
public void configure(java.util.Map configurationValues)
- Specified by:
configure
in interfaceorg.hibernate.service.spi.Configurable
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.hibernate.service.spi.Stoppable
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Specified by:
getConnection
in interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
- Throws:
java.sql.SQLException
-
closeConnection
public void closeConnection(java.sql.Connection conn) throws java.sql.SQLException
- Specified by:
closeConnection
in interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
- Throws:
java.sql.SQLException
-
supportsAggressiveRelease
public boolean supportsAggressiveRelease()
- Specified by:
supportsAggressiveRelease
in interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
-
findCurrentTransaction
protected Transaction findCurrentTransaction()
-
isUnwrappableAs
public boolean isUnwrappableAs(java.lang.Class unwrapType)
- Specified by:
isUnwrappableAs
in interfaceorg.hibernate.service.spi.Wrapped
-
unwrap
public <T> T unwrap(java.lang.Class<T> unwrapType)
- Specified by:
unwrap
in interfaceorg.hibernate.service.spi.Wrapped
-
-