// get the object
Object tmpObj = in.readObject();
count++;
MetaDataEntry mdObj = (MetaDataEntry) tmpObj;
// get the class name, then add it to the list
String tmpClassNameStr;
String tmpQNameAsStr;
if (mdObj != null) {
tmpClassNameStr = mdObj.getClassName();
if (tmpClassNameStr.equalsIgnoreCase(MetaDataEntry.END_OF_LIST)) {
// this is the last entry
keepGoing = false;
} else {
// add the entry to the meta data list
metaExecutionChain.add(mdObj);
tmpQNameAsStr = mdObj.getQNameAsString();
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
String tmpHasList = mdObj.isListEmpty() ? "no children" : "has children";
if (log.isTraceEnabled()) {
log.trace(getLogIDString() +
":readExternal(): meta data class [" + tmpClassNameStr +
"] qname [" + tmpQNameAsStr + "] index [" + count + "] [" +
tmpHasList + "]");
}
}
}
} else {
// some error occurred
keepGoing = false;
}
} // end while keep going
int adjustedNumberEntries = in.readInt();
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(getLogIDString() +
":readExternal(): adjusted number of entries ExecutionChain [" +
adjustedNumberEntries + "] ");
}
}
if ((metaExecutionChain == null) || (metaExecutionChain.isEmpty())) {
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(getLogIDString() +
":readExternal(): meta data for Execution Chain is NULL");
}
}
//---------------------------------------------------------
// LinkedList executedPhases
//
// Note that in previous versions of Axis2, this was
// represented by two lists: "inboundExecutedPhases", "outboundExecutedPhases",
// however since the message context itself represents a flow
// direction, one of these lists was always null. This was changed
// around 2007-06-08 revision r545615. For backward compatability
// with streams saved in previous versions of Axis2, we need
// to be able to process both the old style and new style.
//---------------------------------------------------------
// Restore the metadata about each member of the list
// and the order of the list.
// This metadata will be used to match up with phases
// and handlers on the engine.
//
// Non-null list:
// UTF - description string
// boolean - active flag
// int - expected number of entries in the list
// not including the last entry marker
// objects - MetaDataEntry object per list entry
// last entry will be empty MetaDataEntry
// with MetaDataEntry.LAST_ENTRY marker
// int - adjusted number of entries in the list
// includes the last empty entry
//
// Empty list:
// UTF - description string
// boolean - empty flag
//---------------------------------------------------------
// the local chain is not enabled until the
// list has been reconstituted
executedPhases = null;
metaExecuted = null;
marker = in.readUTF();
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(getLogIDString() +
": readExternal(): About to read executedPhases, marker is: " + marker);
}
// Previous versions of Axis2 saved two phases in the stream, although one should
// always have been null. The two phases and their associated markers are, in this order:
// "inboundExecutedPhases", "outboundExecutedPhases".
boolean gotInExecList = in.readBoolean();
boolean oldStyleExecutedPhases = false;
if (marker.equals("inboundExecutedPhases")) {
oldStyleExecutedPhases = true;
}
if (oldStyleExecutedPhases && (gotInExecList == ExternalizeConstants.EMPTY_OBJECT)) {
// There are an inboundExecutedPhases and an outboundExecutedPhases and this one
// is empty, so skip over it and read the next one
marker = in.readUTF();
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(getLogIDString() +
": readExternal(): Skipping over oldStyle empty inboundExecutedPhases");
log.trace(getLogIDString() +
": readExternal(): About to read executedPhases, marker is: " + marker);
}
gotInExecList = in.readBoolean();
}
/*
* At this point, the stream should point to either "executedPhases" if this is the
* new style of serialization. If it is the oldStyle, it should point to whichever
* of "inbound" or "outbound" executed phases contains an active object, since only one
* should
*/
if (gotInExecList == ExternalizeConstants.ACTIVE_OBJECT) {
int expectedNumberInExecList = in.readInt();
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(getLogIDString() +
":readExternal(): executed phases: expected number of entries [" +
expectedNumberInExecList + "]");
}
// setup the list
metaExecuted = new LinkedList<MetaDataEntry>();
// process the objects
boolean keepGoing = true;
int count = 0;
while (keepGoing) {
// stop when we get to the end-of-list marker
// get the object
Object tmpObj = in.readObject();
count++;
MetaDataEntry mdObj = (MetaDataEntry) tmpObj;
// get the class name, then add it to the list
String tmpClassNameStr;
String tmpQNameAsStr;
String tmpHasList = "no list";
if (mdObj != null) {
tmpClassNameStr = mdObj.getClassName();
if (tmpClassNameStr.equalsIgnoreCase(MetaDataEntry.END_OF_LIST)) {
// this is the last entry
keepGoing = false;
} else {
// add the entry to the meta data list
metaExecuted.add(mdObj);
tmpQNameAsStr = mdObj.getQNameAsString();
if (!mdObj.isListEmpty()) {
tmpHasList = "has list";
}
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(getLogIDString() +