Author: chamikara
Date: Mon Sep 25 22:57:52 2006
New Revision: 449920
URL: http://svn.apache.org/viewvc?view=rev&rev=449920
Log:
Some bug fixes found when implementing polling.
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/polling/PollingManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker.java
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?view=diff&rev=449920&r1=449919&r2=449920
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
Mon Sep 25 22:57:52 2006
@@ -136,8 +136,8 @@
try {
engine.sendFault(faultMessageContext.getMessageContext());
} catch (AxisFault e) {
- throw new
SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendFault,
e
- .toString()));
+ throw new
SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendFault,
+ e.toString()));
}
msgCtx.pause();
@@ -785,15 +785,9 @@
processResponseMessage(rmMsgCtx, internalSequenceId,
messageNumber, storageKey, storageManager);
- if (!isWSAAnonymous (to)) {
- //If message has a real to address or if it is in the
polling-mode it shoud be send by the sender or should
- //be taken away by make connections, so pausing it.
-
- msgContext.pause(); // the execution will be stopped.
- }
-
- //If to address is wsa:anonymous it wont be possible to send
the this message so, letting it go in the current thread.
- //(it might get the the other end in the back-channel of the
request message, no retransmissions possible).
+ //Users wont be able to get reliable response msgs in the back
channel in the back channel of a
+ //reliable message. If he doesn't have a endpoint he should use
polling mechanisms.
+ msgContext.pause();
if (log.isDebugEnabled())
log.debug("Exit:
ApplicationMsgProcessor::processOutMessage");
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java?view=diff&rev=449920&r1=449919&r2=449920
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
Mon Sep 25 22:57:52 2006
@@ -96,6 +96,11 @@
setTransportProperties (returnMessage, rmMsgCtx);
+ //setting that the response gets written written.
+ //This will be used by transports. For e.g.
CommonsHTTPTransportSender will send 200 OK, instead of 202.
+
rmMsgCtx.getMessageContext().getOperationContext().setProperty(Constants.RESPONSE_WRITTEN
, Constants.VALUE_TRUE);
+
+
//running the MakeConnection through a SenderWorker.
//This will allow Sandesha2 to consider both of following
senarios equally.
// 1. A message being sent by the Sender thread.
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/polling/PollingManager.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/polling/PollingManager.java?view=diff&rev=449920&r1=449919&r2=449920
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/polling/PollingManager.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/polling/PollingManager.java
Mon Sep 25 22:57:52 2006
@@ -62,6 +62,12 @@
try {
+ try {
+ Thread.sleep(POLLING_MANAGER_WAIT_TIME);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
CreateSeqBeanMgr createSeqBeanMgr =
storageManager.getCreateSeqBeanMgr();
//geting the sequences to be polled.
//if shedule contains any requests, do the
earliest one.
@@ -115,6 +121,7 @@
RMMsgContext makeConnectionRMMessage =
RMMsgCreator.createMakeConnectionMessage(referenceRMMessage,
internalSequenceId,
incomingSequenceId, WSRMAnonReplyToURI,storageManager);
+
makeConnectionRMMessage.setProperty(MessageContext.TRANSPORT_IN,null);
//storing the MakeConnection message.
String makeConnectionMsgStoreKey =
SandeshaUtil.getUUID();
storageManager.storeMessageContext(makeConnectionMsgStoreKey,makeConnectionRMMessage.getMessageContext());
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java?view=diff&rev=449920&r1=449919&r2=449920
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java
Mon Sep 25 22:57:52 2006
@@ -111,7 +111,6 @@
key = SandeshaUtil.getUUID();
storageMap.put(key,msgContext);
-
}
public void updateMessageContext(String key,MessageContext msgContext)
throws SandeshaStorageException {
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker.java?view=diff&rev=449920&r1=449919&r2=449920
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker.java
Mon Sep 25 22:57:52 2006
@@ -249,7 +249,10 @@
// create the responseMessageContext
MessageContext responseMessageContext = new
MessageContext();
- responseMessageContext.setServerSide(false);
+
+ //setting the message as serverSide will let it go
through the MessageReceiver (may be callback MR).
+ responseMessageContext.setServerSide(true);
+
responseMessageContext.setConfigurationContext(msgCtx.getConfigurationContext());
responseMessageContext.setTransportIn(msgCtx.getTransportIn());
responseMessageContext.setTransportOut(msgCtx.getTransportOut());
@@ -282,9 +285,9 @@
SOAPEnvelope resenvelope = null;
try {
resenvelope =
TransportUtils.createSOAPMessage(msgCtx,
msgCtx.getEnvelope().getNamespace().getName());
-
} catch (AxisFault e) {
// TODO Auto-generated catch block
+ e.printStackTrace();
log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.soapEnvNotSet));
log.debug(e.getStackTrace().toString());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]