You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ch...@apache.org on 2005/11/10 06:48:26 UTC
svn commit: r332228 - in
/webservices/sandesha/trunk/src/org/apache/sandesha2: handlers/
msgprocessors/ util/ workers/
Author: chamikara
Date: Wed Nov 9 21:47:52 2005
New Revision: 332228
URL: http://svn.apache.org/viewcvs?rev=332228&view=rev
Log:
Some bug fixes
Modified:
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java?rev=332228&r1=332227&r2=332228&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java Wed Nov 9 21:47:52 2005
@@ -24,6 +24,11 @@
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.handlers.AbstractHandler;
import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.PropertyConfigurator;
import org.apache.sandesha2.Constants;
import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.SandeshaException;
@@ -42,8 +47,12 @@
public class SandeshaGlobalInHandler extends AbstractHandler {
+
+ protected Log log = LogFactory.getLog(SandeshaGlobalInHandler.class.getName());
+
public void invoke(MessageContext msgContext) throws AxisFault {
-
+
+ //try {
RMMsgContext rmMessageContext = MsgInitializer
.initializeMessage(msgContext);
@@ -76,6 +85,10 @@
doGlobalProcessing(rmMessageContext);
}
+// }catch (Exception e) {
+// e.getStackTrace();
+// throw new AxisFault ("Sandesha got an exception. See logs for details");
+// }
}
private boolean dropIfDuplicate(RMMsgContext rmMsgContext)
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java?rev=332228&r1=332227&r2=332228&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java Wed Nov 9 21:47:52 2005
@@ -24,6 +24,8 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.sandesha2.Constants;
import org.apache.sandesha2.SandeshaException;
import org.apache.sandesha2.RMMsgContext;
@@ -39,12 +41,17 @@
public class SandeshaInHandler extends AbstractHandler {
+
+ protected Log log = LogFactory.getLog(SandeshaInHandler.class.getName());
+
public QName getName() {
return new QName(Constants.IN_HANDLER_NAME);
}
public void invoke(MessageContext msgCtx) throws AxisFault {
-
+
+ //try {
+
ConfigurationContext context = msgCtx.getSystemContext();
if (context == null)
throw new AxisFault("ConfigurationContext is null");
@@ -53,8 +60,6 @@
if (null != DONE && "true".equals(DONE))
return;
- //Shouldnt set app-processing-done here SINCE -
-
AxisService axisService = msgCtx.getAxisService();
if (axisService == null)
throw new AxisFault("AxisService is null");
@@ -95,6 +100,11 @@
se.printStackTrace();
throw new AxisFault("Error in processing the message");
}
+
+// }catch (Exception e) {
+// e.getStackTrace();
+// throw new AxisFault ("Sandesha got an exception. See logs for details");
+// }
}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=332228&r1=332227&r2=332228&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java Wed Nov 9 21:47:52 2005
@@ -35,6 +35,8 @@
import org.apache.axis2.soap.SOAPBody;
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.axis2.soap.SOAPFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.sandesha2.Constants;
import org.apache.sandesha2.SandeshaDynamicProperties;
import org.apache.sandesha2.SandeshaException;
@@ -67,12 +69,18 @@
public class SandeshaOutHandler extends AbstractHandler {
+ protected Log log = LogFactory.getLog(SandeshaOutHandler.class.getName());
+
public void invoke(MessageContext msgCtx) throws AxisFault {
-
+
+ //try {
+
ConfigurationContext context = msgCtx.getSystemContext();
if (context == null)
throw new AxisFault("ConfigurationContext is null");
+
+
AxisService axisService = msgCtx.getAxisService();
if (axisService == null)
throw new AxisFault("AxisService is null");
@@ -92,7 +100,7 @@
//getting rm message
RMMsgContext rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);
-
+
Parameter keyParam = axisService.getParameter(Constants.RM_ENABLE_KEY);
Object keyValue = null;
if (keyParam != null)
@@ -381,6 +389,13 @@
//pausing the message
msgCtx.setPausedTrue(getName());
}
+
+
+
+// }catch (Exception e) {
+// e.getStackTrace();
+// throw new AxisFault ("Sandesha got an exception. See logs for details");
+// }
}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=332228&r1=332227&r2=332228&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Wed Nov 9 21:47:52 2005
@@ -49,6 +49,8 @@
import org.apache.sandesha2.util.RMMsgCreator;
import org.apache.sandesha2.util.SOAPAbstractFactory;
import org.apache.sandesha2.util.SandeshaUtil;
+import org.apache.sandesha2.wsrm.AckRequested;
+import org.apache.sandesha2.wsrm.LastMessage;
import org.apache.sandesha2.wsrm.Sequence;
import org.apache.sandesha2.wsrm.SequenceAcknowledgement;
import org.apache.wsdl.WSDLConstants;
@@ -258,6 +260,17 @@
if (configCtx == null)
throw new SandeshaException("Configuration Context is null");
+ AckRequested ackRequested = (AckRequested) rmMsgCtx.getMessagePart(Constants.MessageParts.ACK_REQUEST);
+ LastMessage lastMessage = (LastMessage) sequence.getLastMessage();
+
+ boolean ackRequired = false;
+ if (ackRequested!=null || lastMessage!=null)
+ ackRequired = true;
+
+ if (!ackRequired) {
+ return;
+ }
+
//Setting the ack depending on AcksTo.
//TODO: Stop sending askc for every message.
SequencePropertyBean acksToBean = seqPropMgr.retrieve(sequenceId,
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java?rev=332228&r1=332227&r2=332228&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java Wed Nov 9 21:47:52 2005
@@ -178,7 +178,7 @@
MessageContext newMessageContext = shallowCopy(msgCtx);
newMessageContext.setDoingMTOM(msgCtx.isDoingMTOM());
newMessageContext.setDoingREST(msgCtx.isDoingREST());
- newMessageContext.setMessageID(getUUID());
+ newMessageContext.setMessageID(msgCtx.getMessageID());
newMessageContext.setOutPutWritten(msgCtx.isOutPutWritten());
newMessageContext.setParent(msgCtx.getParent());
newMessageContext.setPausedPhaseName(msgCtx.getPausedPhaseName());
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java?rev=332228&r1=332227&r2=332228&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java Wed Nov 9 21:47:52 2005
@@ -84,7 +84,6 @@
+ "' message.");
}
-
new AxisEngine(context).send(msgCtx);
if (!msgCtx.isServerSide())
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org