{
StateManager stateManager = owner.jdoGetStateManager();
if (stateManager != null)
{
PersistenceManager pm = (PersistenceManager) stateManager.getPersistenceManagerInternal();
pm.acquireShareLock();
try
{
synchronized (stateManager)
{
//
// Need to recheck owner because it could be set to
// null before we lock the stateManager.
//
if (owner != null)
{
stateManager.makeDirty(fieldName);
return stateManager;
}
}
}
finally
{
pm.releaseShareLock();
}
}
}
return null;
}