You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2006/06/12 11:52:58 UTC
svn commit: r413616 - in /webservices/sandesha/trunk: ./
src/org/apache/sandesha2/msgprocessors/ test/src/org/apache/sandesha2/
Author: chamikara
Date: Mon Jun 12 02:52:56 2006
New Revision: 413616
URL: http://svn.apache.org/viewvc?rev=413616&view=rev
Log:
Applied the patch from Andrew Gatford.
Added a dependency for jakarta-httpcore.
Modified:
webservices/sandesha/trunk/project.properties
webservices/sandesha/trunk/project.xml
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java
Modified: webservices/sandesha/trunk/project.properties
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/project.properties?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/project.properties (original)
+++ webservices/sandesha/trunk/project.properties Mon Jun 12 02:52:56 2006
@@ -39,5 +39,6 @@
stax.impl.version=asl-2.9.3
wsdl4j.version=1.5.2
XmlSchema.version=1.0.2
+jakarta.httpcore.version=4.0-alpha2
repo.addressing.mar.name=addressing
Modified: webservices/sandesha/trunk/project.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/project.xml?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/project.xml (original)
+++ webservices/sandesha/trunk/project.xml Mon Jun 12 02:52:56 2006
@@ -131,6 +131,11 @@
<artifactId>commons-httpclient</artifactId>
<version>${commons.httpclient.version}</version>
</dependency>
+ <dependency>
+ <groupId>httpcomponents-httpcore</groupId>
+ <artifactId>jakarta-httpcore</artifactId>
+ <version>${jakarta.httpcore.version}</version>
+ </dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java Mon Jun 12 02:52:56 2006
@@ -62,7 +62,9 @@
private static final Log log = LogFactory.getLog(AckRequestedProcessor.class);
public void processInMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ if (log.isDebugEnabled())
+ log.debug("Enter: AckRequestedProcessor::processInMessage");
+
AckRequested ackRequested = (AckRequested) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.ACK_REQUEST);
if (ackRequested==null) {
throw new SandeshaException ("Message identified as of type ackRequested does not have an AckRequeted element");
@@ -255,12 +257,20 @@
SandeshaUtil.startSenderForTheSequence(configurationContext,sequenceID);
- msgContext.pause();
+ msgContext.pause();
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: AckRequestedProcessor::processInMessage");
}
}
public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ if (log.isDebugEnabled())
+ {
+ log.debug("Enter: AckRequestedProcessor::processOutMessage");
+ log.debug("Exit: AckRequestedProcessor::processOutMessage");
+ }
+
}
}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java Mon Jun 12 02:52:56 2006
@@ -55,7 +55,9 @@
private static final Log log = LogFactory.getLog(AcknowledgementProcessor.class);
public void processInMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ if (log.isDebugEnabled())
+ log.debug("Enter: AcknowledgementProcessor::processInMessage");
+
SequenceAcknowledgement sequenceAck = (SequenceAcknowledgement) rmMsgCtx
.getMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
if (sequenceAck == null) {
@@ -239,6 +241,9 @@
//stopping the progress of the message further.
rmMsgCtx.pause();
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: AcknowledgementProcessor::processInMessage");
}
@@ -272,6 +277,11 @@
}
public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ if (log.isDebugEnabled())
+ {
+ log.debug("Enter: AcknowledgementProcessor::processOutMessage");
+ log.debug("Exit: AcknowledgementProcessor::processOutMessage");
+ }
+
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Mon Jun 12 02:52:56 2006
@@ -83,6 +83,8 @@
private static final Log log = LogFactory.getLog(ApplicationMsgProcessor.class );
public void processInMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::processInMessage");
//Processing for ack if any
SequenceAcknowledgement sequenceAck = (SequenceAcknowledgement) rmMsgCtx
@@ -336,6 +338,8 @@
//Sending acknowledgements
sendAckIfNeeded(rmMsgCtx, messagesStr,storageManager);
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::processInMessage");
}
//TODO convert following from INT to LONG
@@ -355,6 +359,9 @@
public void sendAckIfNeeded(RMMsgContext rmMsgCtx, String messagesStr, StorageManager storageManager)
throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::sendAckIfNeeded");
+
MessageContext msgCtx = rmMsgCtx.getMessageContext();
SequencePropertyBeanMgr seqPropMgr = storageManager
@@ -388,10 +395,15 @@
String message = "Exception thrown while trying to send the ack message";
throw new SandeshaException (message,e);
}
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::sendAckIfNeeded");
}
- public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::processOutMessage");
+
MessageContext msgContext = rmMsgCtx.getMessageContext();
ConfigurationContext configContext = msgContext .getConfigurationContext();
@@ -739,11 +751,17 @@
processResponseMessage(rmMsgCtx, internalSequenceId, messageNumber,storageKey,storageManager);
msgContext.pause(); // the execution will be stopped.
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::processOutMessage");
}
private void addCreateSequenceMessage(RMMsgContext applicationRMMsg,
String internalSequenceId, String acksTo, StorageManager storageManager) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::addCreateSequenceMessage, " + internalSequenceId);
+
MessageContext applicationMsg = applicationRMMsg.getMessageContext();
ConfigurationContext configCtx = applicationMsg.getConfigurationContext();
@@ -816,10 +834,15 @@
} catch (AxisFault e) {
throw new SandeshaException (e.getMessage());
}
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::addCreateSequenceMessage");
}
private void processResponseMessage(RMMsgContext rmMsg,
String internalSequenceId, long messageNumber, String storageKey, StorageManager storageManager) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::processResponseMessage, " + internalSequenceId);
MessageContext msg = rmMsg.getMessageContext();
SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil.getSOAPVersion(rmMsg.getSOAPEnvelope()));
@@ -1015,10 +1038,15 @@
} catch (AxisFault e) {
throw new SandeshaException (e);
}
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::processResponseMessage");
}
private long getPreviousMsgNo(ConfigurationContext context,
String internalSequenceId,StorageManager storageManager) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::getPreviousMsgNo, " + internalSequenceId);
SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
@@ -1030,12 +1058,18 @@
Long nextMsgNoLng = new Long(nextMsgNoBean.getValue());
nextMsgNo = nextMsgNoLng.longValue();
}
-
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::getPreviousMsgNo, " + nextMsgNo);
+
return nextMsgNo;
}
private void setNextMsgNo(ConfigurationContext context,
String internalSequenceId, long msgNo,StorageManager storageManager) throws SandeshaException {
+
+ if (log.isDebugEnabled())
+ log.debug("Enter: ApplicationMsgProcessor::setNextMsgNo, " + internalSequenceId +", "+msgNo);
if (msgNo<=0) {
String message = "Message number '" + msgNo + "' is invalid. Has to be larger than zero.";
@@ -1061,5 +1095,7 @@
else
seqPropMgr.insert(nextMsgNoBean);
+ if (log.isDebugEnabled())
+ log.debug("Exit: ApplicationMsgProcessor::setNextMsgNo");
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java Mon Jun 12 02:52:56 2006
@@ -7,6 +7,8 @@
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.util.Utils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException;
@@ -23,7 +25,11 @@
public class CloseSequenceProcessor implements MsgProcessor {
+ private static final Log log = LogFactory.getLog(CloseSequenceProcessor.class );
+
public void processInMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: CloseSequenceProcessor::processInMessage");
ConfigurationContext configCtx = rmMsgCtx.getMessageContext().getConfigurationContext();
CloseSequence closeSequence = (CloseSequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.CLOSE_SEQUENCE);
@@ -107,10 +113,18 @@
String message = "Could not send the terminate sequence response";
throw new SandeshaException (message,e);
}
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: CloseSequenceProcessor::processInMessage");
}
public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ if (log.isDebugEnabled())
+ {
+ log.debug("Enter: CloseSequenceProcessor::processOutMessage");
+ log.debug("Exit: CloseSequenceProcessor::processOutMessage");
+ }
+
}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java Mon Jun 12 02:52:56 2006
@@ -60,6 +60,8 @@
public void processInMessage(RMMsgContext createSeqRMMsg)
throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: CreateSeqMsgProcessor::processInMessage");
MessageContext createSeqMsg = createSeqRMMsg.getMessageContext();
CreateSequence createSeqPart = (CreateSequence) createSeqRMMsg.getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ);
@@ -198,11 +200,21 @@
}
createSeqRMMsg.pause();
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqMsgProcessor::processInMessage");
}
private boolean offerAccepted (String sequenceID, ConfigurationContext configCtx, RMMsgContext createSeqRMMsg,StorageManager storageManager) throws SandeshaException {
- if ("".equals(sequenceID))
+ if (log.isDebugEnabled())
+ log.debug("Enter: CreateSeqMsgProcessor::offerAccepted, "+sequenceID);
+
+ if ("".equals(sequenceID))
+ {
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqMsgProcessor::offerAccepted, "+false);
return false;
+ }
CreateSeqBeanMgr createSeqMgr = storageManager.getCreateSeqBeanMgr();
@@ -211,17 +223,28 @@
Collection arr = createSeqMgr.find(createSeqFindBean);
if (arr.size()>0)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqMsgProcessor::offerAccepted, "+false);
return false;
-
+ }
if (sequenceID.length()<=1)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqMsgProcessor::offerAccepted, "+false);
return false; //Single character offers are NOT accepted.
+ }
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqMsgProcessor::offerAccepted, "+true);
return true;
}
- public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
- MessageContext msgCtx = rmMsgCtx.getMessageContext();
+ public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: CreateSeqMsgProcessor::processOutMessage");
+
+ MessageContext msgCtx = rmMsgCtx.getMessageContext();
//adding the SANDESHA_LISTENER
SandeshaListener faultCallback = (SandeshaListener) msgCtx.getOptions().getProperty(SandeshaClientConstants.SANDESHA_LISTENER);
@@ -231,5 +254,7 @@
operationContext.setProperty(SandeshaClientConstants.SANDESHA_LISTENER,faultCallback);
}
}
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqMsgProcessor::processOutMessage");
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java Mon Jun 12 02:52:56 2006
@@ -64,7 +64,10 @@
public void processInMessage(RMMsgContext createSeqResponseRMMsgCtx)
throws SandeshaException {
- SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil
+ if (log.isDebugEnabled())
+ log.debug("Enter: CreateSeqResponseMsgProcessor::processInMessage");
+
+ SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil
.getSOAPVersion(createSeqResponseRMMsgCtx.getSOAPEnvelope()));
MessageContext createSeqResponseMsg = createSeqResponseRMMsgCtx.getMessageContext();
@@ -282,9 +285,17 @@
"false");
createSeqResponseRMMsgCtx.pause();
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: CreateSeqResponseMsgProcessor::processInMessage");
}
public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-
+ if (log.isDebugEnabled())
+ {
+ log.debug("Enter: CreateSeqResponseMsgProcessor::processOutMessage");
+ log.debug("Exit: CreateSeqResponseMsgProcessor::processOutMessage");
+ }
+
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java Mon Jun 12 02:52:56 2006
@@ -68,6 +68,9 @@
public void processInMessage(RMMsgContext terminateSeqRMMsg)
throws SandeshaException {
+
+ if (log.isDebugEnabled())
+ log.debug("Enter: TerminateSeqMsgProcessor::processInMessage");
MessageContext terminateSeqMsg = terminateSeqRMMsg.getMessageContext();
//Processing for ack if any
@@ -144,9 +147,15 @@
SequenceManager.updateLastActivatedTime(sequenceId,storageManager);
terminateSeqMsg.pause();
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: TerminateSeqMsgProcessor::processInMessage");
}
private void setUpHighestMsgNumbers (ConfigurationContext configCtx, StorageManager storageManager, String sequenceID, RMMsgContext terminateRMMsg) throws SandeshaException {
+
+ if (log.isDebugEnabled())
+ log.debug("Enter: TerminateSeqMsgProcessor::setUpHighestMsgNumbers, "+sequenceID);
SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
@@ -212,12 +221,16 @@
} catch (AxisFault e) {
throw new SandeshaException (e);
}
-
+ if (log.isDebugEnabled())
+ log.debug("Exit: TerminateSeqMsgProcessor::setUpHighestMsgNumbers");
}
private void addTerminateSequenceResponse (RMMsgContext terminateSeqRMMsg, String sequenceID, StorageManager storageManager) throws SandeshaException {
- MessageContext terminateSeqMsg = terminateSeqRMMsg.getMessageContext();
+ if (log.isDebugEnabled())
+ log.debug("Enter: TerminateSeqMsgProcessor::addTerminateSequenceResponse, " + sequenceID);
+
+ MessageContext terminateSeqMsg = terminateSeqRMMsg.getMessageContext();
ConfigurationContext configCtx = terminateSeqMsg.getConfigurationContext();
MessageContext outMessage = null;
@@ -258,10 +271,16 @@
} else {
terminateSeqMsg.getOperationContext().setProperty(org.apache.axis2.Constants.RESPONSE_WRITTEN, "false");
}
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: TerminateSeqMsgProcessor::addTerminateSequenceResponse");
}
public void processOutMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: TerminateSeqMsgProcessor::processOutMessage");
+
MessageContext msgContext = rmMsgCtx.getMessageContext();
ConfigurationContext configurationContext = msgContext.getConfigurationContext();
Options options = msgContext.getOptions();
@@ -388,6 +407,9 @@
} catch (AxisFault e) {
throw new SandeshaException (e.getMessage());
}
+
+ if (log.isDebugEnabled())
+ log.debug("Exit: TerminateSeqMsgProcessor::processOutMessage");
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java?rev=413616&r1=413615&r2=413616&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java Mon Jun 12 02:52:56 2006
@@ -52,7 +52,6 @@
resourceDir = new File(testRource).getPath();
String propFileStr = resourceDir + File.separator + PROPERTY_FILE_NAME;
-
properties = new Properties ();
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org