/* */ }
/* */
/* 242 */ if (this.currentStatus == 4) {
/* 243 */ return false;
/* */ }
/* 245 */ BasicAction action = null;
/* 246 */ int oldStatus = this.currentStatus;
/* 247 */ boolean result = true;
/* 248 */ boolean forceAR = false;
/* */
/* 258 */ action = BasicAction.Current();
/* */
/* 260 */ if ((action != null) && (action.status() == 0))
/* */ {
/* 274 */ synchronized (this.usingActions)
/* */ {
/* 276 */ if (this.usingActions.get(action.topLevelAction().get_uid()) == null)
/* */ {
/* 278 */ this.usingActions.put(action.topLevelAction().get_uid(), action.topLevelAction());
/* 279 */ forceAR = true;
/* */ }
/* */ }
/* */ }
/* */
/* 284 */ if ((forceAR) || (this.currentStatus == 0) || (this.currentStatus == 1))
/* */ {
/* 292 */ if (loadObjectState())
/* */ {
/* 294 */ setupStore(rootName);
/* */ }
/* */
/* 299 */ if (this.currentStatus == 0)
/* */ {
/* 308 */ if (loadObjectState())
/* */ {
/* 310 */ InputObjectState oldState = null;
/* */ try
/* */ {
/* 314 */ oldState = this.objectStore.read_committed(this.objectUid, type());
/* */ }
/* */ catch (ObjectStoreException e)
/* */ {
/* 318 */ oldState = null;
/* */ }
/* */
/* 321 */ if (oldState != null)
/* */ {
/* 323 */ if ((result = restore_state(oldState, 1)))
/* */ {
/* 325 */ this.currentStatus = 2;
/* */ }
/* */
/* 328 */ oldState = null;
/* */ }
/* */ else
/* */ {
/* 332 */ if (tsLogger.arjLoggerI18N.isWarnEnabled())
/* */ {
/* 334 */ tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_2", new Object[] { this.objectUid, type() });
/* */ }
/* */
/* 338 */ return false;
/* */ }
/* */
/* */ }
/* 343 */ else if (this.currentStatus == 1) {
/* 344 */ this.currentStatus = 3;
/* */ } else {
/* 346 */ this.currentStatus = 2;
/* */ }
/* */
/* */ }
/* 351 */ else if (this.currentStatus == 1)
/* 352 */ this.currentStatus = 3;
/* */ else {
/* 354 */ this.currentStatus = 2;
/* */ }
/* */
/* 362 */ if ((forceAR) || (((this.currentStatus == 2) || (this.currentStatus == 1)) && (action != null)))
/* */ {
/* 365 */ int arStatus = 2;
/* 366 */ ActivationRecord ar = new ActivationRecord(oldStatus, this, action.topLevelAction());
/* */
/* 368 */ if ((arStatus = action.add(ar)) != 2)
/* */ {
/* 370 */ ar = null;
/* */
/* 372 */ if (forceAR)
/* */ {
/* 374 */ synchronized (this.usingActions)
/* */ {
/* 376 */ this.usingActions.remove(action.topLevelAction().get_uid());
/* */ }
/* */ }
/* */
/* 380 */ if (arStatus == 3) {
/* 381 */ result = false;