|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2002, 2011 Innoopract Informationssysteme GmbH and others. |
2 |
* Copyright (c) 2002, 2012 Innoopract Informationssysteme GmbH and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 33-38
Link Here
|
| 33 |
|
33 |
|
| 34 |
private static final String CURRENT_PHASE = RWTLifeCycle.class.getName() + ".currentPhase"; |
34 |
private static final String CURRENT_PHASE = RWTLifeCycle.class.getName() + ".currentPhase"; |
| 35 |
private static final String PHASE_ORDER = RWTLifeCycle.class.getName() + ".phaseOrder"; |
35 |
private static final String PHASE_ORDER = RWTLifeCycle.class.getName() + ".phaseOrder"; |
|
|
36 |
private static final String UI_THREAD_WAINTING_FOR_THE_END |
| 37 |
= UIThreadController.class.getName() + "#UIThreadWaitingForTheEnd"; |
| 36 |
private static final String UI_THREAD_THROWABLE |
38 |
private static final String UI_THREAD_THROWABLE |
| 37 |
= UIThreadController.class.getName() + "#UIThreadThrowable"; |
39 |
= UIThreadController.class.getName() + "#UIThreadThrowable"; |
| 38 |
private static final String REQUEST_THREAD_RUNNABLE |
40 |
private static final String REQUEST_THREAD_RUNNABLE |
|
Lines 190-196
Link Here
|
| 190 |
} |
192 |
} |
| 191 |
} else { |
193 |
} else { |
| 192 |
uiThread.setServiceContext( context ); |
194 |
uiThread.setServiceContext( context ); |
| 193 |
uiThread.switchThread(); |
195 |
// See bug 354368 |
|
|
196 |
if( !Boolean.TRUE.equals( session.getAttribute( UI_THREAD_WAINTING_FOR_THE_END ) ) ) { |
| 197 |
uiThread.switchThread(); |
| 198 |
} |
| 194 |
} |
199 |
} |
| 195 |
// TODO [rh] consider moving this to UIThreadController#run |
200 |
// TODO [rh] consider moving this to UIThreadController#run |
| 196 |
if( !uiThread.getThread().isAlive() ) { |
201 |
if( !uiThread.getThread().isAlive() ) { |
|
Lines 289-294
Link Here
|
| 289 |
IServiceStore serviceStore = ContextProvider.getServiceStore(); |
294 |
IServiceStore serviceStore = ContextProvider.getServiceStore(); |
| 290 |
serviceStore.setAttribute( UI_THREAD_THROWABLE, thr ); |
295 |
serviceStore.setAttribute( UI_THREAD_THROWABLE, thr ); |
| 291 |
} |
296 |
} |
|
|
297 |
// We have to prevent ui thread from waking up at that point, otherwise processShutDown |
| 298 |
// would never be executed and session store would not be cleared. |
| 299 |
// See bug 354368 |
| 300 |
ISessionStore sessionStore = ContextProvider.getSessionStore(); |
| 301 |
sessionStore.setAttribute( UI_THREAD_WAINTING_FOR_THE_END, Boolean.TRUE ); |
| 292 |
// In any case: wait for the thread to be terminated by session timeout |
302 |
// In any case: wait for the thread to be terminated by session timeout |
| 293 |
uiThread.switchThread(); |
303 |
uiThread.switchThread(); |
| 294 |
} |
304 |
} |