it_bus/transaction_manager.h

00001 #ifndef IT_BUS_TRANSACTION_MANAGER_
00002 #define IT_BUS_TRANSACTION_MANAGER_
00003 //
00004 //      Copyright (c) 2005 IONA Technologies PLC. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/ref_counted_base.h>
00008 #include <it_bus/types.h>
00009 #include <it_bus/var.h>
00010 #include <it_bus/transaction_type_alias.h>
00011 #ifndef IT_MINIMISE_INCLUDES
00012 #include <it_bus/transaction_identifier.h>
00013 #endif
00014 
00015 namespace IT_Bus
00016 {
00017     class TransactionIdentifier;
00018     class TransactionParticipant;
00019     class TransactionNotificationHandler;
00020 
00031     class IT_BUS_API TransactionManager : public virtual RefCountedBase
00032     {
00033       public:
00034         virtual ~TransactionManager();
00035 
00057         virtual TransactionIdentifier*
00058         detach_thread()=0;
00059 
00073         virtual Boolean
00074         attach_thread(
00075             TransactionIdentifier* tx_identifier
00076         ) = 0;
00077 
00087         virtual String
00088         get_transaction_type()=0;
00089 
00108         virtual TransactionIdentifier*
00109         get_tx_identifier()=0;
00110 
00118         virtual void
00119         set_transaction_timeout(
00120             UInt seconds
00121         ) throw((Exception)) =0;
00122 
00128         virtual UInt
00129         get_transaction_timeout() throw((Exception)) = 0;
00130 
00146         virtual Boolean
00147         enlist(
00148             TransactionParticipant*     tx_participant,
00149             Boolean                     is_durable
00150         )=0;
00151 
00158         virtual Boolean
00159         enlist_for_notification(
00160             TransactionNotificationHandler*   completion_handler
00161         ) throw((Exception)) = 0;
00162 
00177         virtual Boolean
00178         commit_transaction(
00179             Boolean report_heuristics
00180         ) throw((Exception)) = 0;
00181 
00190         virtual void
00191         rollback_transaction() throw((Exception)) = 0;
00192 
00201         virtual void
00202         include_tx_identifier(
00203             TransactionIdentifierMap & tx_map
00204         )=0;
00205 
00221         virtual Boolean
00222         recreate_transaction(
00223             String     & encoded_transaction_state
00224         )=0;
00225 
00236         virtual String
00237         get_encoded_transaction_state()=0;
00238 
00239       protected:
00240         // protect against inappropiate construction
00241         TransactionManager();
00242 
00243       private:
00244         TransactionManager(const TransactionManager&);
00245         TransactionManager& operator=(const TransactionManager&);
00246     };
00247     typedef Var<TransactionManager> TransactionManager_var;
00248     typedef TransactionManager* TransactionManager_ptr;
00249 }
00250 #endif 

Generated on Tue Mar 20 15:27:44 2007 for Artix by  doxygen 1.5.1-p1