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/11/12 12:05:22 UTC

svn commit: r473920 - in /webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2: ./ i18n/ msgprocessors/ storage/ storage/beans/ util/

Author: chamikara
Date: Sun Nov 12 03:05:21 2006
New Revision: 473920

URL: http://svn.apache.org/viewvc?view=rev&rev=473920
Log:
Some fixes to the EPR handling logic. Sandesha was not sending the reference paramas correctly in response 
messages. 

Modified:
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/SandeshaException.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/resource.properties
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/SandeshaStorageException.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/CreateSeqBean.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/InvokerBean.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/NextMsgBean.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SenderBean.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SequencePropertyBean.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/RMMsgCreator.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SandeshaUtil.java
    webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SequenceManager.java

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/SandeshaException.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/SandeshaException.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/SandeshaException.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/SandeshaException.java Sun Nov 12 03:05:21 2006
@@ -1,45 +1,44 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.sandesha2;
-
-import javax.xml.namespace.QName;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axis2.AxisFault;
-
-/**
- * Exception class of Sandesa2.
- */
-
-public class SandeshaException extends AxisFault  {
-
-	public SandeshaException (String message) {
-		super (message);
-	}
-	
-	public SandeshaException (Exception e) {
-		super (e);
-	}
-
-	public SandeshaException (String message,Exception e) {
-		super (message,e);
-	}
-	
-	
-	
-}
+/*
+ * Copyright  1999-2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.sandesha2;
+
+import org.apache.axis2.AxisFault;
+
+/**
+ * Exception class of Sandesa2.
+ */
+
+public class SandeshaException extends AxisFault  {
+
+	private static final long serialVersionUID = 730653663339985226L;
+
+	public SandeshaException (String message) {
+		super (message);
+	}
+	
+	public SandeshaException (Exception e) {
+		super (e);
+	}
+
+	public SandeshaException (String message,Exception e) {
+		super (message,e);
+	}
+	
+	
+	
+}

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java Sun Nov 12 03:05:21 2006
@@ -239,7 +239,9 @@
 	
 	public static final String cannotFindTransportInDesc = "cannotFindTransportInDesc";
 	public static final String toEPRNotSet = "toEPRNotSet";
-    
+	public static final String toBeanNotSet = "toBeanNotSet";
+	public static final String replyToBeanNotSet = "replyToBeanNotSet";
+	    
     public final static String errorRetrievingSecurityToken = "errorRetrievingSecurityToken";
 	public final static String proofOfPossessionNotVerified = "proofOfPossessionNotVerified";
     public final static String noSecurityResults = "noSecurityResults";

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/resource.properties?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/resource.properties (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/i18n/resource.properties Sun Nov 12 03:05:21 2006
@@ -261,6 +261,8 @@
 invalidMsgNumberList=Invalid msg number list
 cannotFindReqMsgFromOpContext=Cannot find the request message from the operation context
 toEPRNotSet=To EPR has not been set in the given message
+toBeanNotSet=The 'To' Sequence Property Bean has not been set for the sequence.
+replyToBeanNotSet=The 'ReplyTo' Sequence Property Bean has not been set for the sequence.
 cannotFindTransportInDesc=Cannot find the transport in description {0} in the ConfigurationContext
 invalidOfferNoResponseEndpoint=Cannot derive a valid offer from the given infomation. No Endpoint for receiving messages.
 invalidElementFoundWithinElement=Found invalid ''{0}'' element within ''{1}'' element

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Sun Nov 12 03:05:21 2006
@@ -964,51 +964,11 @@
 		SequencePropertyBeanMgr sequencePropertyMgr = storageManager.getSequencePropertyBeanMgr();
 		SenderBeanMgr retransmitterMgr = storageManager.getRetransmitterBeanMgr();
 
-		SequencePropertyBean toBean = sequencePropertyMgr.retrieve(internalSequenceId,
-				Sandesha2Constants.SequenceProperties.TO_EPR);
-		SequencePropertyBean replyToBean = sequencePropertyMgr.retrieve(internalSequenceId,
-				Sandesha2Constants.SequenceProperties.REPLY_TO_EPR);
 
 		// again - looks weird in the client side - but consistent
 		SequencePropertyBean outSequenceBean = sequencePropertyMgr.retrieve(internalSequenceId,
 				Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
 
-		if (toBean == null) {
-			String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.toEPRNotValid, null);
-			log.debug(message);
-			throw new SandeshaException(message);
-		}
-
-		EndpointReference toEPR = new EndpointReference(toBean.getValue());
-
-		EndpointReference replyToEPR = null;
-		if (replyToBean != null) {
-			replyToEPR = new EndpointReference(replyToBean.getValue());
-		}
-
-		if (toEPR == null || toEPR.getAddress() == null || "".equals(toEPR.getAddress())) {
-			String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.toEPRNotValid, null);
-			log.debug(message);
-			throw new SandeshaException(message);
-		}
-
-		String newToStr = null;
-		if (msg.isServerSide()) {
-
-			MessageContext requestMsg = msg.getOperationContext().getMessageContext(
-					OperationContextFactory.MESSAGE_LABEL_IN_VALUE);
-			if (requestMsg != null) {
-				newToStr = requestMsg.getReplyTo().getAddress();
-			}
-		}
-
-		if (newToStr != null)
-			rmMsg.setTo(new EndpointReference(newToStr));
-		else
-			rmMsg.setTo(toEPR);
-
-		if (replyToEPR != null)
-			rmMsg.setReplyTo(replyToEPR);
 
 		String rmVersion = SandeshaUtil.getRMVersion(internalSequenceId, storageManager);
 		if (rmVersion == null)
@@ -1234,7 +1194,8 @@
 					if (log.isDebugEnabled())
 						log.debug("Using replyTo " + replyToEPR + " EPR as AcksTo, addr=" + acksToEPR.getAddress());
 					
