Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Hibernate, Relational Persistence for Idiomatic Java
  *
  * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
  * indicated by the @author tags or express copyright attribution
  * statements applied by the authors.  All third-party contributions are
  * distributed under license by Red Hat Inc.
  *
  * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, write to:
 * Free Software Foundation, Inc.
 * 51 Franklin Street, Fifth Floor
 * Boston, MA  02110-1301  USA
 */
package org.hibernate.service.jta.platform.spi;
Defines how we interact with various JTA services on the given platform/environment.

Author(s):
Steve Ebersole
public interface JtaPlatform extends Service {

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
Can we currently register a javax.transaction.Synchronization?

Returns:
True if registering a javax.transaction.Synchronization is currently allowed; false otherwise.
	public boolean canRegisterSynchronization();

Register a JTA javax.transaction.Synchronization in the means defined by the platform.

Parameters:
synchronization The synchronization to register
	public void registerSynchronization(Synchronization synchronization);

Obtain the current transaction status using whatever means is preferred for this platform

Returns:
The current status.
Throws:
javax.transaction.SystemException Indicates a problem access the underlying status
	public int getCurrentStatus() throws SystemException;
New to GrepCode? Check out our FAQ X