ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r293579 - in /webservices/sandesha/trunk/src/org/apache/sandesha2: ./ handlers/ msgprocessors/ msgreceivers/ util/ wsrm/
Date Tue, 04 Oct 2005 09:53:48 GMT
Author: chamikara
Date: Tue Oct  4 02:51:38 2005
New Revision: 293579

URL: http://svn.apache.org/viewcvs?rev=293579&view=rev
Log:
More additions to Invoker.
Refactored code
Removed some unnecessary prints

Modified:
    webservices/sandesha/trunk/src/org/apache/sandesha2/InOrderInvoker.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/Sender.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerInHandler.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerOutHandler.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/CreateSeqResponseMsgProcessor.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/InOrderInvoker.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/InOrderInvoker.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/InOrderInvoker.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/InOrderInvoker.java Tue Oct  4 02:51:38
2005
@@ -63,7 +63,6 @@
 	}
 
 	public void start (ConfigurationContext context) {
-		System.out.println ("Starting the invoker......");
 		invokerStarted = true;
 		this.context = context;
 		super.start();
@@ -73,8 +72,6 @@
 
 		while (isInvokerStarted()) {
 
-			//System.out.print("~~");
-			
 			try {
 				Thread.sleep(1000);
 			} catch (InterruptedException ex) {
@@ -105,8 +102,6 @@
 				
 				while (seqPropIt.hasNext()){
 					
-					//FIXME - Invoke multiple messages of the same sequence within one iteration.
-					
 					String sequenceId = (String) seqPropIt.next();
 					
 					NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
@@ -118,31 +113,35 @@
 						throw new SandeshaException ("Invalid messaage number for the nextMsgNo");
 					
 					Iterator stMapIt = storageMapMgr.find(new StorageMapBean (null,nextMsgno,sequenceId)).iterator();
-					while (stMapIt.hasNext()){
+					
+					while (stMapIt.hasNext()) {
+						
 						StorageMapBean stMapBean = (StorageMapBean) stMapIt.next();
 						String key = stMapBean.getKey();
-						
+					
 						MessageContext msgToInvoke = SandeshaUtil.getStoredMessageContext(key);
-						
+					
 						//removing the storage map entry.
 						storageMapMgr.delete(key);
-						
+					
 						RMMsgContext rmMsg = MsgInitializer.initializeMessage(msgToInvoke);
 						Sequence seq = (Sequence) rmMsg.getMessagePart(Constants.MessageParts.SEQUENCE);
 						long msgNo = seq.getMessageNumber().getMessageNumber();
-						
+					
+						System.out.println("Invoking message number " + msgNo + " of the sequence " + sequenceId);
 						try {
 							//Invoking the message.
 							new AxisEngine (msgToInvoke.getSystemContext()).receive(msgToInvoke);
 						} catch (AxisFault e) {
 							throw new SandeshaException (e.getMessage());
 						}
-									
+								
 						//undating the next mst to invoke
 						nextMsgno++;
-						nextMsgMgr.update(new NextMsgBean (sequenceId,nextMsgno));
+						stMapIt = storageMapMgr.find(new StorageMapBean (null,nextMsgno,sequenceId)).iterator();
 					}
-					
+				    
+					nextMsgMgr.update(new NextMsgBean (sequenceId,nextMsgno));
 				}
 			} catch (SandeshaException e1) {
 				// TODO Auto-generated catch block

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java Tue Oct  4 02:51:38
2005
@@ -282,8 +282,7 @@
 		SequencePropertyBean seqBean = seqPropMgr.retrieve(sequenceId,
 				Constants.SequenceProperties.RECEIVED_MESSAGES);
 		String msgNoList = (String) seqBean.getValue();
-		System.out.println("Message No List:" + msgNoList);
-
+		
 		AcknowledgementRange[] ackRangeArr = SandeshaUtil
 				.getAckRangeArray(msgNoList);
 

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/Sender.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/Sender.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/Sender.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/Sender.java Tue Oct  4 02:51:38 2005
@@ -78,7 +78,7 @@
 				 	
 				 	Object obj = copiedMsgCtx.getProperty(
                             MessageContext.CHARACTER_SET_ENCODING);
-				 	System.out.println("CHAR SET ENCODING:" + obj);
+
 					new AxisEngine(context).send(msgCtx);
 				} catch (AxisFault e1) {
 					e1.printStackTrace();
@@ -102,14 +102,13 @@
 				Thread.sleep(2000);
 			} catch (InterruptedException e1) {
 				//e1.printStackTrace();
-				System.out.println ("SENDER: Interupted Exception");
+				System.out.println ("Sender was interupted...");
 			}
 		}
 		
 	}
 	
 	public void start (ConfigurationContext context) {
-		System.out.println ("Starting the sender......");
 		senderStarted = true;
 		this.context = context;
 		super.start();

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerInHandler.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerInHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerInHandler.java Tue
Oct  4 02:51:38 2005
@@ -46,8 +46,6 @@
 	}
 
 	public void invoke(MessageContext msgCtx) throws AxisFault {
-		System.out.println("In server InHandler");
-
 		RMMsgContext rmMsgCtx = null;
 		try {
 			rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerOutHandler.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerOutHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/ServerOutHandler.java Tue
Oct  4 02:51:38 2005
@@ -67,8 +67,6 @@
 public class ServerOutHandler extends AbstractHandler {
 
 	public void invoke(MessageContext msgCtx) throws AxisFault {
-		//log
-		System.out.println("In server OutHandler");
 		String DONE = (String) msgCtx
 				.getProperty(Constants.APPLICATION_PROCESSING_DONE);
 		if (null != DONE && "true".equals(DONE))

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
Tue Oct  4 02:51:38 2005
@@ -49,8 +49,7 @@
 public class AcknowledgementProcessor implements MsgProcessor {
 
 	public void processMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
-		System.out.println("WITHIN ACKNOWLEDGEMENT PROCESSOR");
-
+		
 		SequenceAcknowledgement sequenceAck = (SequenceAcknowledgement) rmMsgCtx
 				.getMessagePart(Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
 		if (sequenceAck == null)

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=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
Tue Oct  4 02:51:38 2005
@@ -64,8 +64,6 @@
 
 	public void processMessage(RMMsgContext rmMsgCtx) throws SandeshaException {
 
-		System.out.println("Application msg processor called");
-
 		MessageContext msgCtx = rmMsgCtx.getMessageContext();
 		if (msgCtx == null)
 			throw new SandeshaException("Message context is null");
@@ -124,10 +122,6 @@
 
 		EndpointReference acksTo = (EndpointReference) acksToBean.getValue();
 		String acksToStr = acksTo.getAddress();
-
-		//TODO: remove folowing 2.
-		System.out.println("Messages received:" + messagesStr);
-		System.out.println("Acks To:" + acksToStr);
 
 		if (acksToStr == null || messagesStr == null)
 			throw new SandeshaException(

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
Tue Oct  4 02:51:38 2005
@@ -50,8 +50,6 @@
 	public void processMessage(RMMsgContext createSeqResponseRMMsgCtx)
 			throws SandeshaException {
 
-		System.out.println("IN CREATE SEQ RESPONSE PROCESSOR");
-
 		CreateSequenceResponse createSeqResponsePart = (CreateSequenceResponse) createSeqResponseRMMsgCtx
 				.getMessagePart(Constants.MessageParts.CREATE_SEQ_RESPONSE);
 		if (createSeqResponsePart == null)

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
Tue Oct  4 02:51:38 2005
@@ -29,7 +29,6 @@
 	public void processMessage(RMMsgContext rmMsgCtx)
 			throws SandeshaException {
 		//TODO Add terminate sequence message logic.
-		System.out.println("Terminate Sequence Processor called");
-		//rmMsgCtx.getMessageContext().setProperty("Status",new Integer (202));
+
 	}
 }

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java
Tue Oct  4 02:51:38 2005
@@ -69,8 +69,6 @@
 	public void setCreateSequence(MessageContext inMessage,
 			MessageContext outMessage) throws AxisFault {
 
-		System.out.println("set create seq was called in RM Msg receiver");
-
 		RMMsgContext createSeqMsg = null;
 		try {
 			createSeqMsg = MsgInitializer.initializeMessage(inMessage);
@@ -120,8 +118,6 @@
 	}
 
 	public final void receive(MessageContext messgeCtx) throws AxisFault {
-
-		System.out.println("within RM Msg receiver");
 
 		//intitializing the message.
 		RMMsgContext rmMsgCtx = null;

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=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java Tue Oct  4
02:51:38 2005
@@ -278,13 +278,14 @@
 	public static void startSenderIfStopped(ConfigurationContext context) {
 		if (!sender.isSenderStarted()) {
 			sender.start(context);
+			System.out.println ("Sender started....");
 		}
 	}
 	
 	public static void startInvokerIfStopped(ConfigurationContext context) {
 		if (!invoker.isInvokerStarted()) {
-			System.out.println ("Starting invoker. SandeshaUtil.....");
 			invoker.start(context);
+			System.out.println ("Invoker started....");
 		}
 	}
 

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java?rev=293579&r1=293578&r2=293579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java Tue Oct  4 02:51:38
2005
@@ -69,20 +69,6 @@
 
 	public Object fromOMElement(OMElement element) throws OMException {
 		
-		try {
-		System.out.println("PRINTING IDENTIFIER");
-
-		XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
-		element.serialize(writer);
-	} catch (XMLStreamException e2) {
-		// TODO Auto-generated catch block
-		e2.printStackTrace();
-	} catch (FactoryConfigurationError e2) {
-		// TODO Auto-generated catch block
-		e2.printStackTrace();
-	}
-		
-		
 		OMElement identifierPart = element.getFirstChildWithName(new QName(
 				Constants.WSRM.NS_URI_RM, Constants.WSRM.IDENTIFIER));
 		if (identifierPart == null)



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message