-					acksToEPR = replyToEPR;
+					
+					acksToEPR = SandeshaUtil.cloneEPR(replyToEPR);
 				}
 				else{
 					acksToEPR.setAddress(addressingAnonymousURI);

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/SandeshaStorageException.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/SandeshaStorageException.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/SandeshaStorageException.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/SandeshaStorageException.java Sun Nov 12 03:05:21 2006
@@ -1,39 +1,42 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.sandesha2.storage;
-
-import org.apache.sandesha2.SandeshaException;
-
-/**
- * To easily track exceptions happening in the storage area.
- */
-
-public class SandeshaStorageException extends SandeshaException {
-	public SandeshaStorageException (String message) {
-		super (message);
-	}
-	
-	public SandeshaStorageException (Exception e) {
-		super (e);
-	}
-	
-	public SandeshaStorageException (String m,Exception e) {
-		super (m,e);
-	}
-	
-}
+/*
+ * Copyright  1999-2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.sandesha2.storage;
+
+import org.apache.sandesha2.SandeshaException;
+
+/**
+ * To easily track exceptions happening in the storage area.
+ */
+
+public class SandeshaStorageException extends SandeshaException {
+	
+	private static final long serialVersionUID = -8620608387173070005L;
+
+	public SandeshaStorageException (String message) {
+		super (message);
+	}
+	
+	public SandeshaStorageException (Exception e) {
+		super (e);
+	}
+	
+	public SandeshaStorageException (String m,Exception e) {
+		super (m,e);
+	}
+	
+}

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/CreateSeqBean.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/CreateSeqBean.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/CreateSeqBean.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/CreateSeqBean.java Sun Nov 12 03:05:21 2006
@@ -1,125 +1,127 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- *  
- */
-
-package org.apache.sandesha2.storage.beans;
-
-/**
- * This bean is used at the sending side (of both server and client)
- * There is on object of this for each sequence.
- */
-
-public class CreateSeqBean extends RMBean {
-	
-	/**
-	 * Comment for <code>internalSequenceID</code>
-	 * This property is a unique identifier that can be used to identify the messages of a certain sequence.
-	 * This is specially used by the sending side, since sequence id is not available in the begining.
-	 * For the client side, indernal sequence id is a concantination of wsa:To and SEQUENCE_KEY (SEQUENCE_KEY can be set as a property).
-	 * For the server side, this is the sequenceId of the incoming sequence.
-	 */
-	private String internalSequenceID;
-
-	/**
-	 * Comment for <code>createSeqMsgID</code>
-	 * This is the message ID of the create sequence message.
-	 */
-	private String createSeqMsgID;
-
-	/**
-	 * Comment for <code>sequenceID</code>
-	 * This is the actual Sequence ID of the sequence.
-	 */
-	private String sequenceID;
-	
-	/**
-	 * Comment for <code>securityTokenData</code>
-	 * This is the security token data needed to reconstruct the token that secures this sequence.
-	 */
-	private String securityTokenData;
-	
-
-//	private boolean pollingMode;
-
-	
-	/**
-	 * The key that is used to store the CreateSequence message in the Message Storage.
-	 * This is stored here, so that the CreateSequence message can be used as a reference when Sandesha
-	 * want the generate new messages. (e.g. MakeConnection)
-	 */
-	private String createSequenceMsgStoreKey;
-	
-	/**
-	 * This is stored here, so that the message pointed by this can be used as a reference when Sandesha
-	 * want the generate new messages. (e.g. MakeConnection). Create sequence message could not be used 
-	 * here since it may be subjected to things like encryption.
-	 */
-	private String referenceMessageStoreKey;
-	
-	public CreateSeqBean() {
-	}
-
-
-	public String getCreateSeqMsgID() {
-		return createSeqMsgID;
-	}
-
-	public void setCreateSeqMsgID(String createSeqMsgID) {
-		this.createSeqMsgID = createSeqMsgID;
-	}
-
-	public String getSequenceID() {
-		return sequenceID;
-	}
-
-	public void setSequenceID(String sequenceID) {
-		this.sequenceID = sequenceID;
-	}
-
-	public String getInternalSequenceID() {
-		return internalSequenceID;
-	}
-
-	public void setInternalSequenceID(String internalSequenceID) {
-		this.internalSequenceID = internalSequenceID;
-	}
-
-	public String getSecurityTokenData() {
-		return securityTokenData;
-	}
-
-	public void setSecurityTokenData(String securityTokenData) {
-		this.securityTokenData = securityTokenData;
-	}
-
-	public String getCreateSequenceMsgStoreKey() {
-		return createSequenceMsgStoreKey;
-	}
-
-	public void setCreateSequenceMsgStoreKey(String createSequenceMsgStoreKey) {
-		this.createSequenceMsgStoreKey = createSequenceMsgStoreKey;
-	}
-
-
-	public String getReferenceMessageStoreKey() {
-		return referenceMessageStoreKey;
-	}
-
-	public void setReferenceMessageStoreKey(String referenceMessageStoreKey) {
-		this.referenceMessageStoreKey = referenceMessageStoreKey;
-	}
-	
-}
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ *  
+ */
+
+package org.apache.sandesha2.storage.beans;
+
+/**
+ * This bean is used at the sending side (of both server and client)
+ * There is on object of this for each sequence.
+ */
+
+public class CreateSeqBean extends RMBean {
+	
+	private static final long serialVersionUID = 7051201094510208784L;
+
+	/**
+	 * Comment for <code>internalSequenceID</code>
+	 * This property is a unique identifier that can be used to identify the messages of a certain sequence.
+	 * This is specially used by the sending side, since sequence id is not available in the begining.
+	 * For the client side, indernal sequence id is a concantination of wsa:To and SEQUENCE_KEY (SEQUENCE_KEY can be set as a property).
+	 * For the server side, this is the sequenceId of the incoming sequence.
+	 */
+	private String internalSequenceID;
+
+	/**
+	 * Comment for <code>createSeqMsgID</code>
+	 * This is the message ID of the create sequence message.
+	 */
+	private String createSeqMsgID;
+
+	/**
+	 * Comment for <code>sequenceID</code>
+	 * This is the actual Sequence ID of the sequence.
+	 */
+	private String sequenceID;
+	
+	/**
+	 * Comment for <code>securityTokenData</code>
+	 * This is the security token data needed to reconstruct the token that secures this sequence.
+	 */
+	private String securityTokenData;
+	
+
+//	private boolean pollingMode;
+
+	
+	/**
+	 * The key that is used to store the CreateSequence message in the Message Storage.
+	 * This is stored here, so that the CreateSequence message can be used as a reference when Sandesha
+	 * want the generate new messages. (e.g. MakeConnection)
+	 */
+	private String createSequenceMsgStoreKey;
+	
+	/**
+	 * This is stored here, so that the message pointed by this can be used as a reference when Sandesha
+	 * want the generate new messages. (e.g. MakeConnection). Create sequence message could not be used 
+	 * here since it may be subjected to things like encryption.
+	 */
+	private String referenceMessageStoreKey;
+	
+	public CreateSeqBean() {
+	}
+
+
+	public String getCreateSeqMsgID() {
+		return createSeqMsgID;
+	}
+
+	public void setCreateSeqMsgID(String createSeqMsgID) {
+		this.createSeqMsgID = createSeqMsgID;
+	}
+
+	public String getSequenceID() {
+		return sequenceID;
+	}
+
+	public void setSequenceID(String sequenceID) {
+		this.sequenceID = sequenceID;
+	}
+
+	public String getInternalSequenceID() {
+		return internalSequenceID;
+	}
+
+	public void setInternalSequenceID(String internalSequenceID) {
+		this.internalSequenceID = internalSequenceID;
+	}
+
+	public String getSecurityTokenData() {
+		return securityTokenData;
+	}
+
+	public void setSecurityTokenData(String securityTokenData) {
+		this.securityTokenData = securityTokenData;
+	}
+
+	public String getCreateSequenceMsgStoreKey() {
+		return createSequenceMsgStoreKey;
+	}
+
+	public void setCreateSequenceMsgStoreKey(String createSequenceMsgStoreKey) {
+		this.createSequenceMsgStoreKey = createSequenceMsgStoreKey;
+	}
+
+
+	public String getReferenceMessageStoreKey() {
+		return referenceMessageStoreKey;
+	}
+
+	public void setReferenceMessageStoreKey(String referenceMessageStoreKey) {
+		this.referenceMessageStoreKey = referenceMessageStoreKey;
+	}
+	
+}

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/InvokerBean.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/InvokerBean.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/InvokerBean.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/InvokerBean.java Sun Nov 12 03:05:21 2006
@@ -1,115 +1,117 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.sandesha2.storage.beans;
-
-/**
- * This bean is used at the receiving side (of both server and client)
- * There is one object for each application message to be invoked.
- */
-
-public class InvokerBean extends RMBean {
-
-	/**
-	 * Comment for <code>messageContextRefKey</code>
-	 * 
-	 * This is the messageContextRefKey that is obtained after saving a message context in a storage.
-	 */
-	private String messageContextRefKey;
-
-	/**
-	 * Comment for <code>msgNo</code>
-	 * The message number of the message.
-	 */
-	private long msgNo;
-
-	/**
-	 * Comment for <code>sequenceID</code>
-	 * The sequence ID of the sequence the message belong to.
-	 */
-	private String sequenceID;
-	
-	/**
-	 * Comment for <code>invoked</code>
-	 * Weather the message has been invoked by the invoker.
-	 */
-	private boolean invoked = false;
-	
-
-	public InvokerBean() {
-
-	}
-
-	public InvokerBean(String key, long msgNo, String sequenceId) {
-		this.messageContextRefKey = key;
-		this.msgNo = msgNo;
-		this.sequenceID = sequenceId;
-	}
-
-	/**
-	 * @return Returns the messageContextRefKey.
-	 */
-	public String getMessageContextRefKey() {
-		return messageContextRefKey;
-	}
-
-	/**
-	 * @param messageContextRefKey
-	 *            The messageContextRefKey to set.
-	 */
-	public void setMessageContextRefKey(String messageContextRefKey) {
-		this.messageContextRefKey = messageContextRefKey;
-	}
-
-	/**
-	 * @return Returns the msgNo.
-	 */
-	public long getMsgNo() {
-		return msgNo;
-	}
-
-	/**
-	 * @param msgNo
-	 *            The msgNo to set.
-	 */
-	public void setMsgNo(long msgNo) {
-		this.msgNo = msgNo;
-	}
-
-	/**
-	 * @return Returns the sequenceID.
-	 */
-	public String getSequenceID() {
-		return sequenceID;
-	}
-
-	/**
-	 * @param sequenceID
-	 *            The sequenceID to set.
-	 */
-	public void setSequenceID(String sequenceId) {
-		this.sequenceID = sequenceId;
-	}
-	
-	public boolean isInvoked() {
-		return invoked;
-	}
-	
-	public void setInvoked(boolean invoked) {
-		this.invoked = invoked;
-	}
+/*
+ * Copyright  1999-2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.sandesha2.storage.beans;
+
+/**
+ * This bean is used at the receiving side (of both server and client)
+ * There is one object for each application message to be invoked.
+ */
+
+public class InvokerBean extends RMBean {
+
+	private static final long serialVersionUID = -7839397509697276257L;
+
+	/**
+	 * Comment for <code>messageContextRefKey</code>
+	 * 
+	 * This is the messageContextRefKey that is obtained after saving a message context in a storage.
+	 */
+	private String messageContextRefKey;
+
+	/**
+	 * Comment for <code>msgNo</code>
+	 * The message number of the message.
+	 */
+	private long msgNo;
+
+	/**
+	 * Comment for <code>sequenceID</code>
+	 * The sequence ID of the sequence the message belong to.
+	 */
+	private String sequenceID;
+	
+	/**
+	 * Comment for <code>invoked</code>
+	 * Weather the message has been invoked by the invoker.
+	 */
+	private boolean invoked = false;
+	
+
+	public InvokerBean() {
+
+	}
+
+	public InvokerBean(String key, long msgNo, String sequenceId) {
+		this.messageContextRefKey = key;
+		this.msgNo = msgNo;
+		this.sequenceID = sequenceId;
+	}
+
+	/**
+	 * @return Returns the messageContextRefKey.
+	 */
+	public String getMessageContextRefKey() {
+		return messageContextRefKey;
+	}
+
+	/**
+	 * @param messageContextRefKey
+	 *            The messageContextRefKey to set.
+	 */
+	public void setMessageContextRefKey(String messageContextRefKey) {
+		this.messageContextRefKey = messageContextRefKey;
+	}
+
+	/**
+	 * @return Returns the msgNo.
+	 */
+	public long getMsgNo() {
+		return msgNo;
+	}
+
+	/**
+	 * @param msgNo
+	 *            The msgNo to set.
+	 */
+	public void setMsgNo(long msgNo) {
+		this.msgNo = msgNo;
+	}
+
+	/**
+	 * @return Returns the sequenceID.
+	 */
+	public String getSequenceID() {
+		return sequenceID;
+	}
+
+	/**
+	 * @param sequenceID
+	 *            The sequenceID to set.
+	 */
+	public void setSequenceID(String sequenceId) {
+		this.sequenceID = sequenceId;
+	}
+	
+	public boolean isInvoked() {
+		return invoked;
+	}
+	
+	public void setInvoked(boolean invoked) {
+		this.invoked = invoked;
+	}
 }

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/NextMsgBean.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/NextMsgBean.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/NextMsgBean.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/NextMsgBean.java Sun Nov 12 03:05:21 2006
@@ -1,107 +1,109 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.sandesha2.storage.beans;
-
-/**
- * This bean is used at the receiving side (of both server and client)
- * There is one entry for each sequence.
- */
-
-public class NextMsgBean extends RMBean {
-	
-	/**
-	 * Comment for <code>sequenceID</code>
-	 * The sequenceID of the representing sequence.
-	 */
-	private String sequenceID;
-
-	/**
-	 * Comment for <code>nextMsgNoToProcess</code>
-	 * The next message to be invoked of the representing sequence.
-	 */
-	private long nextMsgNoToProcess;
-	
-	/**
-	 * This tells weather this sequence is in the polling mode or not.
-	 * PollingManager will use this property decide the sequences that need
-	 * polling and will do MakeConnections on them.
-	 */
-	private boolean pollingMode=false;
-	
-	/**
-	 * This will be used as a referenced 
-	 */
-	private String referenceMessageKey;
-	
-
-	public NextMsgBean() {
-
-	}
-
-	public NextMsgBean(String sequenceID, long nextNsgNo) {
-		this.sequenceID = sequenceID;
-		this.nextMsgNoToProcess = nextNsgNo;
-	}
-
-	/**
-	 * @return Returns the nextMsgNoToProcess.
-	 */
-	public long getNextMsgNoToProcess() {
-		return nextMsgNoToProcess;
-	}
-
-	/**
-	 * @param nextMsgNoToProcess
-	 *            The nextMsgNoToProcess to set.
-	 */
-	public void setNextMsgNoToProcess(long nextMsgNoToProcess) {
-		this.nextMsgNoToProcess = nextMsgNoToProcess;
-	}
-
-	/**
-	 * @return Returns the sequenceId.
-	 */
-	public String getSequenceID() {
-		return sequenceID;
-	}
-
-	/**
-	 * @param sequenceId
-	 *            The sequenceId to set.
-	 */
-	public void setSequenceID(String sequenceID) {
-		this.sequenceID = sequenceID;
-	}
-
-	public boolean isPollingMode() {
-		return pollingMode;
-	}
-
-	public void setPollingMode(boolean pollingMode) {
-		this.pollingMode = pollingMode;
-	}
-
-	public String getReferenceMessageKey() {
-		return referenceMessageKey;
-	}
-
-	public void setReferenceMessageKey(String referenceMessageKey) {
-		this.referenceMessageKey = referenceMessageKey;
-	}
-	
+/*
+ * Copyright  1999-2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.sandesha2.storage.beans;
+
+/**
+ * This bean is used at the receiving side (of both server and client)
+ * There is one entry for each sequence.
+ */
+
+public class NextMsgBean extends RMBean {
+	
+	private static final long serialVersionUID = -2976123838615087562L;
+
+	/**
+	 * Comment for <code>sequenceID</code>
+	 * The sequenceID of the representing sequence.
+	 */
+	private String sequenceID;
+
+	/**
+	 * Comment for <code>nextMsgNoToProcess</code>
+	 * The next message to be invoked of the representing sequence.
+	 */
+	private long nextMsgNoToProcess;
+	
+	/**
+	 * This tells weather this sequence is in the polling mode or not.
+	 * PollingManager will use this property decide the sequences that need
+	 * polling and will do MakeConnections on them.
+	 */
+	private boolean pollingMode=false;
+	
+	/**
+	 * This will be used as a referenced 
+	 */
+	private String referenceMessageKey;
+	
+
+	public NextMsgBean() {
+
+	}
+
+	public NextMsgBean(String sequenceID, long nextNsgNo) {
+		this.sequenceID = sequenceID;
+		this.nextMsgNoToProcess = nextNsgNo;
+	}
+
+	/**
+	 * @return Returns the nextMsgNoToProcess.
+	 */
+	public long getNextMsgNoToProcess() {
+		return nextMsgNoToProcess;
+	}
+
+	/**
+	 * @param nextMsgNoToProcess
+	 *            The nextMsgNoToProcess to set.
+	 */
+	public void setNextMsgNoToProcess(long nextMsgNoToProcess) {
+		this.nextMsgNoToProcess = nextMsgNoToProcess;
+	}
+
+	/**
+	 * @return Returns the sequenceId.
+	 */
+	public String getSequenceID() {
+		return sequenceID;
+	}
+
+	/**
+	 * @param sequenceId
+	 *            The sequenceId to set.
+	 */
+	public void setSequenceID(String sequenceID) {
+		this.sequenceID = sequenceID;
+	}
+
+	public boolean isPollingMode() {
+		return pollingMode;
+	}
+
+	public void setPollingMode(boolean pollingMode) {
+		this.pollingMode = pollingMode;
+	}
+
+	public String getReferenceMessageKey() {
+		return referenceMessageKey;
+	}
+
+	public void setReferenceMessageKey(String referenceMessageKey) {
+		this.referenceMessageKey = referenceMessageKey;
+	}
+	
 }

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SenderBean.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SenderBean.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SenderBean.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SenderBean.java Sun Nov 12 03:05:21 2006
@@ -1,213 +1,215 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- *  
- */
-
-package org.apache.sandesha2.storage.beans;
-
-/**
- * This bean is used at the sending side (of both server and client)
- * There is one eatry for each message to be sent.
- */
-
-public class SenderBean extends RMBean {
-
-	/**
-	 * Comment for <code>messageID</code>
-	 * The message id of the representing message.
-	 * 
-	 */
-	private String messageID;
-
-	/**
-	 * Comment for <code>messageContextRefKey</code>
-	 * Key retrieved by the storage mechanism after storing the message.
-	 */
-	private String messageContextRefKey;
-
-	/**
-	 * Comment for <code>send</code>
-	 * The sender will not send the message unless this property is true.
-	 */
-	private boolean send;
-
-	/**
-	 * Comment for <code>internalSequenceID</code>
-	 * Please see the comment of CreateSeqBean.
-	 */
-	private String internalSequenceID;
-
-	/**
-	 * Comment for <code>sentCount</code>
-	 * The number of times current message has been sent.
-	 */
-	private int sentCount = 0;
-
-	/**
-	 * Comment for <code>messageNumber</code>
-	 * The message number of the current message.
-	 */
-	private long messageNumber = 0;
-
-	/**
-	 * Comment for <code>reSend</code>
-	 * If this property if false. The message has to be sent only once. The entry has to be deleted after sending.
-	 */
-	private boolean reSend = true;
-
-	/**
-	 * Comment for <code>timeToSend</code>
-	 * Message has to be sent only after this time.
-	 */
-	private long timeToSend = 0;
-	
-	/**
-	 * Comment for <code>messageType</code>
-	 * The type of the current message.
-	 * Possible types are given in Sandesha2Constants.MessageTypes interface.
-	 */
-	private int messageType =0;
-	
-	/**
-	 * The sequenceID of the sequence this message belong to.
-	 * this may be null for some messages (e.g. create sequence);
-	 */
-	//TODO fill this property correctly
-	private String sequenceID;
-	
-	/**
-	 * TODO use the value in CreateSequenceBean.
-	 */
-	private String wsrmAnonURI;
-	
-	/**
-	 * Destination URL of the message to be sent. This can be used to decide weather the message cannot be sent,
-	 * before actyally reading the message from the storage.
-	 */
-	private String toAddress;
-	
-	public SenderBean() {
-
-	}
-
-	public SenderBean(String messageID, String key,
-			boolean send,long timeToSend, String internalSequenceID, long messageNumber) {
-		this.messageID = messageID;
-		this.messageContextRefKey = key;
-		//this.LastSentTime = lastSentTime;
-		this.timeToSend = timeToSend;
-		this.send = send;
-		this.internalSequenceID = internalSequenceID;
-		this.messageNumber = messageNumber;
-	}
-
-	public String getMessageContextRefKey() {
-		return messageContextRefKey;
-	}
-
-	public void setMessageContextRefKey(String messageContextRefKey) {
-		this.messageContextRefKey = messageContextRefKey;
-	}
-
-	public String getMessageID() {
-		return messageID;
-	}
-
-	public void setMessageID(String messageID) {
-		this.messageID = messageID;
-	}
-
-	public boolean isSend() {
-		return send;
-	}
-
-	public void setSend(boolean send) {
-		this.send = send;
-	}
-
-	public String getInternalSequenceID() {
-		return internalSequenceID;
-	}
-
-	public void setInternalSequenceID(String internalSequenceId) {
-		this.internalSequenceID = internalSequenceId;
-	}
-
-	public int getSentCount() {
-		return sentCount;
-	}
-
-	public void setSentCount(int sentCount) {
-		this.sentCount = sentCount;
-	}
-
-	public long getMessageNumber() {
-		return messageNumber;
-	}
-
-	public void setMessageNumber(long messageNumber) {
-		this.messageNumber = messageNumber;
-	}
-
-	public boolean isReSend() {
-		return reSend;
-	}
-
-	public void setReSend(boolean reSend) {
-		this.reSend = reSend;
-	}
-	
-	public long getTimeToSend() {
-		return timeToSend;
-	}
-	
-	public void setTimeToSend(long timeToSend) {
-		this.timeToSend = timeToSend;
-	}
-	
-	
-	public int getMessageType() {
-		return messageType;
-	}
-	
-	public void setMessageType(int messagetype) {
-		this.messageType = messagetype;
-	}
-
-	public String getSequenceID() {
-		return sequenceID;
-	}
-
-	public void setSequenceID(String sequenceID) {
-		this.sequenceID = sequenceID;
-	}
-
-	public String getWsrmAnonURI() {
-		return wsrmAnonURI;
-	}
-
-	public void setWsrmAnonURI(String wsrmAnonURI) {
-		this.wsrmAnonURI = wsrmAnonURI;
-	}
-
-	public String getToAddress() {
-		return toAddress;
-	}
-
-	public void setToAddress(String toAddress) {
-		this.toAddress = toAddress;
-	}
-	
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ *  
+ */
+
+package org.apache.sandesha2.storage.beans;
+
+/**
+ * This bean is used at the sending side (of both server and client)
+ * There is one eatry for each message to be sent.
+ */
+
+public class SenderBean extends RMBean {
+
+	private static final long serialVersionUID = 5776347847725156786L;
+
+	/**
+	 * Comment for <code>messageID</code>
+	 * The message id of the representing message.
+	 * 
+	 */
+	private String messageID;
+
+	/**
+	 * Comment for <code>messageContextRefKey</code>
+	 * Key retrieved by the storage mechanism after storing the message.
+	 */
+	private String messageContextRefKey;
+
+	/**
+	 * Comment for <code>send</code>
+	 * The sender will not send the message unless this property is true.
+	 */
+	private boolean send;
+
+	/**
+	 * Comment for <code>internalSequenceID</code>
+	 * Please see the comment of CreateSeqBean.
+	 */
+	private String internalSequenceID;
+
+	/**
+	 * Comment for <code>sentCount</code>
+	 * The number of times current message has been sent.
+	 */
+	private int sentCount = 0;
+
+	/**
+	 * Comment for <code>messageNumber</code>
+	 * The message number of the current message.
+	 */
+	private long messageNumber = 0;
+
+	/**
+	 * Comment for <code>reSend</code>
+	 * If this property if false. The message has to be sent only once. The entry has to be deleted after sending.
+	 */
+	private boolean reSend = true;
+
+	/**
+	 * Comment for <code>timeToSend</code>
+	 * Message has to be sent only after this time.
+	 */
+	private long timeToSend = 0;
+	
+	/**
+	 * Comment for <code>messageType</code>
+	 * The type of the current message.
+	 * Possible types are given in Sandesha2Constants.MessageTypes interface.
+	 */
+	private int messageType =0;
+	
+	/**
+	 * The sequenceID of the sequence this message belong to.
+	 * this may be null for some messages (e.g. create sequence);
+	 */
+	//TODO fill this property correctly
+	private String sequenceID;
+	
+	/**
+	 * TODO use the value in CreateSequenceBean.
+	 */
+	private String wsrmAnonURI;
+	
+	/**
+	 * Destination URL of the message to be sent. This can be used to decide weather the message cannot be sent,
+	 * before actyally reading the message from the storage.
+	 */
+	private String toAddress;
+	
+	public SenderBean() {
+
+	}
+
+	public SenderBean(String messageID, String key,
+			boolean send,long timeToSend, String internalSequenceID, long messageNumber) {
+		this.messageID = messageID;
+		this.messageContextRefKey = key;
+		//this.LastSentTime = lastSentTime;
+		this.timeToSend = timeToSend;
+		this.send = send;
+		this.internalSequenceID = internalSequenceID;
+		this.messageNumber = messageNumber;
+	}
+
+	public String getMessageContextRefKey() {
+		return messageContextRefKey;
+	}
+
+	public void setMessageContextRefKey(String messageContextRefKey) {
+		this.messageContextRefKey = messageContextRefKey;
+	}
+
+	public String getMessageID() {
+		return messageID;
+	}
+
+	public void setMessageID(String messageID) {
+		this.messageID = messageID;
+	}
+
+	public boolean isSend() {
+		return send;
+	}
+
+	public void setSend(boolean send) {
+		this.send = send;
+	}
+
+	public String getInternalSequenceID() {
+		return internalSequenceID;
+	}
+
+	public void setInternalSequenceID(String internalSequenceId) {
+		this.internalSequenceID = internalSequenceId;
+	}
+
+	public int getSentCount() {
+		return sentCount;
+	}
+
+	public void setSentCount(int sentCount) {
+		this.sentCount = sentCount;
+	}
+
+	public long getMessageNumber() {
+		return messageNumber;
+	}
+
+	public void setMessageNumber(long messageNumber) {
+		this.messageNumber = messageNumber;
+	}
+
+	public boolean isReSend() {
+		return reSend;
+	}
+
+	public void setReSend(boolean reSend) {
+		this.reSend = reSend;
+	}
+	
+	public long getTimeToSend() {
+		return timeToSend;
+	}
+	
+	public void setTimeToSend(long timeToSend) {
+		this.timeToSend = timeToSend;
+	}
+	
+	
+	public int getMessageType() {
+		return messageType;
+	}
+	
+	public void setMessageType(int messagetype) {
+		this.messageType = messagetype;
+	}
+
+	public String getSequenceID() {
+		return sequenceID;
+	}
+
+	public void setSequenceID(String sequenceID) {
+		this.sequenceID = sequenceID;
+	}
+
+	public String getWsrmAnonURI() {
+		return wsrmAnonURI;
+	}
+
+	public void setWsrmAnonURI(String wsrmAnonURI) {
+		this.wsrmAnonURI = wsrmAnonURI;
+	}
+
+	public String getToAddress() {
+		return toAddress;
+	}
+
+	public void setToAddress(String toAddress) {
+		this.toAddress = toAddress;
+	}
+	
 }

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SequencePropertyBean.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SequencePropertyBean.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SequencePropertyBean.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/storage/beans/SequencePropertyBean.java Sun Nov 12 03:05:21 2006
@@ -1,81 +1,83 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-package org.apache.sandesha2.storage.beans;
-
-/**
- * This bean is used to store properties of a certain sequence.
- * Used by both sending and receiving sides.
- */
-
-public class SequencePropertyBean extends RMBean {
-
-	/**
-	 * Comment for <code>sequencePropertyKey</code>
-	 * The key used to store properties of this sequence.
-	 * The value depends on the endpoint as given below.
-	 * 
-	 * RMS (sending side) - internalSequenceId
-	 * RMD - sequenceId
-	 */
-	private String sequencePropertyKey;
-
-	/**
-	 * Comment for <code>name</code>
-	 * The name of the property. Possible names are given in the Sandesha2Constants.SequenceProperties interface.
-	 */
-	private String name;
-
-	/**
-	 * Comment for <code>value</code>
-	 * The value of the property.
-	 */
-	private String value;
-
-	public SequencePropertyBean(String seqID, String propertyName, String value) {
-		this.sequencePropertyKey = seqID;
-		this.name = propertyName;
-		this.value = value;
-	}
-
-	public SequencePropertyBean() {
-
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getSequencePropertyKey() {
-		return sequencePropertyKey;
-	}
-
-	public void setSequencePropertyKey(String sequencePropertyKey) {
-		this.sequencePropertyKey = sequencePropertyKey;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.sandesha2.storage.beans;
+
+/**
+ * This bean is used to store properties of a certain sequence.
+ * Used by both sending and receiving sides.
+ */
+
+public class SequencePropertyBean extends RMBean {
+
+	private static final long serialVersionUID = 8266532177909565832L;
+
+	/**
+	 * Comment for <code>sequencePropertyKey</code>
+	 * The key used to store properties of this sequence.
+	 * The value depends on the endpoint as given below.
+	 * 
+	 * RMS (sending side) - internalSequenceId
+	 * RMD - sequenceId
+	 */
+	private String sequencePropertyKey;
+
+	/**
+	 * Comment for <code>name</code>
+	 * The name of the property. Possible names are given in the Sandesha2Constants.SequenceProperties interface.
+	 */
+	private String name;
+
+	/**
+	 * Comment for <code>value</code>
+	 * The value of the property.
+	 */
+	private String value;
+
+	public SequencePropertyBean(String seqID, String propertyName, String value) {
+		this.sequencePropertyKey = seqID;
+		this.name = propertyName;
+		this.value = value;
+	}
+
+	public SequencePropertyBean() {
+
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getSequencePropertyKey() {
+		return sequencePropertyKey;
+	}
+
+	public void setSequencePropertyKey(String sequencePropertyKey) {
+		this.sequencePropertyKey = sequencePropertyKey;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
 }

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/RMMsgCreator.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/RMMsgCreator.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/RMMsgCreator.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/RMMsgCreator.java Sun Nov 12 03:05:21 2006
@@ -37,17 +37,16 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisOperationFactory;
 import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.wsdl.WSDLConstants.WSDL20_2004Constants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.rampart.RampartMessageData;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.client.SandeshaClientConstants;
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
+import org.apache.sandesha2.msgprocessors.CreateSeqResponseMsgProcessor;
 import org.apache.sandesha2.security.SecurityManager;
 import org.apache.sandesha2.security.SecurityToken;
 import org.apache.sandesha2.storage.StorageManager;
@@ -215,7 +214,6 @@
 		if (context == null)
 			throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.configContextNotSet));
 
-		SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropertyBeanMgr();
 		MessageContext createSeqmsgContext;
 		try {
 			// creating by copying common contents. (this will not set contexts
@@ -250,28 +248,7 @@
 		}
 
 		createSeqmsgContext.setAxisOperation(createSeqOperation);
-
-		createSeqmsgContext.setTo(applicationRMMsg.getTo());
-		
-//		createSeqmsgContext.setReplyTo(applicationRMMsg.getReplyTo());
-		//generating a new replyTo address for the CreateSequenceMessage.
-		//Otherwise there will be errors when the app msg is InOnly.
-		
-		QName axisOperationName = createSeqmsgContext.getAxisOperation().getName();
-		TransportInDescription transportIn = createSeqmsgContext.getTransportIn();
-		QName transportInName = null;
-		if (transportIn!=null)
-			transportInName = transportIn.getName();
-		
-		EndpointReference referenceTo = applicationMsgContext.getTo();
-		EndpointReference referenceReplyTo = applicationMsgContext.getReplyTo();
-		
-		
-		if (referenceReplyTo!=null) {
-			EndpointReference createSeqReplyTo = new EndpointReference (referenceReplyTo.getAddress());
-        	createSeqmsgContext.setReplyTo(createSeqReplyTo);
-		}
-        
+		        
 		RMMsgContext createSeqRMMsg = new RMMsgContext(createSeqmsgContext);
 
 		String rmVersion = SandeshaUtil.getRMVersion(sequencePropertyKey, storageManager);
@@ -293,8 +270,12 @@
 			EndpointReference offeredEndpoint = (EndpointReference) applicationMsgContext
 					.getProperty(SandeshaClientConstants.OFFERED_ENDPOINT);
 			
-			if (offeredEndpoint==null)
-				offeredEndpoint = applicationMsgContext.getReplyTo();  //using replyTo as the Endpoint if it is not specified
+			if (offeredEndpoint==null) {
+				EndpointReference replyTo = applicationMsgContext.getReplyTo();  //using replyTo as the Endpoint if it is not specified
+				
+				if (replyTo!=null)
+					offeredEndpoint = SandeshaUtil.cloneEPR(replyTo);
+			}
 			
 			if (offeredSequence != null && !"".equals(offeredSequence)) {
 				SequenceOffer offerPart = new SequenceOffer(rmNamespaceValue);
@@ -317,34 +298,38 @@
 			}
 		}
 
-		//TODO remove setting addressing values following two beans.
-		SequencePropertyBean replyToBean = seqPropMgr.retrieve(sequencePropertyKey,
-				Sandesha2Constants.SequenceProperties.REPLY_TO_EPR);
-		SequencePropertyBean toBean = seqPropMgr.retrieve(sequencePropertyKey,
-				Sandesha2Constants.SequenceProperties.TO_EPR);
-
-		if (toBean == null || toBean.getValue() == null)
-			throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.toEPRNotValid, null));
-
-		EndpointReference toEPR = new EndpointReference(toBean.getValue());
-		EndpointReference replyToEPR = null;
-
+		String to = SandeshaUtil.getSequenceProperty(sequencePropertyKey, 
+										Sandesha2Constants.SequenceProperties.TO_EPR,storageManager);
+		String replyTo = SandeshaUtil.getSequenceProperty(sequencePropertyKey, 
+				 Sandesha2Constants.SequenceProperties.REPLY_TO_EPR,storageManager);
+		
+		if (replyTo==null) {
+			//using wsa:Anonymous as ReplyTo
+			
+			String addressingNamespace = applicationRMMsg.getAddressingNamespaceValue();
+			if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace))
+				replyTo = AddressingConstants.Submission.WSA_ANONYMOUS_URL;
+			else
+				replyTo = AddressingConstants.Final.WSA_ANONYMOUS_URL;
+		}
+		
+		if (to==null) {
+			String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.toBeanNotSet);
+			throw new SandeshaException (message);
+		}
+		
+		//TODO store and retrieve a full EPR instead of just the address.
+		EndpointReference toEPR = new EndpointReference (to);
+		EndpointReference replyToEPR = new EndpointReference (replyTo);
+		
+		createSeqRMMsg.setTo(toEPR);
+		createSeqRMMsg.setReplyTo(replyToEPR);
+		
 		String anonymousURI = SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespaceValue);
 
 		if (acksToEPR==null || acksToEPR.getAddress() == null || "".equals(acksToEPR.getAddress()))
 			acksToEPR = new EndpointReference(anonymousURI);
 
