001//
002// NAME
003//      TransactionNotifier.java
004//
005// COPYRIGHT
006//      Confidential Property of Kabira Technologies, Inc.
007//      Copyright 2007, 2009 by Kabira Technologies, Inc.
008//      All rights reserved.
009//
010// DESCRIPTION
011//
012// HISTORY
013//     $Revision: 1.1.2.83 $ $Date: 2012/04/03 00:11:05 $
014//
015// WARNINGS
016//      THIS FILE IS GENERATED, DO NOT EDIT
017//
018
019package com.kabira.platform.swbuiltin;
020
021import java.util.*;
022import com.kabira.platform.annotation.*;
023
024
025/**
026<p>
027       Commit/abort notification support
028<p>
029<p>
030This class is used for prepare, commit and
031abort callbacks for the current transaction. Users extend
032this class and implement any or all of the
033onPrepare(), onCommit() and onRollback() methods.
034<p>
035Creating an instance of this class enables the
036prepare, commit and abort callbacks for the current
037transaction.
038<p>
039If this class is deleted before the prepare, commit or
040abort, the callbacks will not be invoked.
041<p>
042The instance will automatically delete itself at the
043end of the transaction.
044<p>
045Because onCommit and onRollback are called at transaction
046commit or abort time, these methods are not allowed to
047lock any new objects or resources, or promote any existing
048read locks to write locks.  This will result in a fatal
049runtime exception.  They are allowed to access any objects
050or resources that are currently locked in the transaction.
051<p>
052The onPrepare operation is allowed to perform additional
053work within the transaction.  If a system exception is
054thrown in onPrepare, the exception is propagated to the
055caller and the transaction rolled back.
056
057
058*/
059
060@Managed
061public class TransactionNotifier
062{
063        private static final String _RuntimeType = "swbuiltin::TransactionNotifier";
064
065/**
066Create a new TransactionNotifier
067
068*/
069        public TransactionNotifier()
070        {
071                super();
072        }
073
074
075        /**
076        <p>
077       Prepare notification
078<p>
079       Called when the transaction that this
080                instance was created in does a prepare.
081
082
083        */
084
085        public native void onPrepare();
086
087
088        /**
089        <p>
090       Prepare notification
091<p>
092       Called when the transaction that this
093                instance was created in does a prepare.
094
095
096        */
097
098        private native void onPrepare_super();
099
100
101        /**
102        <p>
103       Commit notification
104<p>
105       Called when the transaction that this
106                instance was created in commits.
107
108
109        */
110
111        public native void onCommit();
112
113
114        /**
115        <p>
116       Commit notification
117<p>
118       Called when the transaction that this
119                instance was created in commits.
120
121
122        */
123
124        private native void onCommit_super();
125
126
127        /**
128        <p>
129       Abort notification
130<p>
131       Called when the transaction that this
132                instance was created in aborts.
133
134
135        */
136
137        public native void onRollback();
138
139
140        /**
141        <p>
142       Abort notification
143<p>
144       Called when the transaction that this
145                instance was created in aborts.
146
147
148        */
149
150        private native void onRollback_super();
151
152}