xref: /AOO41X/main/framework/source/fwi/threadhelp/transactionmanager.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_framework.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
32*cdf0e10cSrcweir //	my own includes
33*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
34*cdf0e10cSrcweir #include <threadhelp/transactionmanager.hxx>
35*cdf0e10cSrcweir #include <threadhelp/resetableguard.hxx>
36*cdf0e10cSrcweir #include <macros/debug.hxx>
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir #include <macros/generic.hxx>
39*cdf0e10cSrcweir #include <fwidllapi.h>
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
42*cdf0e10cSrcweir //	interface includes
43*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
44*cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
45*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
46*cdf0e10cSrcweir //	other includes
47*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
50*cdf0e10cSrcweir //	const
51*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
54*cdf0e10cSrcweir //	namespace
55*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir namespace framework{
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
60*cdf0e10cSrcweir //	non exported const
61*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
64*cdf0e10cSrcweir //	non exported declarations
65*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
68*cdf0e10cSrcweir //	definitions
69*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir /*-************************************************************************************************************//**
72*cdf0e10cSrcweir     @short      standard ctor
73*cdf0e10cSrcweir     @descr      Initialize instance with right start values for correct working.
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir     @seealso    -
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir     @param      -
78*cdf0e10cSrcweir     @return     -
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir     @onerror    -
81*cdf0e10cSrcweir *//*-*************************************************************************************************************/
82*cdf0e10cSrcweir TransactionManager::TransactionManager()
83*cdf0e10cSrcweir     : m_eWorkingMode      ( E_INIT )
84*cdf0e10cSrcweir     , m_nTransactionCount ( 0      )
85*cdf0e10cSrcweir {
86*cdf0e10cSrcweir     m_aBarrier.open();
87*cdf0e10cSrcweir }
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir /*-************************************************************************************************************//**
90*cdf0e10cSrcweir     @short      standard dtor
91*cdf0e10cSrcweir     @descr      -
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir     @seealso    -
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir     @param      -
96*cdf0e10cSrcweir     @return     -
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir     @onerror    -
99*cdf0e10cSrcweir *//*-*************************************************************************************************************/
100*cdf0e10cSrcweir TransactionManager::~TransactionManager()
101*cdf0e10cSrcweir {
102*cdf0e10cSrcweir }
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir /*-****************************************************************************************************//**
105*cdf0e10cSrcweir     @interface  ITransactionManager
106*cdf0e10cSrcweir     @short      set new working mode
107*cdf0e10cSrcweir     @descr      These implementation knows for states of working: E_INIT, E_WORK, E_CLOSING, E_CLOSE
108*cdf0e10cSrcweir                 You can step during this ones only from the left to the right side and start at left side again!
109*cdf0e10cSrcweir                 (This is neccessary e.g. for refcounted objects!)
110*cdf0e10cSrcweir                 This call will block till all current existing transactions was finished.
111*cdf0e10cSrcweir                 Follow results occure:
112*cdf0e10cSrcweir                     E_INIT        :  All requests on this implementation are refused.
113*cdf0e10cSrcweir                                         It's your decision to react in a right way.
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir                     E_WORK        :  The object can work now. The full functionality is available.
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir                     E_BEFORECLOSE :  The object start the closing mechanism ... but sometimes
118*cdf0e10cSrcweir                                         e.g. the dispose() method need to call some private methods.
119*cdf0e10cSrcweir                                         These some special methods should use E_SOFTEXCEPTIONS or ignore
120*cdf0e10cSrcweir                                         E_INCLOSE as returned reason for E_NOEXCEPTIONS to detect this special case!
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir                     E_CLOSE       :  Object is already dead! All further requests will be refused.
123*cdf0e10cSrcweir                                         It's your decision to react in a right way.
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir     @seealso    -
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir     @param      "eMode", is the new mode - but we don't accept setting mode in wrong order!
128*cdf0e10cSrcweir     @return     -
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir     @onerror    We do nothing.
131*cdf0e10cSrcweir *//*-*****************************************************************************************************/
132*cdf0e10cSrcweir void  TransactionManager::setWorkingMode( EWorkingMode eMode )
133*cdf0e10cSrcweir {
134*cdf0e10cSrcweir     // Safe member access.
135*cdf0e10cSrcweir     ::osl::ClearableMutexGuard  aAccessGuard( m_aAccessLock );
136*cdf0e10cSrcweir     sal_Bool                    bWaitFor    = sal_False      ;
137*cdf0e10cSrcweir     // Change working mode first!
138*cdf0e10cSrcweir     if  (
139*cdf0e10cSrcweir             ( m_eWorkingMode == E_INIT        && eMode == E_WORK        ) ||
140*cdf0e10cSrcweir             ( m_eWorkingMode == E_WORK        && eMode == E_BEFORECLOSE ) ||
141*cdf0e10cSrcweir             ( m_eWorkingMode == E_BEFORECLOSE && eMode == E_CLOSE       ) ||
142*cdf0e10cSrcweir             ( m_eWorkingMode == E_CLOSE       && eMode == E_INIT        )
143*cdf0e10cSrcweir         )
144*cdf0e10cSrcweir     {
145*cdf0e10cSrcweir         m_eWorkingMode = eMode;
146*cdf0e10cSrcweir         if( m_eWorkingMode == E_BEFORECLOSE || m_eWorkingMode == E_CLOSE )
147*cdf0e10cSrcweir         {
148*cdf0e10cSrcweir             bWaitFor = sal_True;
149*cdf0e10cSrcweir         }
150*cdf0e10cSrcweir     }
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir     // Wait for current existing transactions then!
153*cdf0e10cSrcweir     // (Only neccessary for changing to E_BEFORECLOSE or E_CLOSE! ...
154*cdf0e10cSrcweir     // otherwise; if you wait at setting E_WORK another thrad could finish a acquire-call during our unlock() and wait() call
155*cdf0e10cSrcweir     // ... and we will wait forever here!!!)
156*cdf0e10cSrcweir     // Don't forget to release access mutex before.
157*cdf0e10cSrcweir     aAccessGuard.clear();
158*cdf0e10cSrcweir     if( bWaitFor == sal_True )
159*cdf0e10cSrcweir     {
160*cdf0e10cSrcweir         m_aBarrier.wait();
161*cdf0e10cSrcweir     }
162*cdf0e10cSrcweir }
163*cdf0e10cSrcweir 
164*cdf0e10cSrcweir /*-****************************************************************************************************//**
165*cdf0e10cSrcweir     @interface  ITransactionManager
166*cdf0e10cSrcweir     @short      get current working mode
167*cdf0e10cSrcweir     @descr      If you stand in your close() or init() method ... but don't know
168*cdf0e10cSrcweir                 if you called more then ones(!) ... you can use this function to get
169*cdf0e10cSrcweir                 right information.
170*cdf0e10cSrcweir                 e.g:    You have a method init() which is used to change working mode from
171*cdf0e10cSrcweir                         E_INIT to E_WORK and should be used to initialize some member too ...
172*cdf0e10cSrcweir                         What should you do:
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir                             void init( sal_Int32 nValue )
175*cdf0e10cSrcweir                             {
176*cdf0e10cSrcweir                                 // Reject this call if our transaction manager say: "Object already initialized!"
177*cdf0e10cSrcweir                                 // Otherwise initialize your member.
178*cdf0e10cSrcweir                                 if( m_aTransactionManager.getWorkingMode() == E_INIT )
179*cdf0e10cSrcweir                                 {
180*cdf0e10cSrcweir                                     // Object is uninitialized ...
181*cdf0e10cSrcweir                                     // Make member access threadsafe!
182*cdf0e10cSrcweir                                     ResetableGuard aGuard( m_aMutex );
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir                                     // Check working mode again .. because anozᅵther instance could be faster.
185*cdf0e10cSrcweir                                     // (It's possible to set this guard at first of this method too!)
186*cdf0e10cSrcweir                                     if( m_aTransactionManager.getWorkingMode() == E_INIT )
187*cdf0e10cSrcweir                                     {
188*cdf0e10cSrcweir                                         m_aMember = nValue;
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir                                         // Object is initialized now ... set working mode to E_WORK!
191*cdf0e10cSrcweir                                         m_aTransactionManager.setWorkingMode( E_WORK );
192*cdf0e10cSrcweir                                     }
193*cdf0e10cSrcweir                                 }
194*cdf0e10cSrcweir                             }
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir     @seealso    method setWorkingMode()
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir     @param      -
199*cdf0e10cSrcweir     @return     Current set mode.
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir     @onerror    No error should occure.
202*cdf0e10cSrcweir *//*-*****************************************************************************************************/
203*cdf0e10cSrcweir EWorkingMode TransactionManager::getWorkingMode() const
204*cdf0e10cSrcweir {
205*cdf0e10cSrcweir     // Synchronize access to internal member!
206*cdf0e10cSrcweir     ::osl::MutexGuard aAccessLock( m_aAccessLock );
207*cdf0e10cSrcweir     return m_eWorkingMode;
208*cdf0e10cSrcweir }
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir /*-****************************************************************************************************//**
211*cdf0e10cSrcweir     @interface  ITransactionManager
212*cdf0e10cSrcweir     @short      start new transaction
213*cdf0e10cSrcweir     @descr      A guard should use this method to start a new transaction. He should looks for rejected
214*cdf0e10cSrcweir                 calls to by using parameter eMode and eReason.
215*cdf0e10cSrcweir                 If call was not rejected your transaction will be non breakable during releasing your transaction
216*cdf0e10cSrcweir                 guard! BUT ... your code isn't threadsafe then! It's a transaction manager only ....
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir     @seealso    method unregisterTransaction()
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir     @param      "eMode"     ,used to enable/disable throwing exceptions automaticly for rejected calls
221*cdf0e10cSrcweir     @param      "eReason"   ,reason for rejected calls if eMode=E_NOEXCEPTIONS
222*cdf0e10cSrcweir     @return     -
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir     @onerror    -
225*cdf0e10cSrcweir *//*-*****************************************************************************************************/
226*cdf0e10cSrcweir void  TransactionManager::registerTransaction( EExceptionMode eMode, ERejectReason& eReason ) throw( css::uno::RuntimeException, css::lang::DisposedException )
227*cdf0e10cSrcweir {
228*cdf0e10cSrcweir     // Look for rejected calls first.
229*cdf0e10cSrcweir     // If call was refused we throw some exceptions or do nothing!
230*cdf0e10cSrcweir     // It depends from given parameter eMode.
231*cdf0e10cSrcweir     if( isCallRejected( eReason ) == sal_True )
232*cdf0e10cSrcweir     {
233*cdf0e10cSrcweir         impl_throwExceptions( eMode, eReason );
234*cdf0e10cSrcweir     }
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir     // BUT if no exception was thrown ... (may be eMode = E_SOFTEXCEPTIONS!)
237*cdf0e10cSrcweir     // we must register this transaction too!
238*cdf0e10cSrcweir     // Don't use "else" or a new scope here!!!
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir     // Safe access to internal member.
241*cdf0e10cSrcweir     ::osl::MutexGuard aAccessGuard( m_aAccessLock );
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir     #ifdef ENABLE_MUTEXDEBUG
244*cdf0e10cSrcweir     LOG_ASSERT2( m_nTransactionCount<0, "TransactionManager::acquire()", "Wrong ref count detected!" )
245*cdf0e10cSrcweir     #endif
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir     // Register this new transaction.
248*cdf0e10cSrcweir     // If it is the first one .. close gate to disable changing of working mode.
249*cdf0e10cSrcweir     ++m_nTransactionCount;
250*cdf0e10cSrcweir     if( m_nTransactionCount == 1 )
251*cdf0e10cSrcweir     {
252*cdf0e10cSrcweir         m_aBarrier.close();
253*cdf0e10cSrcweir     }
254*cdf0e10cSrcweir }
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir /*-****************************************************************************************************//**
257*cdf0e10cSrcweir     @interface  ITransactionManager
258*cdf0e10cSrcweir     @short      finish transaction
259*cdf0e10cSrcweir     @descr      A guard should call this method to release current transaction.
260*cdf0e10cSrcweir 
261*cdf0e10cSrcweir     @seealso    method registerTransaction()
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir     @param      -
264*cdf0e10cSrcweir     @return     -
265*cdf0e10cSrcweir 
266*cdf0e10cSrcweir     @onerror    -
267*cdf0e10cSrcweir *//*-*****************************************************************************************************/
268*cdf0e10cSrcweir void  TransactionManager::unregisterTransaction() throw( css::uno::RuntimeException, css::lang::DisposedException )
269*cdf0e10cSrcweir {
270*cdf0e10cSrcweir     // This call could not rejected!
271*cdf0e10cSrcweir     // Safe access to internal member.
272*cdf0e10cSrcweir     ::osl::MutexGuard aAccessGuard( m_aAccessLock );
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir     #ifdef ENABLE_MUTEXDEBUG
275*cdf0e10cSrcweir     LOG_ASSERT2( m_nTransactionCount<=0, "TransactionManager::release()", "Wrong ref count detected!" )
276*cdf0e10cSrcweir     #endif
277*cdf0e10cSrcweir 
278*cdf0e10cSrcweir     // Deregister this transaction.
279*cdf0e10cSrcweir     // If it was the last one ... open gate to enable changing of working mode!
280*cdf0e10cSrcweir     // (see setWorkingMode())
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir     --m_nTransactionCount;
283*cdf0e10cSrcweir     if( m_nTransactionCount == 0 )
284*cdf0e10cSrcweir     {
285*cdf0e10cSrcweir         m_aBarrier.open();
286*cdf0e10cSrcweir     }
287*cdf0e10cSrcweir }
288*cdf0e10cSrcweir 
289*cdf0e10cSrcweir /*-****************************************************************************************************//**
290*cdf0e10cSrcweir     @interface  ITransactionManager
291*cdf0e10cSrcweir     @short      look for rejected calls
292*cdf0e10cSrcweir     @descr      Sometimes user need a possibility to get information about rejected calls
293*cdf0e10cSrcweir                 without starting a transaction!
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir     @seealso    -
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir     @param      "eReason" returns reason of a rejected call
298*cdf0e10cSrcweir     @return     true if call was rejected, false otherwise
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir     @onerror    We return false.
301*cdf0e10cSrcweir *//*-*****************************************************************************************************/
302*cdf0e10cSrcweir sal_Bool  TransactionManager::isCallRejected( ERejectReason& eReason ) const
303*cdf0e10cSrcweir {
304*cdf0e10cSrcweir     // This call must safe access to internal member only.
305*cdf0e10cSrcweir     // Set "possible reason" for return and check reject-state then!
306*cdf0e10cSrcweir     // User should look for return value first - reason then ...
307*cdf0e10cSrcweir     ::osl::MutexGuard aAccessGuard( m_aAccessLock );
308*cdf0e10cSrcweir     switch( m_eWorkingMode )
309*cdf0e10cSrcweir     {
310*cdf0e10cSrcweir         case E_INIT        : eReason = E_UNINITIALIZED ;
311*cdf0e10cSrcweir                                 break;
312*cdf0e10cSrcweir         case E_WORK        : eReason = E_NOREASON      ;
313*cdf0e10cSrcweir                                 break;
314*cdf0e10cSrcweir         case E_BEFORECLOSE : eReason = E_INCLOSE       ;
315*cdf0e10cSrcweir                                 break;
316*cdf0e10cSrcweir         case E_CLOSE       : eReason = E_CLOSED        ;
317*cdf0e10cSrcweir                                 break;
318*cdf0e10cSrcweir     }
319*cdf0e10cSrcweir     return( eReason!=E_NOREASON );
320*cdf0e10cSrcweir }
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir /*-****************************************************************************************************//**
323*cdf0e10cSrcweir     @short      throw any exceptions for rejected calls
324*cdf0e10cSrcweir     @descr      If user whish to use our automaticly exception mode we use this impl-method.
325*cdf0e10cSrcweir                 We check all combinations of eReason and eExceptionMode and throw right exception with some
326*cdf0e10cSrcweir                 descriptions for recipient of it.
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir     @seealso    method registerTransaction()
329*cdf0e10cSrcweir     @seealso    enum ERejectReason
330*cdf0e10cSrcweir     @seealso    enum EExceptionMode
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir     @param      "eReason" , reason for rejected call
333*cdf0e10cSrcweir     @param      "eMode"   , exception mode - set by user
334*cdf0e10cSrcweir     @return     -
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     @onerror    -
337*cdf0e10cSrcweir *//*-*****************************************************************************************************/
338*cdf0e10cSrcweir void TransactionManager::impl_throwExceptions( EExceptionMode eMode, ERejectReason eReason ) const throw( css::uno::RuntimeException, css::lang::DisposedException )
339*cdf0e10cSrcweir {
340*cdf0e10cSrcweir     if( eMode != E_NOEXCEPTIONS )
341*cdf0e10cSrcweir     {
342*cdf0e10cSrcweir         switch( eReason )
343*cdf0e10cSrcweir         {
344*cdf0e10cSrcweir             case E_UNINITIALIZED   :    if( eMode == E_HARDEXCEPTIONS )
345*cdf0e10cSrcweir                                         {
346*cdf0e10cSrcweir                                             // Help programmer to find out, why this exception is thrown!
347*cdf0e10cSrcweir                                             LOG_ERROR( "TransactionManager...", "Owner instance not right initialized yet. Call was rejected! Normaly it's an algorithm error ... wrong usin of class!" )
348*cdf0e10cSrcweir                                             //ATTENTION: temp. disabled - till all bad code positions are detected and changed! */
349*cdf0e10cSrcweir                                             // throw css::uno::RuntimeException( DECLARE_ASCII("TransactionManager...\nOwner instance not right initialized yet. Call was rejected! Normaly it's an algorithm error ... wrong usin of class!\n" ), css::uno::Reference< css::uno::XInterface >() );
350*cdf0e10cSrcweir                                         }
351*cdf0e10cSrcweir                                         break;
352*cdf0e10cSrcweir             case E_INCLOSE         :    if( eMode == E_HARDEXCEPTIONS )
353*cdf0e10cSrcweir                                         {
354*cdf0e10cSrcweir                                             // Help programmer to find out, why this exception is thrown!
355*cdf0e10cSrcweir                                             LOG_ERROR( "TransactionManager...", "Owner instance stand in close method. Call was rejected!" )
356*cdf0e10cSrcweir                                             throw css::lang::DisposedException( DECLARE_ASCII("TransactionManager...\nOwner instance stand in close method. Call was rejected!\n" ), css::uno::Reference< css::uno::XInterface >() );
357*cdf0e10cSrcweir                                         }
358*cdf0e10cSrcweir                                         break;
359*cdf0e10cSrcweir             case E_CLOSED           :   {
360*cdf0e10cSrcweir                                             // Help programmer to find out, why this exception is thrown!
361*cdf0e10cSrcweir                                             LOG_ERROR( "TransactionManager...", "Owner instance already closed. Call was rejected!" )
362*cdf0e10cSrcweir                                             throw css::lang::DisposedException( DECLARE_ASCII("TransactionManager...\nOwner instance already closed. Call was rejected!\n" ), css::uno::Reference< css::uno::XInterface >() );
363*cdf0e10cSrcweir                                         }
364*cdf0e10cSrcweir             case E_NOREASON         :   {
365*cdf0e10cSrcweir                                             // Help programmer to find out
366*cdf0e10cSrcweir                                             LOG_ERROR( "TransactionManager...", "Impossible case E_NOREASON!" )
367*cdf0e10cSrcweir                                         }
368*cdf0e10cSrcweir                                         break;
369*cdf0e10cSrcweir             default:                    break; // nothing to do
370*cdf0e10cSrcweir         }
371*cdf0e10cSrcweir     }
372*cdf0e10cSrcweir }
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir }	//	namespace framework
375