-		if (replyToBean != null && replyToBean.getValue() != null)
-			replyToEPR = new EndpointReference(replyToBean.getValue());
-
-		if (createSeqRMMsg.getTo() == null)
-			createSeqRMMsg.setTo(toEPR);
-
-		// ReplyTo will be set only if not null.
-		if (replyToEPR != null)
-			createSeqRMMsg.setReplyTo(replyToEPR);
-
-
 		AcksTo acksTo = new AcksTo(acksToEPR,rmNamespaceValue,addressingNamespaceValue);
 		createSequencePart.setAcksTo(acksTo);
 		
@@ -508,8 +493,6 @@
 		SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil.getSOAPVersion(createSeqMessage
 				.getSOAPEnvelope()));
 
-		ConfigurationContext configurationContext = createSeqMessage.getMessageContext().getConfigurationContext();
-
 		IOMRMElement messagePart = createSeqMessage.getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ);
 		CreateSequence cs = (CreateSequence) messagePart;
 
@@ -536,7 +519,7 @@
 			if (outSequenceId != null && !"".equals(outSequenceId)) {
 
 				Accept accept = new Accept(rmNamespaceValue, addressingNamespaceValue);
-				EndpointReference acksToEPR = createSeqMessage.getTo();
+				EndpointReference acksToEPR = SandeshaUtil.cloneEPR(createSeqMessage.getTo());
 				
 				//putting the To EPR as the AcksTo for the response sequence.
 				AcksTo acksTo = new AcksTo(acksToEPR,rmNamespaceValue, addressingNamespaceValue);
@@ -620,7 +603,6 @@
 			StorageManager storageManager) throws AxisFault {
 
 		RMMsgContext closeSeqResponseRMMsg = new RMMsgContext(outMessage);
-		ConfigurationContext configurationContext = closeSeqRMMsg.getMessageContext().getConfigurationContext();
 
 		SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil.getSOAPVersion(closeSeqRMMsg
 				.getSOAPEnvelope()));
