/* */
/* 1241 */ boolean unloadOk = false;
/* 1242 */ Lock current = null;
/* 1243 */ String otype = type();
/* 1244 */ Uid u = get_uid();
/* 1245 */ OutputObjectState S = new OutputObjectState(u, otype);
/* 1246 */ int lockCount = this.locksHeld.entryCount();
/* */
/* 1250 */ if (txojLogger.aitLogger.isDebugEnabled())
/* */ {
/* 1252 */ txojLogger.aitLogger.debug(16L, 1L, 2L, "LockManager::unloadState() unloading " + lockCount + " lock(s)");
/* */ }
/* */
/* 1258 */ if (lockCount == 0)
/* */ {
/* 1260 */ if (this.lockStore.remove_state(u, otype))
/* */ {
/* 1262 */ unloadOk = true;
/* */ }
/* 1266 */ else if (txojLogger.aitLoggerI18N.isWarnEnabled())
/* */ {
/* 1268 */ txojLogger.aitLoggerI18N.warn("com.arjuna.ats.txoj.LockManager_10", new Object[] { u, otype });
/* */ }
/* */
/* */ }
/* */ else
/* */ {
/* */ try
/* */ {
/* 1279 */ S.packInt(lockCount);
/* */
/* 1281 */ while ((current = this.locksHeld.pop()) != null)
/* */ {
/* 1283 */ current.get_uid().pack(S);
/* */
/* 1285 */ if (!current.save_state(S, 1))
/* */ {
/* 1287 */ if (txojLogger.aitLoggerI18N.isWarnEnabled())
/* */ {
/* 1289 */ txojLogger.aitLoggerI18N.warn("com.arjuna.ats.txoj.LockManager_11", new Object[] { current });
/* */ }
/* */
/* 1292 */ unloadOk = false;
/* */ }
/* */
/* 1295 */ current = null;
/* */ }
/* */
/* 1298 */ if (unloadOk)
/* */ {
/* 1302 */ if ((S.valid()) && (this.lockStore.write_committed(u, otype, S)))
/* */ {
/* 1304 */ unloadOk = true;
/* */ }
/* 1308 */ else if (txojLogger.aitLoggerI18N.isWarnEnabled())
/* */ {