private ExecutionQueueImpl readOldState(ProcessInstanceDAO instance, OProcess oprocess,
ClassLoader cl, boolean changeKey) {
if (instance.getExecutionState() == null) return null;
try {
ExecutionQueueImpl soup = new ExecutionQueueImpl(cl);
ObjectStreamClass osc;
if (changeKey) {
osc = ObjectStreamClass.lookup(Class.forName(
"org.apache.ode.bpel.engine.migration.OldCorrelationKey", true, cl));
ExecutionQueueImpl._classDescriptors.put("org.apache.ode.bpel.common.CorrelationKey", osc);
}
osc = ObjectStreamClass.lookup(Class.forName(
"org.apache.ode.bpel.engine.migration.OldSelector", true, cl));
ExecutionQueueImpl._classDescriptors.put("org.apache.ode.bpel.runtime.Selector", osc);
osc = ObjectStreamClass.lookup(Class.forName(
"[Lorg.apache.ode.bpel.engine.migration.OldSelector;", true, getClass().getClassLoader()));
ExecutionQueueImpl._classDescriptors.put("[Lorg.apache.ode.bpel.runtime.Selector;", osc);
soup.setReplacementMap(new ReplacementMapImpl(oprocess));
ByteArrayInputStream iis = new ByteArrayInputStream(instance.getExecutionState());
soup.read(iis);
return soup;
} catch (Exception e) {
throw new RuntimeException(e);
}
}