else
{
return obj;
}
}
Advised advised = (Advised)obj;
org.jboss.aop.metadata.SimpleMetaData metaData = advised._getInstanceAdvisor().getMetaData();
GUID guid;
synchronized (metaData)
{
if (isVersioned(advised)) return obj;
guid = tag(advised);
}
System.out.println("VersionManager: " + guid);
DistributedPOJOState manager = new DistributedPOJOState(guid, timeout, advised, this, synchManager);
StateManager.setStateManager(advised, manager);
StateChangeInterceptor interceptor = new StateChangeInterceptor(manager);
manager.acquireWriteLock();
advised._getInstanceAdvisor().appendInterceptor(interceptor);
try
{
Field[] advisedFields = ((ClassAdvisor)advised._getAdvisor()).getAdvisedFields();
for (int i = 0; i < advisedFields.length; i++)
{
Field field = advisedFields[i];
if (Modifier.isStatic(field.getModifiers())) continue;
Object fieldVal = field.get(advised);
if (fieldVal != null)
{
if (fieldVal instanceof Advised)
{
Advised fieldAdvised = (Advised)fieldVal;
makeVersioned(fieldAdvised, newObjects);
fieldVal = new VersionReference(getGUID(fieldAdvised), fieldAdvised);
}
else if (fieldVal instanceof List)
{