Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

cvs commit: ws-fx/sandesha/src/org/apache/sandesha RMMessageContext.java: msg#00214

apache.webservices.fx.devel

Subject: cvs commit: ws-fx/sandesha/src/org/apache/sandesha RMMessageContext.java

jaliya 2004/08/27 20:03:11

Modified: sandesha/src/org/apache/sandesha RMMessageContext.java
Log:
Added two properties to handle the retransmissions;
private long reTransmissionCount=0;
private long lastPrecessedTime=0;

Added new methods to copy the RMMessageContext and also to copy the
MessageContext.
PR:
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.

Revision Changes Path
1.6 +150 -1
ws-fx/sandesha/src/org/apache/sandesha/RMMessageContext.java

Index: RMMessageContext.java
===================================================================
RCS file:
/home/cvs/ws-fx/sandesha/src/org/apache/sandesha/RMMessageContext.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RMMessageContext.java 18 Aug 2004 08:12:37 -0000 1.5
+++ RMMessageContext.java 28 Aug 2004 03:03:11 -0000 1.6
@@ -16,6 +16,9 @@
*/
package org.apache.sandesha;

+import java.util.Iterator;
+
+import org.apache.axis.AxisFault;
import org.apache.axis.MessageContext;
import org.apache.axis.message.SOAPEnvelope;
import org.apache.axis.message.addressing.AddressingHeaders;
@@ -36,7 +39,8 @@
private RMHeaders rmHeaders;
private String outGoingAddress;
private int messageType;
-
+ private long reTransmissionCount=0;
+ private long lastPrecessedTime=0;

/**
* @return
@@ -176,6 +180,151 @@
*/
public void setMessageType(int messageType) {
this.messageType = messageType;
+ }
+ public void copyContents(RMMessageContext rmMsgContext){
+ if(addressingHeaders!=null)
+ rmMsgContext.setAddressingHeaders(this.addressingHeaders);
+ if(messageID!=null)
+ rmMsgContext.setMessageID(this.messageID);
+ if(obj!=null)
+ rmMsgContext.setObj(this.obj);
+ if(reqEnv!=null)
+ rmMsgContext.setReqEnv(this.reqEnv);
+ if(resEnv!=null)
+ rmMsgContext.setResEnv(this.resEnv);
+ if(rmHeaders!=null)
+ rmMsgContext.setRMHeaders(this.rmHeaders);
+ if(sequenceID!=null)
+ rmMsgContext.setSequenceID(this.sequenceID);
+ if(outGoingAddress!=null)
+ rmMsgContext.setOutGoingAddress(this.outGoingAddress);
+ if(msgContext!=null)
+ rmMsgContext.setMsgContext(this.msgContext);
+ rmMsgContext.setReTransmissionCount(this.reTransmissionCount);
+ rmMsgContext.setLastPrecessedTime(this.lastPrecessedTime);
+
+
+ }
+
+ /**
+ * @return
+ */
+ public long getLastPrecessedTime() {
+ return lastPrecessedTime;
+ }
+
+ /**
+ * @return
+ */
+ public long getReTransmissionCount() {
+ return reTransmissionCount;
+ }
+
+ /**
+ * @param l
+ */
+ public void setLastPrecessedTime(long lastPrecessedTime) {
+ this.lastPrecessedTime = lastPrecessedTime;
+ }
+
+ /**
+ * @param l
+ */
+ public void setReTransmissionCount(long reTransmissionCount) {
+ this.reTransmissionCount = reTransmissionCount;
+ }
+
+ /**
+ * This method will copy the contents of one MessageContext to another.
+ * @param msgContext1
+ * @param msgContext2
+ */
+ public static void copyMessageContext(MessageContext msgContext1,
MessageContext msgContext2) {
+
+ try {
+ if (msgContext1.getClassLoader() != null)
+
msgContext2.setClassLoader(msgContext1.getClassLoader());
+
+ if (msgContext1.getCurrentMessage() != null)
+
msgContext2.setCurrentMessage(msgContext1.getCurrentMessage());
+
+ if (msgContext1.getEncodingStyle() != null)
+
msgContext2.setEncodingStyle(msgContext1.getEncodingStyle());
+
+ //if(msgContext1.isHighFidelity()!=null)
+
msgContext2.setHighFidelity(msgContext1.isHighFidelity());
+
+ //if(msgContext1.getMaintainSession()!=null)
+
msgContext2.setMaintainSession(msgContext1.getMaintainSession());
+
+ if (msgContext1.getMessage() != null)
+
msgContext2.setMessage(msgContext1.getMessage());
+
+ if (msgContext1.getOperation() != null)
+
msgContext2.setOperation(msgContext1.getOperation());
+
+ if (msgContext1.getPassword() != null)
+
msgContext2.setPassword(msgContext1.getPassword());
+
+ //if(msgContext1.getPastPivot()!=null)
+ msgContext2.setPastPivot(msgContext1.getPastPivot());
+
+ if (msgContext1.getRequestMessage() != null)
+
msgContext2.setRequestMessage(msgContext1.getRequestMessage());
+
+ if (msgContext1.getResponseMessage() != null)
+
msgContext2.setResponseMessage(msgContext1.getResponseMessage());
+
+ if (msgContext1.getRoles() != null)
+ msgContext2.setRoles(msgContext1.getRoles());
+
+ if (msgContext1.getSchemaVersion() != null)
+
msgContext2.setSchemaVersion(msgContext1.getSchemaVersion());
+
+ if (msgContext1.getService() != null)
+
msgContext2.setService(msgContext1.getService());
+
+ if (msgContext1.getSession() != null)
+
msgContext2.setSession(msgContext1.getSession());
+
+ if (msgContext1.getSOAPActionURI() != null)
+
msgContext2.setSOAPActionURI(msgContext1.getSOAPActionURI());
+
+ if (msgContext1.getSOAPConstants() != null)
+
msgContext2.setSOAPConstants(msgContext1.getSOAPConstants());
+
+ if (msgContext1.getTargetService() != null)
+
msgContext2.setTargetService(msgContext1.getTargetService());
+
+ //if(msgContext1.getTimeout()!=null)
+ msgContext2.setTimeout(msgContext1.getTimeout());
+
+ if (msgContext1.getTransportName() != null)
+
msgContext2.setTransportName(msgContext1.getTransportName());
+
+ if (msgContext1.getTypeMappingRegistry() != null)
+
msgContext2.setTypeMappingRegistry(msgContext1.getTypeMappingRegistry());
+
+ if (msgContext1.getUsername() != null)
+
msgContext2.setUsername(msgContext1.getUsername());
+
+ //if(msgContext1.useSOAPAction()!=null)
+
msgContext2.setUseSOAPAction(msgContext1.useSOAPAction());
+
+ if (msgContext1.getAllPropertyNames() != null) {
+ Iterator ite =
msgContext1.getAllPropertyNames();
+
+ while (ite.hasNext()) {
+ String str = (String) ite.next();
+ msgContext2.setProperty(str,
msgContext1.getProperty(str));
+ }
+ }
+
+ } catch (AxisFault e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
}

}






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation