org.hibernate.service.jta.platform.spi
Interface JtaPlatform

All Superinterfaces:
Serializable, Service
All Known Implementing Classes:
AbstractJtaPlatform, BitronixJtaPlatform, BorlandEnterpriseServerJtaPlatform, JBossAppServerJtaPlatform, JBossStandAloneJtaPlatform, JOnASJtaPlatform, JOTMJtaPlatform, JRun4JtaPlatform, NoJtaPlatform, OC4JJtaPlatform, OrionJtaPlatform, ResinJtaPlatform, SunOneJtaPlatform, TestingJtaPlatformImpl, TransactionManagerLookupBridge, WeblogicJtaPlatform, WebSphereExtendedJtaPlatform, WebSphereJtaPlatform

public interface JtaPlatform
extends Service

Defines how we interact with various JTA services on the given platform/environment.


Method Summary
 boolean canRegisterSynchronization()
          Can we currently register a Synchronization?
 int getCurrentStatus()
          Obtain the current transaction status using whatever means is preferred for this platform
 Object getTransactionIdentifier(Transaction transaction)
          Determine an identifier for the given transaction appropriate for use in caching/lookup usages.
 void registerSynchronization(Synchronization synchronization)
          Register a JTA Synchronization in the means defined by the platform.
 TransactionManager retrieveTransactionManager()
          Locate the TransactionManager
 UserTransaction retrieveUserTransaction()
          Locate the UserTransaction
 

Method Detail

retrieveTransactionManager

TransactionManager retrieveTransactionManager()
Locate the TransactionManager

Returns:
The TransactionManager

retrieveUserTransaction

UserTransaction retrieveUserTransaction()
Locate the UserTransaction

Returns:
The UserTransaction

getTransactionIdentifier

Object getTransactionIdentifier(Transaction transaction)
Determine an identifier for the given transaction appropriate for use in caching/lookup usages.

Generally speaking the transaction itself will be returned here. This method was added specifically for use in WebSphere and other unfriendly JEE containers (although WebSphere is still the only known such brain-dead, sales-driven impl).

Parameters:
transaction - The transaction to be identified.
Returns:
An appropriate identifier

canRegisterSynchronization

boolean canRegisterSynchronization()
Can we currently register a Synchronization?

Returns:
True if registering a Synchronization is currently allowed; false otherwise.

registerSynchronization

void registerSynchronization(Synchronization synchronization)
Register a JTA Synchronization in the means defined by the platform.

Parameters:
synchronization - The synchronization to register

getCurrentStatus

int getCurrentStatus()
                     throws SystemException
Obtain the current transaction status using whatever means is preferred for this platform

Returns:
The current status.
Throws:
SystemException - Indicates a problem access the underlying status


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.