ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r372540 - in /webservices/sandesha/trunk/src/org/apache/sandesha2: client/Sandesha2ClientAPI.java msgprocessors/ApplicationMsgProcessor.java
Date Thu, 26 Jan 2006 15:09:54 GMT
Author: chamikara
Date: Thu Jan 26 07:09:36 2006
New Revision: 372540

URL: http://svn.apache.org/viewcvs?rev=372540&view=rev
Log:
Bug fixes

Modified:
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java?rev=372540&r1=372539&r2=372540&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java Thu
Jan 26 07:09:36 2006
@@ -20,6 +20,8 @@
 import java.util.Iterator;
 
 import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.sandesha2.AcknowledgementManager;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.SandeshaException;
@@ -39,6 +41,8 @@
 
 public class Sandesha2ClientAPI {
 
+	private static Log log = LogFactory.getLog(Sandesha2ClientAPI.class);
+	
 	public static String AcksTo = "Sandesha2ClientAPIPropertyAcksTo";
 	public static String LAST_MESSAGE = "Sandesha2ClientAPIPropertyWSRMLastMessage";
 	public static String OFFERED_SEQUENCE_ID = "Sandesha2ClientAPIPropertyOfferedSequenceId";
@@ -58,6 +62,12 @@
 		findBean.setName(Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID);
 		findBean.setValue(internalSequenceID);
 		SequencePropertyBean internalSequenceBean = seqpPropMgr.findUnique(findBean);
+		
+		if (internalSequenceBean==null) {
+			log.debug("internal sequence bean is null.");
+			throw new SandeshaException ("Data not available to give the sequence report");
+		}
+		
 		String sequenceID = internalSequenceBean.getSequenceID();
 		
 		//finding the actual seq

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=372540&r1=372539&r2=372540&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
Thu Jan 26 07:09:36 2006
@@ -29,6 +29,7 @@
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisOperationFactory;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.AxisEngine;
 import org.apache.axis2.soap.SOAPEnvelope;
@@ -418,7 +419,16 @@
 //			long ackInterval = PropertyManager.getInstance()
 //					.getAcknowledgementInterval();
 			
-			SandeshaPropertyBean propertyBean = (SandeshaPropertyBean) msgCtx.getParameter(Sandesha2Constants.SANDESHA2_POLICY_BEAN).getValue();
+			Parameter param = msgCtx.getParameter(Sandesha2Constants.SANDESHA2_POLICY_BEAN);
+			
+			SandeshaPropertyBean propertyBean = null;
+			if (param!=null) {
+				propertyBean = (SandeshaPropertyBean)  param.getValue();
+			}else {
+				propertyBean = PropertyManager.getInstance().getPropertyBean();
+			}
+			
+			
 			long ackInterval = propertyBean.getAcknowledgementInaterval();
 			
 			//			if (policyBean != 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