From 212ebb1b53fb4516357266d160d855bf33d5e4e8 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 7 Jul 2004 03:10:24 +0000 Subject: [PATCH] As Ray pointed out, clearing the oid upon destruction causes problems, so let's just not do it. We can accomplish our earlier goals, though with slightly less distinction making capability, in a different way. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3050 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/dobj/DObject.java | 18 +++--------------- .../presents/server/PresentsDObjectMgr.java | 3 +-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/java/com/threerings/presents/dobj/DObject.java b/src/java/com/threerings/presents/dobj/DObject.java index e34eaf2c5..3b08d485d 100644 --- a/src/java/com/threerings/presents/dobj/DObject.java +++ b/src/java/com/threerings/presents/dobj/DObject.java @@ -1,5 +1,5 @@ // -// $Id: DObject.java,v 1.74 2004/07/03 07:16:56 mdb Exp $ +// $Id: DObject.java,v 1.75 2004/07/07 03:10:24 mdb Exp $ package com.threerings.presents.dobj; @@ -587,18 +587,6 @@ public class DObject implements Streamable return _omgr != null; } - /** - * Returns true if this object was once active but has now been - * destroyed and removed from the distributed object system. - * Note: this is not the opposite of {@link #isActive} which - * does not distinguish between pre-initialization and - * post-destruction. - */ - public final boolean isDestroyed () - { - return (_oid == -1); - } - /** * Don't call this function! It initializes this distributed object * with the supplied distributed object manager. This is called by the @@ -704,8 +692,8 @@ public class DObject implements Streamable public void startTransaction () { // sanity check - if (isDestroyed()) { - String errmsg = "Refusing to start transaction on destroyed " + + if (isActive()) { + String errmsg = "Refusing to start transaction on inactive " + "object [dobj=" + this + "]"; throw new IllegalArgumentException(errmsg); diff --git a/src/java/com/threerings/presents/server/PresentsDObjectMgr.java b/src/java/com/threerings/presents/server/PresentsDObjectMgr.java index 5f15bf496..8fd3983bc 100644 --- a/src/java/com/threerings/presents/server/PresentsDObjectMgr.java +++ b/src/java/com/threerings/presents/server/PresentsDObjectMgr.java @@ -1,5 +1,5 @@ // -// $Id: PresentsDObjectMgr.java,v 1.44 2004/07/03 07:16:56 mdb Exp $ +// $Id: PresentsDObjectMgr.java,v 1.45 2004/07/07 03:10:24 mdb Exp $ package com.threerings.presents.server; @@ -400,7 +400,6 @@ public class PresentsDObjectMgr // inactivate the object target.setManager(null); - target.setOid(-1); // deal with any remaining oid lists that reference this object Reference[] refs = (Reference[])_refs.remove(oid);