You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/02/05 19:39:15 UTC
svn commit: r503805 [2/2] - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2:
client/Options.java context/MessageContext.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=503805&r1=503804&r2=503805
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java Mon Feb 5 10:39:14 2007
@@ -45,10 +45,9 @@
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.Handler;
import org.apache.axis2.engine.Phase;
-import org.apache.axis2.handlers.AbstractHandler;
import org.apache.axis2.util.Builder;
-import org.apache.axis2.util.ObjectStateUtils;
import org.apache.axis2.util.MetaDataEntry;
+import org.apache.axis2.util.ObjectStateUtils;
import org.apache.axis2.util.SelfManagedDataHolder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -56,18 +55,13 @@
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
-import java.io.ObjectInputStream;
import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -76,7 +70,6 @@
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
-import java.util.Set;
import java.util.StringTokenizer;
/**
@@ -93,16 +86,16 @@
/**
* @serial An ID which can be used to correlate operations on a single
* message in the log files, irrespective of thread switches, persistence,
- * etc.
+ * etc.
*/
- private String logCorrelationID = null;
-
+ private String logCorrelationID = null;
+
/**
* This string will be used to hold a form of the logCorrelationID that
* is more suitable for output than its generic form.
*/
- private transient String logCorrelationIDString = null;
-
+ private transient String logCorrelationIDString = null;
+
private static final String myClassName = "MessageContext";
/**
@@ -117,10 +110,10 @@
private static final long serialVersionUID = -7753637088257391858L;
/**
- * @serial Tracks the revision level of a class to identify changes to the
+ * @serial Tracks the revision level of a class to identify changes to the
* class definition that are compatible to serialization/externalization.
* If a class definition changes, then the serialization/externalization
- * of the class is affected.
+ * of the class is affected.
* Refer to the writeExternal() and readExternal() methods.
*/
// supported revision levels, add a new level to manage compatible changes
@@ -129,7 +122,6 @@
private static final int revisionID = REVISION_1;
-
/**
* A place to store the current MessageContext
*/
@@ -158,14 +150,14 @@
public static final String REMOTE_ADDR = "REMOTE_ADDR";
public static final String TRANSPORT_HEADERS = "TRANSPORT_HEADERS";
-
+
/**
* message attachments
* NOTE: Serialization of message attachments is handled as part of the
- * overall message serialization. If this needs to change, then
- * investigate having the Attachment class implement the
- * java.io.Externalizable interface.
+ * overall message serialization. If this needs to change, then
+ * investigate having the Attachment class implement the
+ * java.io.Externalizable interface.
*/
public transient Attachments attachments;
@@ -227,7 +219,7 @@
* Callback.onError(...).
*/
public static final String DISABLE_ASYNC_CALLBACK_ON_TRANSPORT_ERROR = "disableTransmissionErrorCallback";
-
+
/**
* @serial processingFault
*/
@@ -277,7 +269,7 @@
* @serial Flag to indicate if we are doing MTOM
*/
private boolean doingMTOM;
-
+
/**
* @serial Flag to indicate if we are doing SWA
*/
@@ -300,7 +292,7 @@
/**
* AxisServiceGroup
- * <P>
+ * <p/>
* Note the service group can be set independently of the service
* so the service might not match up with this serviceGroup
*/
@@ -392,12 +384,11 @@
* rather through the SelfManagedDataManager interface implemented by handlers
*/
private transient LinkedHashMap selfManagedDataMap = null;
-
//-------------------------------------------------------------------------
// MetaData for data to be restored in activate() after readExternal()
//-------------------------------------------------------------------------
-
+
/**
* Indicates whether the message context has been reconstituted
* and needs to have its object references reconciled
@@ -409,7 +400,7 @@
* that actually saved data during serialization
*/
private transient int selfManagedDataHandlerCount = 0;
-
+
/**
* SelfManagedData cannot be restored until the configurationContext
* is available, so we have to hold the data from readExternal until
@@ -418,23 +409,23 @@
private transient ArrayList selfManagedDataListHolder = null;
/**
- * The ordered list of metadata for handlers/phases
+ * The ordered list of metadata for handlers/phases
* used during re-constitution of the message context
*/
private transient ArrayList metaExecutionChain = null;
-
+
/**
- * The ordered list of metadata for inbound executed phases
+ * The ordered list of metadata for inbound executed phases
* used during re-constitution of the message context
*/
private transient LinkedList metaInboundExecuted = null;
-
+
/**
- * The ordered list of metadata for outbound executed phases
+ * The ordered list of metadata for outbound executed phases
* used during re-constitution of the message context
*/
private transient LinkedList metaOutboundExecuted = null;
-
+
/**
* Index into the executuion chain of the currently executing handler
*/
@@ -450,74 +441,74 @@
* activate to match up with an existing object
*/
private transient MetaDataEntry metaAxisOperation = null;
-
+
/**
* The AxisService metadata will be used during
* activate to match up with an existing object
*/
private transient MetaDataEntry metaAxisService = null;
-
+
/**
* The AxisServiceGroup metadata will be used during
* activate to match up with an existing object
*/
private transient MetaDataEntry metaAxisServiceGroup = null;
-
+
/**
* The OperationContext metadata will be used during
* activate to finish restoring the object
*/
private transient OperationContext metaOperationContext = null;
-
+
/**
* The ServiceContext metadata will be used during
* activate to finish restoring the object, if needed
*/
private transient ServiceContext metaServiceContext = null;
-
+
/**
* The ServiceGroupContext metadata will be used during
* activate to finish restoring the object, if needed
*/
private transient ServiceGroupContext metaServiceGroupContext = null;
-
+
/**
* The TransportOutDescription metadata will be used during
* activate to match up with an existing object
*/
private transient MetaDataEntry metaTransportOut = null;
-
+
/**
* The TransportInDescription metadata will be used during
* activate to match up with an existing object
*/
private transient MetaDataEntry metaTransportIn = null;
-
+
/**
* The AxisMessage metadata will be used during
* activate to match up with an existing object
*/
private transient MetaDataEntry metaAxisMessage = null;
-
+
/**
- * Indicates whether this message context has an
- * AxisMessage object associated with it that needs to
+ * Indicates whether this message context has an
+ * AxisMessage object associated with it that needs to
* be reconciled
*/
private transient boolean reconcileAxisMessage = false;
-
+
/**
* Indicates whether the inbound executed phase list
* was reset before the restored list has been reconciled
*/
private transient boolean inboundReset = false;
-
+
/**
* Indicates whether the outbound executed phase list
* was reset before the restored list has been reconciled
*/
private transient boolean outboundReset = false;
-
+
//----------------------------------------------------------------
// end MetaData section
//----------------------------------------------------------------
@@ -531,37 +522,34 @@
options = new Options();
}
- public String toString()
- {
- return getLogIDString();
+ public String toString() {
+ return getLogIDString();
}
-
+
/**
* Get a "raw" version of the logCorrelationID. The logCorrelationID
* is guaranteed to be unique and may be persisted along with the rest
* of the message context.
- *
+ *
* @return A string that can be output to a log file as an identifier
- * for this MessageContext. It is suitable for matching related log
- * entries.
+ * for this MessageContext. It is suitable for matching related log
+ * entries.
*/
- public String getLogCorrelationID()
- {
+ public String getLogCorrelationID() {
if (logCorrelationID == null) {
logCorrelationID = UUIDGenerator.getUUID();
}
return logCorrelationID;
}
-
+
/**
* Get a formatted version of the logCorrelationID.
- *
+ *
* @return A string that can be output to a log file as an identifier
- * for this MessageContext. It is suitable for matching related log
- * entries.
+ * for this MessageContext. It is suitable for matching related log
+ * entries.
*/
- public String getLogIDString()
- {
+ public String getLogIDString() {
if (logCorrelationIDString == null) {
logCorrelationIDString = "[MessageContext: logID=" + getLogCorrelationID() + "]";
}
@@ -577,14 +565,14 @@
}
public AxisOperation getAxisOperation() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getAxisOperation");
}
return axisOperation;
}
public AxisService getAxisService() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getAxisService");
}
return axisService;
@@ -596,14 +584,14 @@
* so the service might not match up with this serviceGroup
*/
public AxisServiceGroup getAxisServiceGroup() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getAxisServiceGroup");
}
return axisServiceGroup;
}
public ConfigurationContext getConfigurationContext() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getConfigurationContext");
}
return configurationContext;
@@ -625,7 +613,7 @@
}
public ArrayList getExecutionChain() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getExecutionChain");
}
return executionChain;
@@ -634,111 +622,101 @@
/**
* Add a Phase to the collection of executed phases for the inbound path.
* Phases will be inserted in a LIFO data structure.
+ *
* @param phase The phase to add to the list.
*/
- public void addInboundExecutedPhase(Handler phase)
- {
- if (inboundExecutedPhases == null)
- {
+ public void addInboundExecutedPhase(Handler phase) {
+ if (inboundExecutedPhases == null) {
inboundExecutedPhases = new LinkedList();
}
- inboundExecutedPhases.addFirst(phase);
+ inboundExecutedPhases.addFirst(phase);
}
-
+
/**
* Remove the first Phase in the collection of executed phases for the
* inbound path.
*/
- public void removeFirstInboundExecutedPhase()
- {
- if (inboundExecutedPhases != null)
- {
- inboundExecutedPhases.removeFirst();
- }
+ public void removeFirstInboundExecutedPhase() {
+ if (inboundExecutedPhases != null) {
+ inboundExecutedPhases.removeFirst();
+ }
}
/**
* Get an iterator over the inbound executed phase list.
+ *
* @return An Iterator over the LIFO data structure.
*/
- public Iterator getInboundExecutedPhases()
- {
- if(isDebugEnabled) {
+ public Iterator getInboundExecutedPhases() {
+ if (isDebugEnabled) {
checkActivateWarning("getInboundExecutedPhases");
}
- if (inboundExecutedPhases == null)
- {
+ if (inboundExecutedPhases == null) {
inboundExecutedPhases = new LinkedList();
}
return inboundExecutedPhases.iterator();
}
-
+
/**
* Reset the list of executed inbound phases.
* This is needed because the OutInAxisOperation currently invokes
* receive() even when a fault occurs, and we will have already executed
* the flowComplete on those before receiveFault() is called.
*/
- public void resetInboundExecutedPhases()
- {
+ public void resetInboundExecutedPhases() {
inboundReset = true;
inboundExecutedPhases = new LinkedList();
}
-
+
/**
* Add a Phase to the collection of executed phases for the outbound path.
* Phases will be inserted in a LIFO data structure.
+ *
* @param phase The phase to add to the list.
*/
- public void addOutboundExecutedPhase(Handler phase)
- {
- if (outboundExecutedPhases == null)
- {
+ public void addOutboundExecutedPhase(Handler phase) {
+ if (outboundExecutedPhases == null) {
outboundExecutedPhases = new LinkedList();
}
- outboundExecutedPhases.addFirst(phase);
+ outboundExecutedPhases.addFirst(phase);
}
-
+
/**
* Remove the first Phase in the collection of executed phases for the
* outbound path.
*/
- public void removeFirstOutboundExecutedPhase()
- {
- if (outboundExecutedPhases != null)
- {
- outboundExecutedPhases.removeFirst();
- }
+ public void removeFirstOutboundExecutedPhase() {
+ if (outboundExecutedPhases != null) {
+ outboundExecutedPhases.removeFirst();
+ }
}
/**
* Get an iterator over the outbound executed phase list.
+ *
* @return An Iterator over the LIFO data structure.
*/
- public Iterator getOutboundExecutedPhases()
- {
- if(isDebugEnabled) {
+ public Iterator getOutboundExecutedPhases() {
+ if (isDebugEnabled) {
checkActivateWarning("getOutboundExecutedPhases");
}
- if (outboundExecutedPhases == null)
- {
+ if (outboundExecutedPhases == null) {
outboundExecutedPhases = new LinkedList();
}
return outboundExecutedPhases.iterator();
}
-
+
/**
* Reset the list of executed outbound phases.
* This is needed because the OutInAxisOperation currently invokes
* receive() even when a fault occurs, and we will have already executed
* the flowComplete on those before receiveFault() is called.
*/
- public void resetOutboundExecutedPhases()
- {
+ public void resetOutboundExecutedPhases() {
outboundReset = true;
outboundExecutedPhases = new LinkedList();
}
-
+
/**
* @return Returns EndpointReference.
*/
@@ -891,7 +869,7 @@
}
public OperationContext getOperationContext() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getOperationContext");
}
return operationContext;
@@ -954,7 +932,7 @@
* @return the value of the property, or null if the property is not found
*/
public Object getProperty(String name) {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getProperty");
}
@@ -989,7 +967,7 @@
* that the entire hierarchy is not present, it will start at whatever level
* has been set and start there.
* The returned map is unmodifiable, so any changes to the properties have
- * to be done by calling {@link #setProperty(String, Object)}. In addition,
+ * to be done by calling {@link #setProperty(String,Object)}. In addition,
* any changes to the properties are not reflected on this map.
*
* @return An unmodifiable map containing the combination of all available
@@ -1051,7 +1029,7 @@
* @return Returns ServiceContext.
*/
public ServiceContext getServiceContext() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getServiceContext");
}
return serviceContext;
@@ -1065,7 +1043,7 @@
}
public ServiceGroupContext getServiceGroupContext() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getServiceGroupContext");
}
return serviceGroupContext;
@@ -1105,7 +1083,7 @@
* @return Returns TransportInDescription.
*/
public TransportInDescription getTransportIn() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getTransportIn");
}
return transportIn;
@@ -1115,7 +1093,7 @@
* @return Returns TransportOutDescription.
*/
public TransportOutDescription getTransportOut() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getTransportOut");
}
return transportOut;
@@ -1138,7 +1116,7 @@
public boolean isDoingREST() {
return doingREST;
}
-
+
/**
* @return Returns boolean.
*/
@@ -1198,7 +1176,7 @@
public AxisMessage getAxisMessage() {
if (reconcileAxisMessage) {
- log.warn(this.getLogIDString()+":getAxisMessage(): ****WARNING**** MessageContext.activate(configurationContext) needs to be invoked.");
+ log.warn(this.getLogIDString() + ":getAxisMessage(): ****WARNING**** MessageContext.activate(configurationContext) needs to be invoked.");
}
return axisMessage;
@@ -1215,9 +1193,9 @@
public void setAxisService(AxisService axisService) {
this.axisService = axisService;
if (this.axisService != null)
- this.axisServiceGroup = (AxisServiceGroup)this.axisService.getParent();
+ this.axisServiceGroup = (AxisServiceGroup) this.axisService.getParent();
else
- this.axisServiceGroup = null;
+ this.axisServiceGroup = null;
}
/*
@@ -1258,7 +1236,7 @@
public void setDoingREST(boolean b) {
doingREST = b;
}
-
+
/**
* @param b
*/
@@ -1341,7 +1319,7 @@
this.setParent(operationContext);
if (operationContext != null) {
- if ((operationContext!=null) && (serviceContext != null) && (operationContext.getParent() == null)) {
+ if ((operationContext != null) && (serviceContext != null) && (operationContext.getParent() == null)) {
operationContext.setParent(serviceContext);
}
@@ -1436,8 +1414,7 @@
this.serviceGroupContext = serviceGroupContext;
- if (this.serviceGroupContext != null)
- {
+ if (this.serviceGroupContext != null) {
this.axisServiceGroup = serviceGroupContext.getDescription();
}
}
@@ -1495,7 +1472,7 @@
}
public Options getOptions() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getOptions");
}
return options;
@@ -1527,7 +1504,7 @@
public Policy getEffectivePolicy() {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("getEffectivePolicy");
}
if (axisMessage != null) {
@@ -1544,7 +1521,7 @@
public boolean isEngaged(QName moduleName) {
- if(isDebugEnabled) {
+ if (isDebugEnabled) {
checkActivateWarning("isEngaged");
}
boolean enegage;
@@ -1590,7 +1567,7 @@
*/
public boolean isHeaderPresent() {
// If there's no envelope there can't be a header.
- if(this.envelope == null){
+ if (this.envelope == null) {
return false;
}
OMElement node = this.envelope.getFirstElement();
@@ -1640,18 +1617,16 @@
return attachments.getDataHandler(contentID);
}
-
-
/* ===============================================================
- * SelfManagedData Section
- * ===============================================================
- */
-
+ * SelfManagedData Section
+ * ===============================================================
+ */
+
/*
- * character to delimit strings
- */
+ * character to delimit strings
+ */
private String selfManagedDataDelimiter = "*";
-
+
/**
* Set up a unique key in the form of
@@ -1662,156 +1637,132 @@
* <LI>delimitor
* <LI>the key's hash code as a string
* </OL>
- *
- * @param clazz The class that owns the supplied key
- * @param key The key
- *
+ *
+ * @param clazz The class that owns the supplied key
+ * @param key The key
* @return A string key
*/
- private String generateSelfManagedDataKey(Class clazz, Object key)
- {
- return clazz.getName()+selfManagedDataDelimiter+key.toString()+selfManagedDataDelimiter+Integer.toString(key.hashCode());
+ private String generateSelfManagedDataKey(Class clazz, Object key) {
+ return clazz.getName() + selfManagedDataDelimiter + key.toString() + selfManagedDataDelimiter + Integer.toString(key.hashCode());
}
-
+
/**
* Get the class name from the key generated by generateSelfManagedDataKey()
- *
- * @param key The key
- *
+ *
+ * @param key The key
* @return The class name
*/
- private String getClassNameFromSelfManagedDataKey(String key)
- {
- StringTokenizer tokenizer = new StringTokenizer(key, selfManagedDataDelimiter);
- return tokenizer.nextToken();
+ private String getClassNameFromSelfManagedDataKey(String key) {
+ StringTokenizer tokenizer = new StringTokenizer(key, selfManagedDataDelimiter);
+ return tokenizer.nextToken();
}
-
+
/**
- * Add a key-value pair of self managed data to the set associated with
- * this message context.
- * <P>
- * This is primarily intended to allow handlers to manage their own
+ * Add a key-value pair of self managed data to the set associated with
+ * this message context.
+ * <p/>
+ * This is primarily intended to allow handlers to manage their own
* message-specific data when the message context is saved/restored.
- *
- * @param clazz The class of the caller that owns the key-value pair
- * @param key The key for this data object
- * @param value The data object
- */
- public void setSelfManagedData(Class clazz, Object key, Object value)
- {
- if (selfManagedDataMap == null)
- {
- selfManagedDataMap = new LinkedHashMap();
- }
-
- // make sure we have a unique key and a delimiter so we can
- // get the classname and hashcode for serialization/deserialization
- selfManagedDataMap.put(generateSelfManagedDataKey(clazz, key), value);
+ *
+ * @param clazz The class of the caller that owns the key-value pair
+ * @param key The key for this data object
+ * @param value The data object
+ */
+ public void setSelfManagedData(Class clazz, Object key, Object value) {
+ if (selfManagedDataMap == null) {
+ selfManagedDataMap = new LinkedHashMap();
+ }
+
+ // make sure we have a unique key and a delimiter so we can
+ // get the classname and hashcode for serialization/deserialization
+ selfManagedDataMap.put(generateSelfManagedDataKey(clazz, key), value);
}
-
+
/**
* Retrieve a value of self managed data previously saved with the specified key.
- *
- * @param clazz The class of the caller that owns the key-value pair
- * @param key The key for the data
*
+ * @param clazz The class of the caller that owns the key-value pair
+ * @param key The key for the data
* @return The data object associated with the key, or NULL if not found
*/
- public Object getSelfManagedData(Class clazz, Object key)
- {
- if (selfManagedDataMap != null)
- {
- return selfManagedDataMap.get(generateSelfManagedDataKey(clazz, key));
+ public Object getSelfManagedData(Class clazz, Object key) {
+ if (selfManagedDataMap != null) {
+ return selfManagedDataMap.get(generateSelfManagedDataKey(clazz, key));
}
- return null;
+ return null;
}
-
+
/**
* Check to see if the key for the self managed data is available
*
- * @param clazz The class of the caller that owns the key-value pair
- * @param key The key to look for
- *
+ * @param clazz The class of the caller that owns the key-value pair
+ * @param key The key to look for
* @return TRUE if the key exists, FALSE otherwise
*/
- public boolean containsSelfManagedDataKey(Class clazz, Object key)
- {
- if (selfManagedDataMap != null)
- {
- return selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz, key));
+ public boolean containsSelfManagedDataKey(Class clazz, Object key) {
+ if (selfManagedDataMap != null) {
+ return selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz, key));
}
- return false;
+ return false;
}
-
+
/**
- * Removes the mapping of the specified key if the specified key
+ * Removes the mapping of the specified key if the specified key
* has been set for self managed data
- *
- * @param clazz The class of the caller that owns the key-value pair
- * @param key The key of the object to be removed
- */
- public void removeSelfManagedData(Class clazz, Object key)
- {
- if (selfManagedDataMap != null)
- {
- selfManagedDataMap.remove(generateSelfManagedDataKey(clazz, key));
+ *
+ * @param clazz The class of the caller that owns the key-value pair
+ * @param key The key of the object to be removed
+ */
+ public void removeSelfManagedData(Class clazz, Object key) {
+ if (selfManagedDataMap != null) {
+ selfManagedDataMap.remove(generateSelfManagedDataKey(clazz, key));
}
}
-
+
/**
* Flatten the phase list into a list of just unique handler instances
*
- * @param list the list of handlers
- * @param map users should pass null as this is just a holder for the recursion
- *
+ * @param list the list of handlers
+ * @param map users should pass null as this is just a holder for the recursion
* @return a list of unigue object instances
*/
- private ArrayList flattenPhaseListToHandlers(ArrayList list, LinkedHashMap map)
- {
-
- if (map == null)
- {
- map = new LinkedHashMap();
+ private ArrayList flattenPhaseListToHandlers(ArrayList list, LinkedHashMap map) {
+
+ if (map == null) {
+ map = new LinkedHashMap();
}
-
+
Iterator it = list.iterator();
- while (it.hasNext())
- {
- Handler handler = (Handler)it.next();
+ while (it.hasNext()) {
+ Handler handler = (Handler) it.next();
String key = null;
- if (handler != null)
- {
- key = handler.getClass().getName() +"@"+ handler.hashCode();
+ if (handler != null) {
+ key = handler.getClass().getName() + "@" + handler.hashCode();
}
- if (handler instanceof Phase)
- {
+ if (handler instanceof Phase) {
// add its handlers to the list
- flattenHandlerList(((Phase)handler).getHandlers(), map);
- }
- else
- {
+ flattenHandlerList(((Phase) handler).getHandlers(), map);
+ } else {
// if the same object is already in the list,
// then it won't be in the list multiple times
- map.put(key, handler);
+ map.put(key, handler);
}
- }
-
- if (log.isTraceEnabled())
- {
+ }
+
+ if (log.isTraceEnabled()) {
Iterator it2 = map.keySet().iterator();
- while (it2.hasNext())
- {
+ while (it2.hasNext()) {
Object key = it2.next();
Handler value = (Handler) map.get(key);
String name = value.getName();
- log.trace(getLogIDString()+":flattenPhaseListToHandlers(): key ["+(String)key+"] handler name ["+name+"]");
+ log.trace(getLogIDString() + ":flattenPhaseListToHandlers(): key [" + (String) key + "] handler name [" + name + "]");
}
}
- return new ArrayList(map.values());
+ return new ArrayList(map.values());
}
@@ -1819,73 +1770,61 @@
* Flatten the handler list into just unique handler instances
* including phase instances.
*
- * @param list the list of handlers/phases
- * @param map users should pass null as this is just a holder for the recursion
- *
+ * @param list the list of handlers/phases
+ * @param map users should pass null as this is just a holder for the recursion
* @return a list of unigue object instances
*/
- private ArrayList flattenHandlerList(ArrayList list, LinkedHashMap map)
- {
-
- if (map == null)
- {
- map = new LinkedHashMap();
+ private ArrayList flattenHandlerList(ArrayList list, LinkedHashMap map) {
+
+ if (map == null) {
+ map = new LinkedHashMap();
}
-
+
Iterator it = list.iterator();
- while( it.hasNext() )
- {
- Handler handler = (Handler)it.next();
+ while (it.hasNext()) {
+ Handler handler = (Handler) it.next();
String key = null;
- if (handler != null)
- {
- key = handler.getClass().getName() +"@"+ handler.hashCode();
+ if (handler != null) {
+ key = handler.getClass().getName() + "@" + handler.hashCode();
}
- if (handler instanceof Phase)
- {
+ if (handler instanceof Phase) {
// put the phase in the list
- map.put(key, handler);
+ map.put(key, handler);
// add its handlers to the list
- flattenHandlerList(((Phase)handler).getHandlers(), map);
- }
- else
- {
+ flattenHandlerList(((Phase) handler).getHandlers(), map);
+ } else {
// if the same object is already in the list,
// then it won't be in the list multiple times
- map.put(key, handler);
+ map.put(key, handler);
}
- }
-
- return new ArrayList(map.values());
+ }
+
+ return new ArrayList(map.values());
}
/**
- * Calls the serializeSelfManagedData() method of each handler that
+ * Calls the serializeSelfManagedData() method of each handler that
* implements the <bold>SelfManagedDataManager</bold> interface.
- * Handlers for this message context are identified via the
+ * Handlers for this message context are identified via the
* executionChain list.
*
* @param out The output stream
- *
- */
- private void serializeSelfManagedData(ObjectOutput out)
- {
+ */
+ private void serializeSelfManagedData(ObjectOutput out) {
selfManagedDataHandlerCount = 0;
- try
- {
+ try {
if ((selfManagedDataMap == null)
- || (executionChain == null)
- || (selfManagedDataMap.size() == 0)
- || (executionChain.size() == 0))
- {
+ || (executionChain == null)
+ || (selfManagedDataMap.size() == 0)
+ || (executionChain.size() == 0)) {
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(getLogIDString()+":serializeSelfManagedData(): No data : END");
+ log.trace(getLogIDString() + ":serializeSelfManagedData(): No data : END");
return;
}
@@ -1896,11 +1835,10 @@
//ArrayList selfManagedDataHolderList = serializeSelfManagedDataHelper(flatExecChain.iterator(), new ArrayList());
ArrayList selfManagedDataHolderList = serializeSelfManagedDataHelper(flatExecChain);
- if (selfManagedDataHolderList.size() == 0)
- {
+ if (selfManagedDataHolderList.size() == 0) {
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(getLogIDString()+":serializeSelfManagedData(): No data : END");
+ log.trace(getLogIDString() + ":serializeSelfManagedData(): No data : END");
return;
}
@@ -1912,81 +1850,70 @@
// how many handlers actually
// returned serialized SelfManagedData
- out.writeInt(selfManagedDataHolderList.size());
+ out.writeInt(selfManagedDataHolderList.size());
- for (int i = 0; i < selfManagedDataHolderList.size(); i++)
- {
+ for (int i = 0; i < selfManagedDataHolderList.size(); i++) {
out.writeObject(selfManagedDataHolderList.get(i));
}
}
- catch (IOException e)
- {
- log.trace("MessageContext:serializeSelfManagedData(): Exception ["+e.getClass().getName()+"] description ["+e.getMessage()+"]",e);
+ catch (IOException e) {
+ log.trace("MessageContext:serializeSelfManagedData(): Exception [" + e.getClass().getName() + "] description [" + e.getMessage() + "]", e);
}
}
-
+
/**
- * This is the helper method to do the recursion for serializeSelfManagedData()
+ * This is the helper method to do the recursion for serializeSelfManagedData()
*
* @param handlers
- *
- * @return ArrayList
- */
- private ArrayList serializeSelfManagedDataHelper(ArrayList handlers)
- {
+ * @return ArrayList
+ */
+ private ArrayList serializeSelfManagedDataHelper(ArrayList handlers) {
ArrayList selfManagedDataHolderList = new ArrayList();
Iterator it = handlers.iterator();
- try
- {
- while (it.hasNext())
- {
- Handler handler = (Handler)it.next();
-
- //if (handler instanceof Phase)
+ try {
+ while (it.hasNext()) {
+ Handler handler = (Handler) it.next();
+
+ //if (handler instanceof Phase)
//{
- // selfManagedDataHolderList = serializeSelfManagedDataHelper(((Phase)handler).getHandlers().iterator(), selfManagedDataHolderList);
+ // selfManagedDataHolderList = serializeSelfManagedDataHelper(((Phase)handler).getHandlers().iterator(), selfManagedDataHolderList);
//}
- //else if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass()))
- if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass()))
- {
+ //else if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass()))
+ if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass())) {
// only call the handler's serializeSelfManagedData if it implements SelfManagedDataManager
- log.trace("MessageContext:serializeSelfManagedDataHelper(): calling handler ["+handler.getClass().getName()+"] name ["+handler.getName().toString()+"] serializeSelfManagedData method");
+ log.trace("MessageContext:serializeSelfManagedDataHelper(): calling handler [" + handler.getClass().getName() + "] name [" + handler.getName().toString() + "] serializeSelfManagedData method");
+
+ ByteArrayOutputStream baos_fromHandler = ((SelfManagedDataManager) handler).serializeSelfManagedData(this);
- ByteArrayOutputStream baos_fromHandler = ((SelfManagedDataManager)handler).serializeSelfManagedData(this);
+ if (baos_fromHandler != null) {
+ baos_fromHandler.close();
- if (baos_fromHandler != null)
- {
- baos_fromHandler.close();
-
- try
- {
- SelfManagedDataHolder selfManagedDataHolder = new SelfManagedDataHolder(handler.getClass().getName(), handler.getName().toString(), baos_fromHandler.toByteArray());
- selfManagedDataHolderList.add(selfManagedDataHolder);
- selfManagedDataHandlerCount++;
+ try {
+ SelfManagedDataHolder selfManagedDataHolder = new SelfManagedDataHolder(handler.getClass().getName(), handler.getName().toString(), baos_fromHandler.toByteArray());
+ selfManagedDataHolderList.add(selfManagedDataHolder);
+ selfManagedDataHandlerCount++;
+ }
+ catch (Exception exc) {
+ log.trace("MessageContext:serializeSelfManagedData(): exception [" + exc.getClass().getName() + "][" + exc.getMessage() + "] in setting up SelfManagedDataHolder object for [" + handler.getClass().getName() + " / " + handler.getName().toString() + "] ", exc);
}
- catch (Exception exc)
- {
- log.trace("MessageContext:serializeSelfManagedData(): exception ["+exc.getClass().getName()+"]["+exc.getMessage()+"] in setting up SelfManagedDataHolder object for ["+handler.getClass().getName()+" / "+handler.getName().toString()+"] ",exc);
- }
- }
- }
- }
-
- return selfManagedDataHolderList;
- }
- catch (Exception ex)
- {
- log.trace("MessageContext:serializeSelfManagedData(): exception ["+ex.getClass().getName()+"]["+ex.getMessage()+"]",ex);
+ }
+ }
+ }
+
+ return selfManagedDataHolderList;
+ }
+ catch (Exception ex) {
+ log.trace("MessageContext:serializeSelfManagedData(): exception [" + ex.getClass().getName() + "][" + ex.getMessage() + "]", ex);
return null;
}
-
+
}
-
+
/**
* During deserialization, the executionChain will be
* re-constituted before the SelfManagedData is restored.
@@ -1994,119 +1921,102 @@
* This method lets us find the handler instance from the
* executionChain so we can call each one's
* deserializeSelfManagedData method.
- *
- * @param it The iterator from the executionChain object
- * @param classname The class name
- * @param qNameAsString The QName in string form
- *
+ *
+ * @param it The iterator from the executionChain object
+ * @param classname The class name
+ * @param qNameAsString The QName in string form
* @return SelfManagedDataManager handler
*/
- private SelfManagedDataManager deserialize_getHandlerFromExecutionChain(Iterator it, String classname, String qNameAsString)
- {
- SelfManagedDataManager handler_toreturn = null;
-
- try
- {
- while ((it.hasNext()) && (handler_toreturn == null))
- {
- Handler handler = (Handler)it.next();
-
- if (handler instanceof Phase)
- {
- handler_toreturn = deserialize_getHandlerFromExecutionChain(((Phase)handler).getHandlers().iterator(), classname, qNameAsString);
- }
- else if ((handler.getClass().getName().equals(classname))
- && (handler.getName().toString().equals(qNameAsString)))
- {
- handler_toreturn = (SelfManagedDataManager)handler;
- }
- }
- return handler_toreturn;
- }
- catch (ClassCastException e)
- {
- // Doesn't seem likely to happen, but just in case...
- // A handler classname in the executionChain matched up with our parameter
- // classname, but the existing class in the executionChain is a different
- // implementation than the one we saved during serializeSelfManagedData.
- // NOTE: the exception gets absorbed!
+ private SelfManagedDataManager deserialize_getHandlerFromExecutionChain(Iterator it, String classname, String qNameAsString) {
+ SelfManagedDataManager handler_toreturn = null;
+
+ try {
+ while ((it.hasNext()) && (handler_toreturn == null)) {
+ Handler handler = (Handler) it.next();
+
+ if (handler instanceof Phase) {
+ handler_toreturn = deserialize_getHandlerFromExecutionChain(((Phase) handler).getHandlers().iterator(), classname, qNameAsString);
+ } else if ((handler.getClass().getName().equals(classname))
+ && (handler.getName().toString().equals(qNameAsString))) {
+ handler_toreturn = (SelfManagedDataManager) handler;
+ }
+ }
+ return handler_toreturn;
+ }
+ catch (ClassCastException e) {
+ // Doesn't seem likely to happen, but just in case...
+ // A handler classname in the executionChain matched up with our parameter
+ // classname, but the existing class in the executionChain is a different
+ // implementation than the one we saved during serializeSelfManagedData.
+ // NOTE: the exception gets absorbed!
- log.trace("MessageContext:deserialize_getHandlerFromExecutionChain(): ClassCastException thrown: " + e.getMessage(),e);
+ log.trace("MessageContext:deserialize_getHandlerFromExecutionChain(): ClassCastException thrown: " + e.getMessage(), e);
return null;
- }
+ }
}
-
+
/*
- * We don't need to create new instances of the handlers
- * since the executionChain is rebuilt after readExternal().
- * We just have to find them in the executionChain and
- * call each handler's deserializeSelfManagedData method.
- */
- private void deserializeSelfManagedData() throws IOException
- {
- try
- {
- for (int i = 0; (selfManagedDataListHolder != null) && (i < selfManagedDataListHolder.size()); i++)
- {
- SelfManagedDataHolder selfManagedDataHolder = (SelfManagedDataHolder)selfManagedDataListHolder.get(i);
-
- String classname = selfManagedDataHolder.getClassname();
- String qNameAsString = selfManagedDataHolder.getId();
-
- SelfManagedDataManager handler = deserialize_getHandlerFromExecutionChain(executionChain.iterator(), classname, qNameAsString);
-
- if (handler == null)
- {
- log.trace(getLogIDString()+":deserializeSelfManagedData(): ["+classname+"] was not found in the executionChain associated with the message context.");
-
- throw new IOException("The class ["+classname+"] was not found in the executionChain associated with the message context.");
- }
-
- ByteArrayInputStream handlerData = new ByteArrayInputStream(selfManagedDataHolder.getData());
-
- // the handler implementing SelfManagedDataManager is responsible for repopulating
- // the SelfManagedData in the MessageContext (this)
-
- log.trace(getLogIDString()+":deserializeSelfManagedData(): calling handler ["+classname+"] ["+qNameAsString+"] deserializeSelfManagedData method");
-
- handler.deserializeSelfManagedData(handlerData, this);
- handler.restoreTransientData(this);
- }
- }
- catch (IOException ioe)
- {
- log.trace(getLogIDString()+":deserializeSelfManagedData(): IOException thrown: " + ioe.getMessage(), ioe);
- throw ioe;
- }
-
- }
+ * We don't need to create new instances of the handlers
+ * since the executionChain is rebuilt after readExternal().
+ * We just have to find them in the executionChain and
+ * call each handler's deserializeSelfManagedData method.
+ */
+ private void deserializeSelfManagedData() throws IOException {
+ try {
+ for (int i = 0; (selfManagedDataListHolder != null) && (i < selfManagedDataListHolder.size()); i++) {
+ SelfManagedDataHolder selfManagedDataHolder = (SelfManagedDataHolder) selfManagedDataListHolder.get(i);
+
+ String classname = selfManagedDataHolder.getClassname();
+ String qNameAsString = selfManagedDataHolder.getId();
+
+ SelfManagedDataManager handler = deserialize_getHandlerFromExecutionChain(executionChain.iterator(), classname, qNameAsString);
+
+ if (handler == null) {
+ log.trace(getLogIDString() + ":deserializeSelfManagedData(): [" + classname + "] was not found in the executionChain associated with the message context.");
+
+ throw new IOException("The class [" + classname + "] was not found in the executionChain associated with the message context.");
+ }
+
+ ByteArrayInputStream handlerData = new ByteArrayInputStream(selfManagedDataHolder.getData());
+
+ // the handler implementing SelfManagedDataManager is responsible for repopulating
+ // the SelfManagedData in the MessageContext (this)
+ log.trace(getLogIDString() + ":deserializeSelfManagedData(): calling handler [" + classname + "] [" + qNameAsString + "] deserializeSelfManagedData method");
+
+ handler.deserializeSelfManagedData(handlerData, this);
+ handler.restoreTransientData(this);
+ }
+ }
+ catch (IOException ioe) {
+ log.trace(getLogIDString() + ":deserializeSelfManagedData(): IOException thrown: " + ioe.getMessage(), ioe);
+ throw ioe;
+ }
+ }
/* ===============================================================
- * Externalizable support
- * ===============================================================
- */
-
+ * Externalizable support
+ * ===============================================================
+ */
+
/**
* Save the contents of this MessageContext instance.
- * <p>
+ * <p/>
* NOTE: Transient fields and static fields are not saved.
- * Also, objects that represent "static" data are
- * not saved, except for enough information to be
- * able to find matching objects when the message
- * context is re-constituted.
+ * Also, objects that represent "static" data are
+ * not saved, except for enough information to be
+ * able to find matching objects when the message
+ * context is re-constituted.
*
- * @param out The stream to write the object contents to
- *
- * @exception IOException
+ * @param out The stream to write the object contents to
+ * @throws IOException
*/
- public void writeExternal(ObjectOutput out) throws IOException
- {
+ public void writeExternal(ObjectOutput out) throws IOException {
String logCorrelationIDString = getLogIDString();
- log.trace(logCorrelationIDString+":writeExternal(): writing to output stream");
+ log.trace(logCorrelationIDString + ":writeExternal(): writing to output stream");
//---------------------------------------------------------
// in order to handle future changes to the message
@@ -2144,7 +2054,7 @@
boolean persistWithOptimizedMTOM = (getProperty(MTOMConstants.ATTACHMENTS) != null);
out.writeBoolean(persistWithOptimizedMTOM);
-
+
//---------------------------------------------------------
// message
//---------------------------------------------------------
@@ -2155,14 +2065,12 @@
// make sure message attachments are handled
- if (envelope != null)
- {
+ if (envelope != null) {
String msgClass = envelope.getClass().getName();
ByteArrayOutputStream msgBuffer = new ByteArrayOutputStream();
- try
- {
+ try {
// use a non-destructive method on the soap message
// We don't need to write to a separate byte array
@@ -2173,8 +2081,7 @@
outputFormat.setSOAP11(isSOAP11);
- if (persistWithOptimizedMTOM)
- {
+ if (persistWithOptimizedMTOM) {
outputFormat.setDoOptimize(true);
//Notice that we're writing this next bit out to the
@@ -2184,33 +2091,29 @@
// this will be expensive because it builds the OM tree
envelope.serialize(msgData, outputFormat);
-
- msgBuffer.write(msgData.toByteArray() ,0, msgData.size());
- log.trace(logCorrelationIDString+":writeExternal(): msg data ["+msgData+"]");
+ msgBuffer.write(msgData.toByteArray(), 0, msgData.size());
+
+ log.trace(logCorrelationIDString + ":writeExternal(): msg data [" + msgData + "]");
}
- catch (Exception e)
- {
- log.trace(logCorrelationIDString+":writeExternal(): can not serialize the SOAP message ***Exception*** ["+e.getClass().getName()+" : "+e.getMessage()+"]");
+ catch (Exception e) {
+ log.trace(logCorrelationIDString + ":writeExternal(): can not serialize the SOAP message ***Exception*** [" + e.getClass().getName() + " : " + e.getMessage() + "]");
}
//---------------------------------------------
// get the character encoding for the message
//---------------------------------------------
- String charSetEnc = (String) getProperty(MessageContext.CHARACTER_SET_ENCODING);
+ String charSetEnc = (String) getProperty(MessageContext.CHARACTER_SET_ENCODING);
- if (charSetEnc == null)
- {
+ if (charSetEnc == null) {
OperationContext opContext = getOperationContext();
- if (opContext != null)
- {
+ if (opContext != null) {
charSetEnc = (String) opContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
}
}
- if (charSetEnc == null)
- {
+ if (charSetEnc == null) {
charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
}
@@ -2219,7 +2122,6 @@
//---------------------------------------------
String namespaceURI = envelope.getNamespace().getName();
-
// write out the following information, IN ORDER:
// the class name
// the active or empty flag
@@ -2229,37 +2131,31 @@
int msgSize = msgBuffer.size();
- if (msgSize != 0)
- {
+ if (msgSize != 0) {
out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
out.writeUTF(charSetEnc);
out.writeUTF(namespaceURI);
out.writeInt(msgSize);
out.write(msgBuffer.toByteArray());
- log.trace(logCorrelationIDString+":writeExternal(): msg charSetEnc=["+charSetEnc+"] namespaceURI=["+namespaceURI+"] msgSize=["+msgSize+"]");
- }
- else
- {
+ log.trace(logCorrelationIDString + ":writeExternal(): msg charSetEnc=[" + charSetEnc + "] namespaceURI=[" + namespaceURI + "] msgSize=[" + msgSize + "]");
+ } else {
// the envelope is null
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(logCorrelationIDString+":writeExternal(): msg is Empty");
+ log.trace(logCorrelationIDString + ":writeExternal(): msg is Empty");
}
// close out internal stream
msgBuffer.close();
- }
- else
- {
+ } else {
// the envelope is null
out.writeUTF("MessageContext.envelope");
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(logCorrelationIDString+":writeExternal(): msg is Empty");
+ log.trace(logCorrelationIDString + ":writeExternal(): msg is Empty");
}
-
//---------------------------------------------------------
// ArrayList executionChain
// handler and phase related data
@@ -2286,17 +2182,15 @@
// UTF - description string
// boolean - empty flag
//---------------------------------------------------------
- String execChainDesc = logCorrelationIDString+".executionChain";
+ String execChainDesc = logCorrelationIDString + ".executionChain";
int listSize = 0;
- if (executionChain != null)
- {
+ if (executionChain != null) {
listSize = executionChain.size();
}
- if (listSize > 0)
- {
+ if (listSize > 0) {
// start writing data to the output stream
out.writeUTF(execChainDesc);
out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
@@ -2312,8 +2206,7 @@
Iterator i = executionChain.iterator();
- while (i.hasNext())
- {
+ while (i.hasNext()) {
Object obj = i.next();
String objClass = obj.getClass().getName();
int objClassLength = objClass.length();
@@ -2325,41 +2218,35 @@
// get the correct object-specific name
String qnameAsString = null;
- if (obj instanceof Phase)
- {
- Phase phaseObj = (Phase)obj;
+ if (obj instanceof Phase) {
+ Phase phaseObj = (Phase) obj;
qnameAsString = phaseObj.getName().toString();
// add the list of handlers to the meta data
setupPhaseList(phaseObj, mdEntry);
- }
- else if (obj instanceof Handler)
- {
- Handler handlerObj = (Handler)obj;
+ } else if (obj instanceof Handler) {
+ Handler handlerObj = (Handler) obj;
qnameAsString = handlerObj.getName().toString();
- }
- else
- {
+ } else {
// TODO: will there be any other kinds of objects in the execution Chain?
qnameAsString = "NULL";
}
mdEntry.setQName(qnameAsString);
-
// update the index for the entry in the chain
executionChainEntry++;
- log.trace(logCorrelationIDString+":writeExternal(): ***BEFORE OBJ WRITE*** executionChain entry class ["+objClass+"] qname ["+qnameAsString+"]");
+ log.trace(logCorrelationIDString + ":writeExternal(): ***BEFORE OBJ WRITE*** executionChain entry class [" + objClass + "] qname [" + qnameAsString + "]");
- ObjectStateUtils.writeObject(out, mdEntry, logCorrelationIDString+".executionChain:entry class ["+objClass+"] qname ["+qnameAsString+"]");
+ ObjectStateUtils.writeObject(out, mdEntry, logCorrelationIDString + ".executionChain:entry class [" + objClass + "] qname [" + qnameAsString + "]");
// update the index so that the index
// now indicates the next entry that
// will be attempted
nextIndex++;
- log.trace(logCorrelationIDString+":writeExternal(): ***AFTER OBJ WRITE*** executionChain entry class ["+objClass+"] qname ["+qnameAsString+"]");
+ log.trace(logCorrelationIDString + ":writeExternal(): ***AFTER OBJ WRITE*** executionChain entry class [" + objClass + "] qname [" + qnameAsString + "]");
} // end while entries in execution chain
@@ -2368,26 +2255,23 @@
MetaDataEntry lastEntry = new MetaDataEntry();
lastEntry.setClassName(MetaDataEntry.END_OF_LIST);
- ObjectStateUtils.writeObject(out, lastEntry, logCorrelationIDString+".executionChain: last entry ");
+ ObjectStateUtils.writeObject(out, lastEntry, logCorrelationIDString + ".executionChain: last entry ");
nextIndex++;
// nextIndex also gives us the number of entries
// that were actually saved as opposed to the
// number of entries in the executionChain
- out.writeInt(nextIndex);
+ out.writeInt(nextIndex);
- }
- else
- {
+ } else {
// general case: handle "null" or "empty"
out.writeUTF(execChainDesc);
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(logCorrelationIDString+":writeExternal(): executionChain is NULL");
+ log.trace(logCorrelationIDString + ":writeExternal(): executionChain is NULL");
}
-
//---------------------------------------------------------
// LinkedList inboundExecutedPhases
//---------------------------------------------------------
@@ -2411,17 +2295,15 @@
// UTF - description string
// boolean - empty flag
//---------------------------------------------------------
- String inExecListDesc = logCorrelationIDString+".inboundExecutedPhases";
+ String inExecListDesc = logCorrelationIDString + ".inboundExecutedPhases";
int inExecListSize = 0;
- if (inboundExecutedPhases != null)
- {
+ if (inboundExecutedPhases != null) {
inExecListSize = inboundExecutedPhases.size();
}
- if (inExecListSize > 0)
- {
+ if (inExecListSize > 0) {
// start writing data to the output stream
out.writeUTF(inExecListDesc);
out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
@@ -2433,8 +2315,7 @@
Iterator inIterator = inboundExecutedPhases.iterator();
- while (inIterator.hasNext())
- {
+ while (inIterator.hasNext()) {
Object inObj = inIterator.next();
String inObjClass = inObj.getClass().getName();
int inObjClassLength = inObjClass.length();
@@ -2446,21 +2327,16 @@
// get the correct object-specific name
String inQnameAsString = null;
- if (inObj instanceof Phase)
- {
- Phase inPhaseObj = (Phase)inObj;
+ if (inObj instanceof Phase) {
+ Phase inPhaseObj = (Phase) inObj;
inQnameAsString = inPhaseObj.getName().toString();
// add the list of handlers to the meta data
setupPhaseList(inPhaseObj, inMdEntry);
- }
- else if (inObj instanceof Handler)
- {
- Handler inHandlerObj = (Handler)inObj;
+ } else if (inObj instanceof Handler) {
+ Handler inHandlerObj = (Handler) inObj;
inQnameAsString = inHandlerObj.getName().toString();
- }
- else
- {
+ } else {
// TODO: will there be any other kinds of objects in the list
inQnameAsString = "NULL";
}
@@ -2468,16 +2344,16 @@
inMdEntry.setQName(inQnameAsString);
- log.trace(logCorrelationIDString+":writeExternal(): ***BEFORE Inbound Executed List OBJ WRITE*** inboundExecutedPhases entry class ["+inObjClass+"] qname ["+inQnameAsString+"]");
+ log.trace(logCorrelationIDString + ":writeExternal(): ***BEFORE Inbound Executed List OBJ WRITE*** inboundExecutedPhases entry class [" + inObjClass + "] qname [" + inQnameAsString + "]");
- ObjectStateUtils.writeObject(out, inMdEntry, logCorrelationIDString+".inboundExecutedPhases:entry class ["+inObjClass+"] qname ["+inQnameAsString+"]");
+ ObjectStateUtils.writeObject(out, inMdEntry, logCorrelationIDString + ".inboundExecutedPhases:entry class [" + inObjClass + "] qname [" + inQnameAsString + "]");
// update the index so that the index
// now indicates the next entry that
// will be attempted
inExecNextIndex++;
- log.trace(logCorrelationIDString+":writeExternal(): ***AFTER Inbound Executed List OBJ WRITE*** inboundExecutedPhases entry class ["+inObjClass+"] qname ["+inQnameAsString+"]");
+ log.trace(logCorrelationIDString + ":writeExternal(): ***AFTER Inbound Executed List OBJ WRITE*** inboundExecutedPhases entry class [" + inObjClass + "] qname [" + inQnameAsString + "]");
} // end while entries in execution chain
@@ -2486,26 +2362,23 @@
MetaDataEntry inLastEntry = new MetaDataEntry();
inLastEntry.setClassName(MetaDataEntry.END_OF_LIST);
- ObjectStateUtils.writeObject(out, inLastEntry, logCorrelationIDString+".inboundExecutedPhases: last entry ");
+ ObjectStateUtils.writeObject(out, inLastEntry, logCorrelationIDString + ".inboundExecutedPhases: last entry ");
inExecNextIndex++;
// inExecNextIndex also gives us the number of entries
// that were actually saved as opposed to the
// number of entries in the inboundExecutedPhases
- out.writeInt(inExecNextIndex);
+ out.writeInt(inExecNextIndex);
- }
- else
- {
+ } else {
// general case: handle "null" or "empty"
out.writeUTF(inExecListDesc);
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(logCorrelationIDString+":writeExternal(): inboundExecutedPhases is NULL");
+ log.trace(logCorrelationIDString + ":writeExternal(): inboundExecutedPhases is NULL");
}
-
//---------------------------------------------------------
// LinkedList outboundExecutedPhases
//---------------------------------------------------------
@@ -2529,17 +2402,15 @@
// UTF - description string
// boolean - empty flag
//---------------------------------------------------------
- String outExecListDesc = logCorrelationIDString+".outboundExecutedPhases";
+ String outExecListDesc = logCorrelationIDString + ".outboundExecutedPhases";
int outExecListSize = 0;
- if (outboundExecutedPhases != null)
- {
+ if (outboundExecutedPhases != null) {
outExecListSize = outboundExecutedPhases.size();
}
- if (outExecListSize > 0)
- {
+ if (outExecListSize > 0) {
// start writing data to the output stream
out.writeUTF(outExecListDesc);
out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
@@ -2551,8 +2422,7 @@
Iterator outIterator = outboundExecutedPhases.iterator();
- while (outIterator.hasNext())
- {
+ while (outIterator.hasNext()) {
Object outObj = outIterator.next();
String outObjClass = outObj.getClass().getName();
int outObjClassLength = outObjClass.length();
@@ -2564,37 +2434,32 @@
// get the correct object-specific name
String outQnameAsString = null;
- if (outObj instanceof Phase)
- {
- Phase outPhaseObj = (Phase)outObj;
+ if (outObj instanceof Phase) {
+ Phase outPhaseObj = (Phase) outObj;
outQnameAsString = outPhaseObj.getName().toString();
// add the list of handlers to the meta data
setupPhaseList(outPhaseObj, outMdEntry);
- }
- else if (outObj instanceof Handler)
- {
- Handler outHandlerObj = (Handler)outObj;
+ } else if (outObj instanceof Handler) {
+ Handler outHandlerObj = (Handler) outObj;
outQnameAsString = outHandlerObj.getName().toString();
- }
- else
- {
+ } else {
// TODO: will there be any other kinds of objects in the list
outQnameAsString = "NULL";
}
outMdEntry.setQName(outQnameAsString);
- log.trace(logCorrelationIDString+":writeExternal(): ***BEFORE Outbound Executed List OBJ WRITE*** outboundExecutedPhases entry class ["+outObjClass+"] qname ["+outQnameAsString+"]");
+ log.trace(logCorrelationIDString + ":writeExternal(): ***BEFORE Outbound Executed List OBJ WRITE*** outboundExecutedPhases entry class [" + outObjClass + "] qname [" + outQnameAsString + "]");
- ObjectStateUtils.writeObject(out, outMdEntry, logCorrelationIDString+".outboundExecutedPhases:entry class ["+outObjClass+"] qname ["+outQnameAsString+"]");
+ ObjectStateUtils.writeObject(out, outMdEntry, logCorrelationIDString + ".outboundExecutedPhases:entry class [" + outObjClass + "] qname [" + outQnameAsString + "]");
// update the index so that the index
// now indicates the next entry that
// will be attempted
outExecNextIndex++;
- log.trace(logCorrelationIDString+":writeExternal(): ***AFTER Outbound Executed List OBJ WRITE*** outboundExecutedPhases entry class ["+outObjClass+"] qname ["+outQnameAsString+"]");
+ log.trace(logCorrelationIDString + ":writeExternal(): ***AFTER Outbound Executed List OBJ WRITE*** outboundExecutedPhases entry class [" + outObjClass + "] qname [" + outQnameAsString + "]");
} // end while entries
@@ -2603,76 +2468,66 @@
MetaDataEntry outLastEntry = new MetaDataEntry();
outLastEntry.setClassName(MetaDataEntry.END_OF_LIST);
- ObjectStateUtils.writeObject(out, outLastEntry, logCorrelationIDString+".outboundExecutedPhases: last entry ");
+ ObjectStateUtils.writeObject(out, outLastEntry, logCorrelationIDString + ".outboundExecutedPhases: last entry ");
outExecNextIndex++;
// outExecNextIndex also gives us the number of entries
// that were actually saved as opposed to the
// number of entries in the outboundExecutedPhases
- out.writeInt(outExecNextIndex);
+ out.writeInt(outExecNextIndex);
- }
- else
- {
+ } else {
// general case: handle "null" or "empty"
out.writeUTF(outExecListDesc);
out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- log.trace(logCorrelationIDString+":writeExternal(): outboundExecutedPhases is NULL");
+ log.trace(logCorrelationIDString + ":writeExternal(): outboundExecutedPhases is NULL");
}
-
//---------------------------------------------------------
// options
//---------------------------------------------------------
// before saving the Options, make sure there is a message ID
String tmpID = getMessageID();
- if (tmpID == null)
- {
+ if (tmpID == null) {
// get an id to use when restoring this object
tmpID = org.apache.axis2.util.UUIDGenerator.getUUID();
setMessageID(tmpID);
}
- if (log.isInfoEnabled())
- {
- log.info(logCorrelationIDString+":writeExternal(): message ID ["+tmpID+"]");
+ if (log.isInfoEnabled()) {
+ log.info(logCorrelationIDString + ":writeExternal(): message ID [" + tmpID + "]");
}
- ObjectStateUtils.writeObject(out, options, logCorrelationIDString+".options for ["+options.getLogCorrelationIDString()+"]");
-
+ ObjectStateUtils.writeObject(out, options, logCorrelationIDString + ".options for [" + options.getLogCorrelationIDString() + "]");
//---------------------------------------------------------
// operation
//---------------------------------------------------------
// axis operation
//---------------------------------------------------------
- String axisOpMarker = logCorrelationIDString+".axisOperation";
+ String axisOpMarker = logCorrelationIDString + ".axisOperation";
ObjectStateUtils.writeString(out, axisOpMarker, axisOpMarker);
- if (axisOperation == null)
- {
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- }
- else
- {
+ if (axisOperation == null) {
+ out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
+ } else {
// TODO: may need to include the meta data for the axis service that is
// the parent of the axis operation
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
+ out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
// make sure the axis operation has a name associated with it
QName aoTmpQName = axisOperation.getName();
- if (aoTmpQName == null)
- {
+ if (aoTmpQName == null) {
aoTmpQName = new QName(ObjectStateUtils.EMPTY_MARKER);
axisOperation.setName(aoTmpQName);
}
- metaAxisOperation = new MetaDataEntry(axisOperation.getClass().getName(), axisOperation.getName().toString());
- ObjectStateUtils.writeObject(out, metaAxisOperation, logCorrelationIDString+".metaAxisOperation");
+ metaAxisOperation = new MetaDataEntry(axisOperation.getClass().getName(), axisOperation.getName().toString());
+ ObjectStateUtils.writeObject(out, metaAxisOperation, logCorrelationIDString + ".metaAxisOperation");
}
//---------------------------------------------------------
@@ -2682,43 +2537,36 @@
// In order to avoid having multiple copies of the object graph
// being saved at different points in the serialization,
// it is important to isolate this message context object.
- String oc_desc = logCorrelationIDString+".operationContext";
- if (operationContext != null)
- {
+ String oc_desc = logCorrelationIDString + ".operationContext";
+ if (operationContext != null) {
operationContext.isolateMessageContext(this);
- oc_desc = oc_desc + " for ["+operationContext.getLogCorrelationIDString()+"]";
+ oc_desc = oc_desc + " for [" + operationContext.getLogCorrelationIDString() + "]";
}
// NOTE: expect this to be the parent of the message context
ObjectStateUtils.writeObject(out, operationContext, oc_desc);
-
//---------------------------------------------------------
// service
//---------------------------------------------------------
// axis service
//-------------------------
// this is expected to be the parent of the axis operation object
- String axisServMarker = logCorrelationIDString+".axisService";
+ String axisServMarker = logCorrelationIDString + ".axisService";
ObjectStateUtils.writeString(out, axisServMarker, axisServMarker);
- if (axisService == null)
- {
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- }
- else
- {
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
- metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName().toString());
- ObjectStateUtils.writeObject(out, metaAxisService, logCorrelationIDString+".metaAxisService");
+ if (axisService == null) {
+ out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
+ } else {
+ out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
+ metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName().toString());
+ ObjectStateUtils.writeObject(out, metaAxisService, logCorrelationIDString + ".metaAxisService");
}
-
//-------------------------
// serviceContextID string
//-------------------------
- ObjectStateUtils.writeString(out, serviceContextID, logCorrelationIDString+".serviceContextID");
-
+ ObjectStateUtils.writeString(out, serviceContextID, logCorrelationIDString + ".serviceContextID");
//-------------------------
// serviceContext
@@ -2726,64 +2574,52 @@
// is this the same as the parent of the OperationContext?
boolean isParent = false;
- if (operationContext != null)
- {
+ if (operationContext != null) {
ServiceContext opctxParent = operationContext.getServiceContext();
- if (serviceContext != null)
- {
- if (serviceContext.equals(opctxParent))
- {
+ if (serviceContext != null) {
+ if (serviceContext.equals(opctxParent)) {
// the ServiceContext is the parent of the OperationContext
isParent = true;
}
}
}
- String servCtxMarker = logCorrelationIDString+".serviceContext";
+ String servCtxMarker = logCorrelationIDString + ".serviceContext";
ObjectStateUtils.writeString(out, servCtxMarker, servCtxMarker);
- if (serviceContext == null)
- {
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- }
- else
- {
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
+ if (serviceContext == null) {
+ out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
+ } else {
+ out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
out.writeBoolean(isParent);
// only write out the object if it is not the parent
- if (!isParent)
- {
- ObjectStateUtils.writeObject(out, serviceContext, logCorrelationIDString+".serviceContext");
+ if (!isParent) {
+ ObjectStateUtils.writeObject(out, serviceContext, logCorrelationIDString + ".serviceContext");
}
}
-
//---------------------------------------------------------
// axisServiceGroup
//---------------------------------------------------------
- String axisServGrpMarker = logCorrelationIDString+".axisServiceGroup";
+ String axisServGrpMarker = logCorrelationIDString + ".axisServiceGroup";
ObjectStateUtils.writeString(out, axisServGrpMarker, axisServGrpMarker);
- if (axisServiceGroup == null)
- {
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- }
- else
- {
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
- metaAxisServiceGroup = new MetaDataEntry(axisServiceGroup.getClass().getName(), axisServiceGroup.getServiceGroupName());
- ObjectStateUtils.writeObject(out, metaAxisServiceGroup, logCorrelationIDString+".metaAxisServiceGroup");
+ if (axisServiceGroup == null) {
+ out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
+ } else {
+ out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
+ metaAxisServiceGroup = new MetaDataEntry(axisServiceGroup.getClass().getName(), axisServiceGroup.getServiceGroupName());
+ ObjectStateUtils.writeObject(out, metaAxisServiceGroup, logCorrelationIDString + ".metaAxisServiceGroup");
}
-
+
//-----------------------------
// serviceGroupContextId string
//-----------------------------
- ObjectStateUtils.writeString(out, serviceGroupContextId, logCorrelationIDString+".serviceGroupContextId");
+ ObjectStateUtils.writeString(out, serviceGroupContextId, logCorrelationIDString + ".serviceGroupContextId");
-
//-------------------------
// serviceGroupContext
//-------------------------
@@ -2791,66 +2627,53 @@
// is this the same as the parent of the ServiceContext?
isParent = false;
- if (serviceContext != null)
- {
+ if (serviceContext != null) {
ServiceGroupContext srvgrpctxParent = (ServiceGroupContext) serviceContext.getParent();
- if (serviceGroupContext != null)
- {
- if (serviceGroupContext.equals(srvgrpctxParent))
- {
+ if (serviceGroupContext != null) {
+ if (serviceGroupContext.equals(srvgrpctxParent)) {
// the ServiceGroupContext is the parent of the ServiceContext
isParent = true;
}
}
}
- String servGrpCtxMarker = logCorrelationIDString+".serviceGroupContext";
+ String servGrpCtxMarker = logCorrelationIDString + ".serviceGroupContext";
ObjectStateUtils.writeString(out, servGrpCtxMarker, servGrpCtxMarker);
- if (serviceGroupContext == null)
- {
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- }
- else
- {
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
+ if (serviceGroupContext == null) {
+ out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
+ } else {
+ out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
out.writeBoolean(isParent);
// only write out the object if it is not the parent
- if (!isParent)
- {
- ObjectStateUtils.writeObject(out, serviceGroupContext, logCorrelationIDString+".serviceGroupContext");
+ if (!isParent) {
+ ObjectStateUtils.writeObject(out, serviceGroupContext, logCorrelationIDString + ".serviceGroupContext");
}
}
-
-
//---------------------------------------------------------
// axis message
//---------------------------------------------------------
- String axisMsgMarker = logCorrelationIDString+".axisMessage";
+ String axisMsgMarker = logCorrelationIDString + ".axisMessage";
ObjectStateUtils.writeString(out, axisMsgMarker, axisMsgMarker);
- if (axisMessage == null)
- {
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
- }
- else
- {
+ if (axisMessage == null) {
+ out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
+ } else {
// This AxisMessage is expected to belong to the AxisOperation
// that has already been recorded for this MessageContext.
// If an AxisMessage associated with this Messagecontext is
// associated with a different AxisOperation, then more
// meta information would need to be saved
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
+ out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
// make sure the axis message has a name associated with it
String amTmpName = axisMessage.getName();
- if (amTmpName == null)
- {
+ if (amTmpName == null) {
amTmpName = new String(ObjectStateUtils.EMPTY_MARKER);
axisMessage.setName(amTmpName);
}
@@ -2859,14 +2682,13 @@
QName amTmpElementQName = axisMessage.getElementQName();
String amTmpElemQNameString = null;
- if (amTmpElementQName != null)
- {
+ if (amTmpElementQName != null) {
amTmpElemQNameString = amTmpElementQName.toString();
}
- metaAxisMessage = new MetaDataEntry(axisMessage.getClass().getName(), axisMessage.getName(), amTmpElemQNameString);
+ metaAxisMessage = new MetaDataEntry(axisMessage.getClass().getName(), axisMessage.getName(), amTmpElemQNameString);
- ObjectStateUtils.writeObject(out, metaAxisMessage, logCorrelationIDString+".metaAxisMessage");
+ ObjectStateUtils.writeObject(out, metaAxisMessage, logCorrelationIDString + ".metaAxisMessage");
}
//---------------------------------------------------------
@@ -2880,13 +2702,10 @@
// it with the configuration context on the system when
// this message context object is restored
-
-
//---------------------------------------------------------
// session context
//---------------------------------------------------------
- ObjectStateUtils.writeObject(out, sessionContext, logCorrelationIDString+".sessionContext" );
-
+ ObjectStateUtils.writeObject(out, sessionContext, logCorrelationIDString + ".sessionContext");
//---------------------------------------------------------
// transport
@@ -2895,32 +2714,23 @@
//------------------------------
// incomingTransportName string
//------------------------------
- ObjectStateUtils.writeString(out, incomingTransportName, logCorrelationIDString+".incomingTransportName");
+ ObjectStateUtils.writeString(out, incomingTransportName, logCorrelationIDString + ".incomingTransportName");
// TransportInDescription transportIn
- if (transportIn != null)
- {
+ if (transportIn != null) {
metaTransportIn = new MetaDataEntry(null, transportIn.getName().toString());
- }
- else
- {
+ } else {
metaTransportIn = null;
}
- ObjectStateUtils.writeObject(out, metaTransportIn, logCorrelationIDString+".transportIn");
-
+ ObjectStateUtils.writeObject(out, metaTransportIn, logCorrelationIDString + ".transportIn");
// TransportOutDescription transportOut
- if (transportOut != null)
- {
+ if (transportOut != null) {
metaTransportOut = new MetaDataEntry(null, transportOut.getName().toString());
- }
- else
- {
+ } else {
metaTransportOut = null;
}
- ObjectStateUtils.writeObject(out, metaTransportOut, logCorrelationIDString+".transportOut");
-
-
+ ObjectStateUtils.writeObject(out, metaTransportOut, logCorrelationIDString + ".transportOut");
//---------------------------------------------------------
// properties
@@ -2929,61 +2739,52 @@
HashMap tmpHashMap = null;
- if ((tmpMap != null) && (tmpMap.isEmpty()==false))
- {
+ if ((tmpMap != null) && (tmpMap.isEmpty() == false)) {
tmpHashMap = new HashMap(tmpMap);
}
- ObjectStateUtils.writeHashMap(out, tmpHashMap, logCorrelationIDString+".properties");
-
+ ObjectStateUtils.writeHashMap(out, tmpHashMap, logCorrelationIDString + ".properties");
//---------------------------------------------------------
// special data
//---------------------------------------------------------
- String selfManagedDataMarker = logCorrelationIDString+".selfManagedData";
+ String selfManagedDataMarker = logCorrelationIDString + ".selfManagedData";
ObjectStateUtils.writeString(out, selfManagedDataMarker, selfManagedDataMarker);
// save the data, which the handlers themselves will serialize
//ByteArrayOutputStream baos_fromSelfManagedData = serializeSelfManagedData();
serializeSelfManagedData(out);
-
-
//---------------------------------------------------------
// done
//---------------------------------------------------------
- log.trace(logCorrelationIDString+":writeExternal(): completed writing to output stream for "+logCorrelationIDString);
+ log.trace(logCorrelationIDString + ":writeExternal(): completed writing to output stream for " + logCorrelationIDString);
}
-
-
/**
- * Restore the contents of the MessageContext that was
- * previously saved.
- * <p>
+ * Restore the contents of the MessageContext that was
+ * previously saved.
+ * <p/>
* NOTE: The field data must read back in the same order and type
- * as it was written. Some data will need to be validated when
+ * as it was written. Some data will need to be validated when
* resurrected.
*
- * @param in The stream to read the object contents from
- *
- * @exception IOException
- * @exception ClassNotFoundException
+ * @param in The stream to read the object contents from
+ * @throws IOException
+ * @throws ClassNotFoundException
*/
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
// set the flag to indicate that the message context is being
// reconstituted and will need to have certain object references
// to be reconciled with the current engine setup
needsToBeReconciled = true;
// trace point
- log.trace(myClassName+":readExternal(): BEGIN bytes available in stream ["+in.available()+"] ");
-
+ log.trace(myClassName + ":readExternal(): BEGIN bytes available in stream [" + in.available() + "] ");
//---------------------------------------------------------
// object level identifiers
@@ -2993,21 +2794,18 @@
long suid = in.readLong();
// revision ID
- int revID = in.readInt();
+ int revID = in.readInt();
// make sure the object data is in a version we can handle
- if (suid != serialVersionUID)
- {
+ if (suid != serialVersionUID) {
throw new ClassNotFoundException(ObjectStateUtils.UNSUPPORTED_SUID);
}
// make sure the object data is in a revision level we can handle
- if (revID != REVISION_1)
- {
+ if (revID != REVISION_1) {
throw new ClassNotFoundException(ObjectStateUtils.UNSUPPORTED_REVID);
}
-
//---------------------------------------------------------
// various simple fields
//---------------------------------------------------------
@@ -3016,32 +2814,31 @@
FLOW = in.readInt();
// various flags
- processingFault = in.readBoolean();
- paused = in.readBoolean();
- outputWritten = in.readBoolean();
+ processingFault = in.readBoolean();
+ paused = in.readBoolean();
+ outputWritten = in.readBoolean();
newThreadRequired = in.readBoolean();
- isSOAP11 = in.readBoolean();
- doingREST = in.readBoolean();
- doingMTOM = in.readBoolean();
- doingSwA = in.readBoolean();
- responseWritten = in.readBoolean();
- serverSide = in.readBoolean();
+ isSOAP11 = in.readBoolean();
+ doingREST = in.readBoolean();
+ doingMTOM = in.readBoolean();
+ doingSwA = in.readBoolean();
+ responseWritten = in.readBoolean();
+ serverSide = in.readBoolean();
long time = in.readLong();
setLastTouchedTime(time);
[... 1713 lines stripped ...]
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org