diff options
author | obo <obo@openoffice.org> | 2010-06-22 15:46:16 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-22 15:46:16 +0200 |
commit | 9550522a8abd13bf2333718d5832cf90609b1a01 (patch) | |
tree | 91b0aab96e44eac69179dccb92857361f96f6145 /framework | |
parent | c8b7e2d63ab6b5f61b7734fa2463637224d0b61c (diff) | |
parent | ed9754c214d35c0a0d6ef78d28cae1c0e6810bed (diff) |
CWS-TOOLING: integrate CWS cmcfixes75
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/threadhelp/transactionmanager.hxx | 1 | ||||
-rw-r--r-- | framework/source/threadhelp/transactionmanager.cxx | 36 |
2 files changed, 0 insertions, 37 deletions
diff --git a/framework/inc/threadhelp/transactionmanager.hxx b/framework/inc/threadhelp/transactionmanager.hxx index a3ce7e67ea8a..eca13d63103c 100644 --- a/framework/inc/threadhelp/transactionmanager.hxx +++ b/framework/inc/threadhelp/transactionmanager.hxx @@ -93,7 +93,6 @@ class TransactionManager : public ITransactionManager virtual sal_Bool isCallRejected ( ERejectReason& eReason ) const; virtual void registerTransaction ( EExceptionMode eMode, ERejectReason& eReason ) throw( css::uno::RuntimeException, css::lang::DisposedException ); virtual void unregisterTransaction ( ) throw( css::uno::RuntimeException, css::lang::DisposedException ); - static TransactionManager& getGlobalTransactionManager ( ); //------------------------------------------------------------------------------------------------------------- // private methods diff --git a/framework/source/threadhelp/transactionmanager.cxx b/framework/source/threadhelp/transactionmanager.cxx index 34b4892ccebe..a42c871c176e 100644 --- a/framework/source/threadhelp/transactionmanager.cxx +++ b/framework/source/threadhelp/transactionmanager.cxx @@ -319,42 +319,6 @@ sal_Bool TransactionManager::isCallRejected( ERejectReason& eReason ) const } /*-****************************************************************************************************//** - @short return a reference to a static manager - @descr Sometimes we need the global member! (e.g. in our own static methods) - We create our own "class global static" member threadsafe. - It will be created at first call only! - All other requests use these created one then directly. - - @seealso - - - @param - - @return A reference to a static member. - - @onerror No error should occure. -*//*-*****************************************************************************************************/ -TransactionManager& TransactionManager::getGlobalTransactionManager() -{ - // Initialize static member only for one time! - static TransactionManager* pManager = NULL; - // If these method first called (member not already exist!) ... - if( pManager == NULL ) - { - // ... we must create a new one. Protect follow code with the global mutex - - // It must be - we create a static variable! - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - // We must check our pointer again - because ... another instance of ouer class could be faster then these one! - if( pManager == NULL ) - { - // Create the new manager and set it for return on static variable. - static TransactionManager aManager; - pManager = &aManager; - } - } - // Return new created or already existing object. - return *pManager; -} - -/*-****************************************************************************************************//** @short throw any exceptions for rejected calls @descr If user whish to use our automaticly exception mode we use this impl-method. We check all combinations of eReason and eExceptionMode and throw right exception with some |