ObjectState handler = getObjectState(object);
if (handler instanceof InterfaceInvocationHandler) {
// XORM-specific case
((InterfaceInvocationHandler) handler).makePersistent(this);
} else {
PersistenceManager mgr = pc.jdoGetPersistenceManager();
if (mgr != null) {
if (mgr == this) return; // already managed
else throw new JDOUserException(I18N.msg("E_wrong_PM"));
}
// Standard JDO object, make a StateManager for it