@@ -671,8 +653,6 @@
 		factory = (SOAPFactory) envelope.getOMFactory();
 		
 		envelope = applicationMsg.getSOAPEnvelope();
-
-		ConfigurationContext ctx = applicationMsg.getMessageContext().getConfigurationContext();
 
 		String rmVersion = SandeshaUtil.getRMVersion(sequencePropertyKey, storageManager);
 		if (rmVersion == null)

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SandeshaUtil.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SandeshaUtil.java Sun Nov 12 03:05:21 2006
@@ -24,7 +24,9 @@
 import java.io.StringBufferInputStream;
 import java.lang.reflect.Constructor;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 import javax.xml.namespace.QName;
@@ -45,6 +47,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
@@ -1191,4 +1194,26 @@
 		pollingManager.shedulePollingRequest(sequenceId);
 	}
 	
+	public static EndpointReference cloneEPR (EndpointReference epr) {
+		EndpointReference newEPR = new EndpointReference (epr.getAddress());
+		Map referenceParams = epr.getAllReferenceParameters();
+		
+		if (referenceParams != null) {
+			for (Iterator keys = referenceParams.keySet().iterator(); keys
+					.hasNext();) {
+				Object key = keys.next();
+				Object referenceParam = referenceParams.get(key);
+
+				if (referenceParam instanceof OMElement) {
+					OMElement clonedElement = ((OMElement) referenceParam)
+							.cloneOMElement();
+					clonedElement.setText("false");
+					newEPR.addReferenceParameter(clonedElement);
+				}
+			}
+		}
+		
+		return newEPR;
+	}
+
 }

Modified: webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SequenceManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SequenceManager.java?view=diff&rev=473920&r1=473919&r2=473920
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SequenceManager.java (original)
+++ webservices/sandesha/branches/sandesha2/java/1_1/src/org/apache/sandesha2/util/SequenceManager.java Sun Nov 12 03:05:21 2006
@@ -271,6 +271,7 @@
 			if (replyToEPR!=null)		
 				replyToBean = new SequencePropertyBean(sequencePropertyKey,
 						Sandesha2Constants.SequenceProperties.REPLY_TO_EPR, replyToEPR.getAddress());
+			
 		
 			//TODO set AcksToBean.
 		}



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