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
This commit is contained in:
@@ -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.
|
||||
* <em>Note:</em> 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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user