Package org.hibernate.testing.jta
Class JtaAwareConnectionProviderImpl
java.lang.Object
org.hibernate.testing.jta.JtaAwareConnectionProviderImpl
- All Implemented Interfaces:
Serializable,org.hibernate.engine.jdbc.connections.spi.ConnectionProvider,org.hibernate.service.Service,org.hibernate.service.spi.Configurable,org.hibernate.service.spi.ServiceRegistryAwareService,org.hibernate.service.spi.Stoppable,org.hibernate.service.spi.Wrapped
public class JtaAwareConnectionProviderImpl
extends Object
implements org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, org.hibernate.service.spi.Configurable, org.hibernate.service.spi.Stoppable, org.hibernate.service.spi.ServiceRegistryAwareService
A
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.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseConnection(Connection connection) voidprotected Transactionorg.hibernate.engine.jdbc.connections.spi.DatabaseConnectionInfogetDatabaseConnectionInfo(org.hibernate.dialect.Dialect dialect) org.hibernate.engine.jdbc.connections.spi.DatabaseConnectionInfogetDatabaseConnectionInfo(org.hibernate.dialect.Dialect dialect, org.hibernate.engine.jdbc.env.spi.ExtractedDatabaseMetaData metaData) voidinjectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry) booleanisUnwrappableAs(Class<?> unwrapType) voidstop()boolean<T> T
-
Constructor Details
-
JtaAwareConnectionProviderImpl
public JtaAwareConnectionProviderImpl()
-
-
Method Details
-
injectServices
public void injectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry) - Specified by:
injectServicesin interfaceorg.hibernate.service.spi.ServiceRegistryAwareService
-
configure
- Specified by:
configurein interfaceorg.hibernate.service.spi.Configurable
-
stop
public void stop()- Specified by:
stopin interfaceorg.hibernate.service.spi.Stoppable
-
getConnection
- Specified by:
getConnectionin interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider- Throws:
SQLException
-
closeConnection
- Specified by:
closeConnectionin interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider- Throws:
SQLException
-
supportsAggressiveRelease
public boolean supportsAggressiveRelease()- Specified by:
supportsAggressiveReleasein interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
-
getDatabaseConnectionInfo
public org.hibernate.engine.jdbc.connections.spi.DatabaseConnectionInfo getDatabaseConnectionInfo(org.hibernate.dialect.Dialect dialect) - Specified by:
getDatabaseConnectionInfoin interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
-
getDatabaseConnectionInfo
public org.hibernate.engine.jdbc.connections.spi.DatabaseConnectionInfo getDatabaseConnectionInfo(org.hibernate.dialect.Dialect dialect, org.hibernate.engine.jdbc.env.spi.ExtractedDatabaseMetaData metaData) - Specified by:
getDatabaseConnectionInfoin interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
-
findCurrentTransaction
-
isUnwrappableAs
- Specified by:
isUnwrappableAsin interfaceorg.hibernate.service.spi.Wrapped
-
unwrap
- Specified by:
unwrapin interfaceorg.hibernate.service.spi.Wrapped
-