-
public interface LocalTransaction
The LocalTransaction defines a transaction demarcation interface for resource manager local transactions. Note that this interface is used for application level local transaction demarcation. The system contract level LocalTransaction interface (as defined in thejavax.resource.spi
package) is used by the container for local transaction management.A local transaction is managed internal to a resource manager. There is no external transaction manager involved in the coordination of such transactions.
A CCI implementation can (but is not required to) implement the LocalTransaction interface. If the LocalTransaction interface is supported by a CCI implementation, then the method
Connection.getLocalTransaction
should return a LocalTransaction instance. A component can then use the returned LocalTransaction to demarcate a resource manager local transaction (associated with the Connection instance) on the underlying EIS instance.- Since:
- 0.8
- Author:
- Rahul Sharma
- See Also:
Connection
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
begin()
Begins a local transaction on an EIS instance.void
commit()
Commits the current local transaction and release all locks held by the underlying EIS instance.void
rollback()
Rollbacks the current resource manager local transaction.
-
-
-
Method Detail
-
begin
void begin() throws ResourceException
Begins a local transaction on an EIS instance.- Throws:
ResourceException
- Failed to begin a local transaction. Examples of error cases are:- Resource adapter internal or EIS-specific error
- Connection is already participating in a local or JTA transaction
-
commit
void commit() throws ResourceException
Commits the current local transaction and release all locks held by the underlying EIS instance.- Throws:
ResourceException
- Failed to commit a local transaction. Examples of error cases are:- Resource adapter internal or EIS-specific error
- Violation of integrity constraints, deadlock detection, communication failure during transaction completion, or any retry requirement
- Connection is participating in an active JTA transaction
- Invalid transaction context; commit operation invoked without an active transaction context
-
rollback
void rollback() throws ResourceException
Rollbacks the current resource manager local transaction.- Throws:
ResourceException
- Failed to rollback a local transaction. Examples of error cases are:- Resource adapter internal or EIS-specific error
- Connection is participating in an active JTA transaction
- Invalid transaction context; rollback operation invoked without an active transaction context
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 17:02:04 Cette version de la page est en cache (à la date du 21/08/2025 17:02:04) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 19/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/resource/cci/LocalTransaction.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.