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/07/19 04:58:35 UTC
svn commit: r423350 [1/8] - in /webservices/sandesha/trunk/java: ./
src/org/apache/sandesha2/ src/org/apache/sandesha2/client/
src/org/apache/sandesha2/handlers/ src/org/apache/sandesha2/i18n/
src/org/apache/sandesha2/msgprocessors/ src/org/apache/sand...
Author: chamikara
Date: Tue Jul 18 19:58:31 2006
New Revision: 423350
URL: http://svn.apache.org/viewvc?rev=423350&view=rev
Log:
Applied the patch from Thomas on i18n.
Added:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageHelper.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
Removed:
webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/MTOMRMTest.java
Modified:
webservices/sandesha/trunk/java/maven.xml
webservices/sandesha/trunk/java/src/org/apache/sandesha2/MessageValidator.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/RMMsgContext.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/SandeshaModule.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MsgProcessorFactory.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/RMPolicyProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/AcknowledgementIntervalProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/ExponentialBackoffProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/InactivityTimeoutMeasureProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/InactivityTimeoutProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/InvokeInOrderProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/MaximumRetransmissionCountProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/MessageTypesToDropProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/RetransmissionItervalProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/policy/processors/StorageManagersProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryCreateSeqBeanMgr.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryInvokerBeanMgr.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryNextMsgBeanMgr.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemorySenderBeanMgr.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemorySequencePropertyBeanMgr.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/transport/Sandesha2TransportSender.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/AcknowledgementManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/FaultManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/MessageRetransmissionAdjuster.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/MsgInitializer.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/PropertyManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/RMMsgCreator.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SOAPFaultEnvelopeCreator.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SandeshaPropertyBean.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SandeshaUtil.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SequenceManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SpecSpecificConstants.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/TerminateManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/InOrderInvoker.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Sender.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/Accept.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/AckFinal.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/AckNone.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/AckRequested.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/AcknowledgementRange.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/AcksTo.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/Address.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/CloseSequence.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/CloseSequenceResponse.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/CreateSequence.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/CreateSequenceResponse.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/Expires.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/FaultCode.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/Identifier.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/LastMessage.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/MessageNumber.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/Nack.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/RMElements.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/Sequence.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/SequenceAcknowledgement.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/SequenceFault.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/SequenceOffer.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/TerminateSequence.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/wsrm/TerminateSequenceResponse.java
Modified: webservices/sandesha/trunk/java/maven.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/maven.xml?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/maven.xml (original)
+++ webservices/sandesha/trunk/java/maven.xml Tue Jul 18 19:58:31 2006
@@ -43,6 +43,12 @@
</preGoal>
<goal name="mar" prereqs="java:compile">
+ <copy todir="${maven.build.dir}/classes/">
+ <fileset dir="${basedir}/src">
+ <include name="**/*.properties" />
+ </fileset>
+ </copy>
+
<ant:property name="metainf.path" value="${build.temp.dir}/module/META-INF" />
<ant:mkdir dir="${metainf.path}" />
<ant:copy file="${basedir}/config/module.xml" todir="${metainf.path}" />
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/MessageValidator.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/MessageValidator.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/MessageValidator.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/MessageValidator.java Tue Jul 18 19:58:31 2006
@@ -17,44 +17,51 @@
package org.apache.sandesha2;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.storage.StorageManager;
import org.apache.sandesha2.util.SandeshaUtil;
import org.apache.sandesha2.util.SpecSpecificConstants;
/**
- *Used to validate RM messages.
- *This include both application messages and RM control messages.
+ * Used to validate RM messages. This include both application messages and RM
+ * control messages.
*/
public class MessageValidator {
- public static void validateMessage (RMMsgContext rmMsg,StorageManager storageManager) throws SandeshaException {
-
- if (rmMsg.getMessageType()!=Sandesha2Constants.MessageTypes.CREATE_SEQ
- && rmMsg.getMessageType()!=Sandesha2Constants.MessageTypes.UNKNOWN) {
-
+ public static void validateMessage(RMMsgContext rmMsg, StorageManager storageManager) throws SandeshaException {
+
+ if (rmMsg.getMessageType() != Sandesha2Constants.MessageTypes.CREATE_SEQ
+ && rmMsg.getMessageType() != Sandesha2Constants.MessageTypes.UNKNOWN) {
+
String sequenceID = SandeshaUtil.getSequenceIDFromRMMessage(rmMsg);
-
- if (sequenceID!=null) {
- String rmVersionOfSequence = SandeshaUtil.getSequenceProperty(sequenceID,Sandesha2Constants.SequenceProperties.RM_SPEC_VERSION,storageManager);
- String addressingNamespaceOfSequence = SandeshaUtil.getSequenceProperty(sequenceID,Sandesha2Constants.SequenceProperties.ADDRESSING_NAMESPACE_VALUE,storageManager);
-
+
+ if (sequenceID != null) {
+ String rmVersionOfSequence = SandeshaUtil.getSequenceProperty(sequenceID,
+ Sandesha2Constants.SequenceProperties.RM_SPEC_VERSION, storageManager);
+ String addressingNamespaceOfSequence = SandeshaUtil.getSequenceProperty(sequenceID,
+ Sandesha2Constants.SequenceProperties.ADDRESSING_NAMESPACE_VALUE, storageManager);
+
String rmNamespaceOfMsg = rmMsg.getRMNamespaceValue();
String rmNamespaceOfSequence = null;
- if (rmVersionOfSequence!=null)
+ if (rmVersionOfSequence != null)
rmNamespaceOfSequence = SpecSpecificConstants.getRMNamespaceValue(rmVersionOfSequence);
String addressingNamespaceOfMsg = rmMsg.getAddressingNamespaceValue();
-
- if (rmNamespaceOfSequence!=null && !rmNamespaceOfSequence.equals(rmNamespaceOfMsg)) {
- String message = "Validation failed. The RM namespace of the message does not match with the sequence";
- throw new SandeshaException (message);
+
+ if (rmNamespaceOfSequence != null && !rmNamespaceOfSequence.equals(rmNamespaceOfMsg)) {
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.rmNamespaceNotMatchSequence,
+ rmNamespaceOfMsg, rmNamespaceOfSequence, sequenceID);
+ throw new SandeshaException(message);
}
-
- if (addressingNamespaceOfSequence!=null && !addressingNamespaceOfSequence.equals(addressingNamespaceOfMsg)) {
- String message = "Validation failed. The Addressing namespace of the message does not match with the sequence";
- throw new SandeshaException (message);
+
+ if (addressingNamespaceOfSequence != null
+ && !addressingNamespaceOfSequence.equals(addressingNamespaceOfMsg)) {
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.wsaNamespaceNotMatchSequence,
+ addressingNamespaceOfMsg, addressingNamespaceOfSequence, sequenceID);
+ throw new SandeshaException(message);
}
-
- //TODO do validation based on states
+
+ // TODO do validation based on states
}
}
}
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/RMMsgContext.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/RMMsgContext.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/RMMsgContext.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/RMMsgContext.java Tue Jul 18 19:58:31 2006
@@ -27,6 +27,8 @@
import org.apache.axis2.addressing.RelatesTo;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.util.SOAPAbstractFactory;
import org.apache.sandesha2.wsrm.IOMRMElement;
import org.apache.sandesha2.wsrm.IOMRMPart;
@@ -274,8 +276,9 @@
public void setAddressingNamespaceValue(String addressingNamespaceValue) throws SandeshaException {
if (!AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespaceValue) &&
!AddressingConstants.Final.WSA_NAMESPACE.equals(addressingNamespaceValue))
- throw new SandeshaException ("Unknown addressing version");
+ throw new SandeshaException (SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.unknownWSAVersion, addressingNamespaceValue));
this.addressingNamespaceValue = addressingNamespaceValue;
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/SandeshaModule.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/SandeshaModule.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/SandeshaModule.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/SandeshaModule.java Tue Jul 18 19:58:31 2006
@@ -26,6 +26,8 @@
import org.apache.axis2.modules.ModulePolicyExtension;
import org.apache.axis2.modules.PolicyExtension;
import org.apache.log4j.Logger;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.policy.RMPolicyExtension;
import org.apache.sandesha2.storage.SandeshaStorageException;
import org.apache.sandesha2.storage.StorageManager;
@@ -47,10 +49,13 @@
//storing the Sadesha module as a property.
configContext.setProperty(Sandesha2Constants.MODULE_CLASS_LOADER,module.getModuleClassLoader());
+
+ //init the i18n messages
+ SandeshaMessageHelper.innit();
// continueUncompletedSequences (storageManager,configCtx);
- SandeshaPropertyBean constantPropertyBean = PropertyManager.loadPropertiesFromDefaultValues();
+ SandeshaPropertyBean constantPropertyBean = PropertyManager.loadPropertiesFromDefaultValues();
SandeshaPropertyBean propertyBean = PropertyManager.loadPropertiesFromModuleDescPolicy(module,constantPropertyBean);
if (propertyBean==null) {
propertyBean = PropertyManager.loadPropertiesFromDefaultValues();
@@ -61,14 +66,16 @@
parameter.setValue(propertyBean);
configContext.getAxisConfiguration().addParameter(parameter);;
- configContext.setProperty(Sandesha2Constants.INMEMORY_STORAGE_MANAGER,null); // this must be resetted by the module settings.
+ configContext.setProperty(Sandesha2Constants.INMEMORY_STORAGE_MANAGER,null); // this must be resetted by the module settings.
configContext.setProperty(Sandesha2Constants.PERMANENT_STORAGE_MANAGER,null);
try {
StorageManager inMemorytorageManager = SandeshaUtil.getInMemoryStorageManager(configContext);
inMemorytorageManager.initStorage(module);
} catch (SandeshaStorageException e) {
- String message = "Cannot initialize the given in-memory storage manager.";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotInitInMemoryStorageManager,
+ e.toString());
log.debug(message,e);
}
@@ -76,7 +83,9 @@
StorageManager permanentStorageManager = SandeshaUtil.getPermanentStorageManager(configContext);
permanentStorageManager.initStorage(module);
} catch (SandeshaStorageException e) {
- String message = "Cannot initialize the given persistent storage manager.";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotInitPersistentStorageManager,
+ e.toString());
log.debug(message,e);
}
}
@@ -85,7 +94,8 @@
SandeshaPropertyBean parentPropertyBean = SandeshaUtil.getPropertyBean(axisDescription);
if (parentPropertyBean==null)
- throw new AxisFault ("Default Property Bean is not set");
+ throw new AxisFault (SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.defaultPropertyBeanNotSet));
SandeshaPropertyBean axisDescPropertyBean = PropertyManager.loadPropertiesFromAxisDescription(axisDescription,parentPropertyBean);
@@ -144,4 +154,4 @@
}
-}
\ No newline at end of file
+}
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java Tue Jul 18 19:58:31 2006
@@ -40,6 +40,8 @@
import org.apache.commons.logging.LogFactory;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.storage.StorageManager;
import org.apache.sandesha2.storage.Transaction;
import org.apache.sandesha2.storage.beanmanagers.CreateSeqBeanMgr;
@@ -77,18 +79,21 @@
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
EndpointReference toEPR = options.getTo();
if (toEPR == null)
- throw new SandeshaException("'To' address is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
String to = toEPR.getAddress();
String sequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
- throw new SandeshaException("Service Context is null");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.serviceContextNotSet));
ConfigurationContext configurationContext = serviceContext.getConfigurationContext();
@@ -210,10 +215,11 @@
ArrayList incomingSequenceReports = new ArrayList();
while (incomingSequenceIDIter.hasNext()) {
- String sequnceID = (String) incomingSequenceIDIter.next();
- SequenceReport incomingSequenceReport = getIncomingSequenceReport(sequnceID, configCtx);
+ String sequenceID = (String) incomingSequenceIDIter.next();
+ SequenceReport incomingSequenceReport = getIncomingSequenceReport(sequenceID, configCtx);
if (incomingSequenceReport == null) {
- throw new SandeshaException("An incoming sequence report is not present for the given sequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.incommingSequenceReportNotFound, sequenceID));
}
incomingSequenceReports.add(incomingSequenceReport);
}
@@ -299,15 +305,18 @@
public static void createSequence(ServiceClient serviceClient, boolean offer) throws SandeshaException {
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
EndpointReference toEPR = serviceClient.getOptions().getTo();
if (toEPR == null)
- throw new SandeshaException("ToEPR is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
String to = toEPR.getAddress();
if (to == null)
- throw new SandeshaException("To EPR is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
if (offer) {
String offeredSequenceID = SandeshaUtil.getUUID();
@@ -338,7 +347,8 @@
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String oldSequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
options.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
@@ -367,11 +377,13 @@
public static void terminateSequence(ServiceClient serviceClient) throws SandeshaException {
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
- throw new SandeshaException("ServiceContext is null");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.serviceContextNotSet));
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
@@ -390,7 +402,9 @@
try {
serviceClient.fireAndForget(terminateBody);
} catch (AxisFault e) {
- String message = "Could not send the terminate message";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.couldNotSendTerminate,
+ e.toString());
throw new SandeshaException(message, e);
} finally {
options.setAction(oldAction);
@@ -400,7 +414,8 @@
public static void terminateSequence(ServiceClient serviceClient, String sequenceKey) throws SandeshaException {
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String oldSequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
options.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
@@ -418,11 +433,13 @@
public static void closeSequence(ServiceClient serviceClient) throws SandeshaException {
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
- throw new SandeshaException("ServiceContext is null");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.serviceContextNotSet));
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
@@ -440,7 +457,9 @@
try {
serviceClient.fireAndForget(closeSequenceBody);
} catch (AxisFault e) {
- String message = "Could not send the close sequence message";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.couldNotSendClose,
+ e.toString());
throw new SandeshaException(message, e);
} finally {
options.setAction(oldAction);
@@ -452,11 +471,14 @@
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.serviceContextNotSet));
String specVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
if (!Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion)) {
- String message = "Close Sequence feature is only available for WSRM 1.1";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.closeSequenceSpecLevel,
+ specVersion);
throw new SandeshaException (message);
}
@@ -480,7 +502,8 @@
throws SandeshaException {
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String oldSequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
options.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
@@ -503,7 +526,9 @@
SequenceReport sequenceReport = getOutgoingSequenceReport(serviceClient);
if (sequenceReport == null) {
- throw new SandeshaException("Cannnot find a sequence report for the given data");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotFindReportForGivenData,
+ serviceClient.toString()));
}
boolean done = false;
@@ -527,7 +552,8 @@
throws SandeshaException {
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String oldSequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
options.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
@@ -542,18 +568,21 @@
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
EndpointReference toEPR = options.getTo();
if (toEPR == null)
- throw new SandeshaException("To EPR is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
String to = toEPR.getAddress();
String sequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
- throw new SandeshaException("Service context is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.serviceContextNotSet));
ConfigurationContext configurationContext = serviceContext.getConfigurationContext();
@@ -561,12 +590,13 @@
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
if (sequenceReport == null)
- throw new SandeshaException("Cannot get a sequence report from the given data");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotFindReportForGivenData, serviceClient.toString()));
if (sequenceReport.getSequenceStatus() != SequenceReport.SEQUENCE_STATUS_ESTABLISHED) {
- throw new SandeshaException(
- "Sequence is not in a active state. Either create sequence response has not being received or sequence has been terminated,"
- + " cannot get sequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.noSequenceEstablished,
+ internalSequenceID));
}
StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
@@ -575,7 +605,8 @@
SequencePropertyBean sequenceIDBean = seqPropMgr.retrieve(internalSequenceID,
Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
if (sequenceIDBean == null)
- throw new SandeshaException("SequenceIdBean is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.sequenceIdBeanNotSet));
String sequenceID = sequenceIDBean.getValue();
return sequenceID;
@@ -585,17 +616,20 @@
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
- throw new SandeshaException("ServiceContext is null");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.serviceContextNotSet));
ConfigurationContext configContext = serviceContext.getConfigurationContext();
EndpointReference toEPR = options.getTo();
if (toEPR == null)
- throw new SandeshaException("'To' address is not set is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
String to = toEPR.getAddress();
@@ -606,16 +640,19 @@
rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.v1_0;
if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmSpecVersion)) {
- throw new SandeshaException("Empty AckRequest messages can only be sent with the v1_1 spec");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.emptyAckRequestSpecLevel, rmSpecVersion));
}
String internalSequenceID = getInternalSequenceID(to, sequenceKey);
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(internalSequenceID, configContext);
if (sequenceReport == null)
- throw new SandeshaException("Cannot generate the sequence report for the given internalSequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotGenerateReport, internalSequenceID));
if (sequenceReport.getSequenceStatus() != SequenceReport.SEQUENCE_STATUS_ESTABLISHED)
- throw new SandeshaException("Canot send the ackRequest message since it is not active");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotSendAckRequestNotActive, internalSequenceID));
String outSequenceID = getSequenceID(serviceClient);
@@ -651,7 +688,8 @@
try {
serviceClient.fireAndForget(null);
} catch (AxisFault e) {
- String message = "Could not send the ack request";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotSendAckRequestException, e.toString());
throw new SandeshaException(message, e);
}
@@ -662,7 +700,8 @@
public static void sendAckRequest(ServiceClient serviceClient, String sequenceKey) throws SandeshaException {
Options options = serviceClient.getOptions();
if (options == null)
- throw new SandeshaException("Options object is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
String oldSequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
options.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
@@ -679,11 +718,13 @@
throws SandeshaException {
if (options == null)
- throw new SandeshaException("You must set the Options object before calling this method");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
EndpointReference epr = options.getTo();
if (epr == null)
- throw new SandeshaException("You must set the toEPR before calling this method");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
String to = epr.getAddress();
String sequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
@@ -693,21 +734,25 @@
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(internalSequenceID,
configurationContext);
if (sequenceReport == null)
- throw new SandeshaException("Cannot generate the sequence report for the given internalSequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotGenerateReport, internalSequenceID));
if (sequenceReport.getSequenceStatus() != SequenceReport.SEQUENCE_STATUS_ESTABLISHED)
- throw new SandeshaException("Canot close the sequence since it is not active");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotCloseSequenceNotActive, internalSequenceID));
StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropertyBeanMgr();
SequencePropertyBean sequenceIDBean = seqPropMgr.retrieve(internalSequenceID,
Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
if (sequenceIDBean == null)
- throw new SandeshaException("SequenceIdBean is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.sequenceIdBeanNotSet));
String sequenceID = sequenceIDBean.getValue();
if (sequenceID == null)
- throw new SandeshaException("Cannot find the sequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotFindSequenceID, sequenceIDBean.toString()));
String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
@@ -715,7 +760,8 @@
rmSpecVersion = SpecSpecificConstants.getDefaultSpecVersion();
if (!SpecSpecificConstants.isSequenceClosingAllowed(rmSpecVersion))
- throw new SandeshaException("This rm version does not allow sequence closing");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.closeSequenceSpecLevel, rmSpecVersion));
SOAPEnvelope dummyEnvelope = null;
SOAPFactory factory = null;
@@ -748,7 +794,8 @@
SequencePropertyBean internalSequenceBean = seqPropMgr.findUnique(internalSequenceFindBean);
if (internalSequenceBean == null) {
- String message = "Internal sequence Bean is not available for the given sequence";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.internalSeqBeanNotAvailableOnSequence, internalSequenceID);
log.debug(message);
return false;
@@ -773,7 +820,8 @@
SequencePropertyBean internalSequenceBean = seqPropMgr.findUnique(internalSequenceFindBean);
if (internalSequenceBean == null) {
- String message = "Internal sequence Bean is not available for the given sequence";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.internalSeqBeanNotAvailableOnSequence, internalSequenceID);
log.debug(message);
return false;
@@ -797,7 +845,8 @@
SequencePropertyBean internalSequenceBean = seqPropMgr.findUnique(internalSequenceFindBean);
if (internalSequenceBean == null) {
- String message = "Not a valid terminated sequence. Internal sequence Bean is not available for the given sequence";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.notValidTerminate, internalSequenceID);
log.debug(message);
throw new SandeshaException(message);
@@ -817,7 +866,8 @@
SequencePropertyBean internalSequenceBean = seqPropMgr.findUnique(internalSequenceFindBean);
if (internalSequenceBean == null) {
- String message = "Not a valid timedOut sequence. Internal sequence Bean is not available for the given sequence";
+ String message = SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.notValidTimeOut, internalSequenceID);
log.debug(message);
throw new SandeshaException(message);
@@ -866,19 +916,23 @@
return SequenceReport.SEQUENCE_STATUS_ESTABLISHED;
}
- throw new SandeshaException("Unrecorded sequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotFindSequence, sequenceID
+ ));
}
private class DummyCallback extends Callback {
public void onComplete(AsyncResult result) {
// TODO Auto-generated method stub
- System.out.println("Error: dummy callback was called");
+ System.out.println(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.dummyCallback));
}
public void onError(Exception e) {
// TODO Auto-generated method stub
- System.out.println("Error: dummy callback received an error");
+ System.out.println(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.dummyCallbackError));
}
@@ -948,11 +1002,13 @@
throws SandeshaException {
if (options == null)
- throw new SandeshaException("You must set the Options object before calling this method");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.optionsObjectNotSet));
EndpointReference epr = options.getTo();
if (epr == null)
- throw new SandeshaException("You must set the toEPR before calling this method");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.toEPRNotValid, null));
String to = epr.getAddress();
String sequenceKey = (String) options.getProperty(SandeshaClientConstants.SEQUENCE_KEY);
@@ -960,21 +1016,25 @@
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(internalSequenceID,
configurationContext);
if (sequenceReport == null)
- throw new SandeshaException("Cannot generate the sequence report for the given internalSequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotGenerateReport, internalSequenceID));
if (sequenceReport.getSequenceStatus() != SequenceReport.SEQUENCE_STATUS_ESTABLISHED)
- throw new SandeshaException("Canot terminate the sequence since it is not active");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.noSequenceEstablished, internalSequenceID));
StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropertyBeanMgr();
SequencePropertyBean sequenceIDBean = seqPropMgr.retrieve(internalSequenceID,
Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
if (sequenceIDBean == null)
- throw new SandeshaException("SequenceIdBean is not set");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.sequenceIdBeanNotSet));
String sequenceID = sequenceIDBean.getValue();
if (sequenceID == null)
- throw new SandeshaException("Cannot find the sequenceID");
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(
+ SandeshaMessageKeys.cannotFindSequenceID, sequenceIDBean.toString()));
String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
if (rmSpecVersion == null)
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java Tue Jul 18 19:58:31 2006
@@ -39,6 +39,8 @@
import org.apache.sandesha2.SandeshaException;
import org.apache.sandesha2.client.SandeshaClientConstants;
import org.apache.sandesha2.client.SandeshaListener;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.msgprocessors.ApplicationMsgProcessor;
import org.apache.sandesha2.storage.StorageManager;
import org.apache.sandesha2.storage.Transaction;
@@ -56,36 +58,38 @@
public class SandeshaGlobalInHandler extends AbstractHandler {
private static final long serialVersionUID = -7187928423123306156L;
-
- private static final Log log = LogFactory.getLog(SandeshaGlobalInHandler.class.getName());
+
+ private static final Log log = LogFactory.getLog(SandeshaGlobalInHandler.class.getName());
public void invoke(MessageContext msgContext) throws AxisFault {
- if (log.isDebugEnabled())
- log.debug("Enter: SandeshaGlobalInHandler::msgContext, " + msgContext.getEnvelope().getHeader());
+ if (log.isDebugEnabled())
+ log.debug("Enter: SandeshaGlobalInHandler::msgContext, " + msgContext.getEnvelope().getHeader());
ConfigurationContext configContext = msgContext.getConfigurationContext();
if (configContext == null)
- throw new AxisFault("Configuration context is not set");
+ throw new AxisFault(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.configContextNotSet));
SOAPEnvelope envelope = msgContext.getEnvelope();
if (envelope == null)
- throw new SandeshaException("SOAP envelope is not set");
-
+ throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.soapEnvNotSet));
+
String reinjectedMessage = (String) msgContext.getProperty(Sandesha2Constants.REINJECTED_MESSAGE);
- if (reinjectedMessage!=null && Sandesha2Constants.VALUE_TRUE.equals(reinjectedMessage))
- return; //Reinjected messages are not processed by Sandesha2 inflow handlers
-
+ if (reinjectedMessage != null && Sandesha2Constants.VALUE_TRUE.equals(reinjectedMessage))
+ return; // Reinjected messages are not processed by Sandesha2 inflow
+ // handlers
+
StorageManager storageManager = null;
try {
- storageManager = SandeshaUtil.getSandeshaStorageManager(configContext,configContext.getAxisConfiguration());
- if (storageManager==null) {
- log.debug ("Sandesha2 cannot proceed. The StorageManager is not available");
+ storageManager = SandeshaUtil
+ .getSandeshaStorageManager(configContext, configContext.getAxisConfiguration());
+ if (storageManager == null) {
+ log.debug("Sandesha2 cannot proceed. The StorageManager is not available");
return;
}
} catch (SandeshaException e1) {
- //TODO make this a log
- log.debug ("Sandesha2 cannot proceed. Exception thrown when looking for the StorageManager");
+ // TODO make this a log
+ log.debug("Sandesha2 cannot proceed. Exception thrown when looking for the StorageManager");
return;
}
@@ -132,7 +136,7 @@
AxisFault axisFault = getAxisFaultFromFromSOAPFault(faultPart);
// reporting the fault
-// log.error(axisFault);
+ // log.error(axisFault);
if (faultCallback != null) {
faultCallback.onError(axisFault);
}
@@ -142,9 +146,9 @@
// stopping the fault from going further and
// getting dispatched
msgContext.pause(); // TODO let this go in the
- // last try
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::msgContext");
+ // last try
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::msgContext");
return;
}
@@ -157,19 +161,19 @@
// RM.
boolean isRMGlobalMessage = SandeshaUtil.isRMGlobalMessage(msgContext);
if (!isRMGlobalMessage) {
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::msgContext, !isRMGlobalMessage");
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::msgContext, !isRMGlobalMessage");
return;
}
RMMsgContext rmMessageContext = MsgInitializer.initializeMessage(msgContext);
// Dropping duplicates
- boolean dropped = dropIfDuplicate(rmMessageContext,storageManager);
+ boolean dropped = dropIfDuplicate(rmMessageContext, storageManager);
if (dropped) {
- processDroppedMessage(rmMessageContext,storageManager);
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::msgContext, dropped");
+ processDroppedMessage(rmMessageContext, storageManager);
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::msgContext, dropped");
return;
}
@@ -186,44 +190,44 @@
}
} catch (Exception e) {
- //message should not be sent in a exception situation.
+ // message should not be sent in a exception situation.
msgContext.pause();
-
+
if (!withinTransaction) {
try {
transaction.rollback();
msgContext.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
rolebacked = true;
} catch (Exception e1) {
- String message = "Exception thrown when trying to roleback the transaction.";
- log.debug(message,e);
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.rollbackError, e1.toString());
+ log.debug(message, e);
}
}
-
- String message = "Sandesha2 got an exception when processing the in message";
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::msgContext " ,e);
- throw new AxisFault (message,e);
+
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.inMsgError, e.toString());
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::msgContext ", e);
+ throw new AxisFault(message, e);
} finally {
if (!withinTransaction && !rolebacked) {
try {
transaction.commit();
msgContext.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
} catch (Exception e) {
- String message = "Exception thrown when trying to commit the transaction.";
- log.debug(message,e);
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.commitError, e.toString());
+ log.debug(message, e);
}
}
}
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::msgContext");
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::msgContext");
}
- private boolean dropIfDuplicate(RMMsgContext rmMsgContext,StorageManager storageManager) throws SandeshaException {
- if (log.isDebugEnabled())
- log.debug("Enter: SandeshaGlobalInHandler::dropIfDuplicate");
+ private boolean dropIfDuplicate(RMMsgContext rmMsgContext, StorageManager storageManager) throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: SandeshaGlobalInHandler::dropIfDuplicate");
- boolean drop = false;
+ boolean drop = false;
if (rmMsgContext.getMessageType() == Sandesha2Constants.MessageTypes.APPLICATION) {
@@ -264,7 +268,7 @@
if (emptyBody) {
if (sequence.getLastMessage() != null) {
- log.debug ("Empty Body LastMessage Received");
+ log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.emptyLastMsg));
drop = true;
if (receivedMsgsBean == null) {
@@ -286,7 +290,7 @@
seqPropMgr.update(receivedMsgsBean);
ApplicationMsgProcessor ackProcessor = new ApplicationMsgProcessor();
- ackProcessor.sendAckIfNeeded(rmMsgContext, receivedMsgStr,storageManager);
+ ackProcessor.sendAckIfNeeded(rmMsgContext, receivedMsgStr, storageManager);
}
}
@@ -311,7 +315,7 @@
// I.e. both not having a op. ctx not and not having a op. ctx
// in the global list.
if (operationContext == null && operationContextFromMap == null) {
- String message = "Dropping duplicate RM message";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.droppingDuplicate);
log.debug(message);
drop = true;
}
@@ -320,21 +324,24 @@
if (drop) {
rmMsgContext.getMessageContext().pause();
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::dropIfDuplicate, true");
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.droppingDuplicate);
+ log.debug(message);
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::dropIfDuplicate, true");
return true;
}
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::dropIfDuplicate, false");
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::dropIfDuplicate, false");
return false;
}
- private void processDroppedMessage(RMMsgContext rmMsgContext, StorageManager storageManager) throws SandeshaException {
- if (log.isDebugEnabled())
- log.debug("Enter: SandeshaGlobalInHandler::processDroppedMessage");
+ private void processDroppedMessage(RMMsgContext rmMsgContext, StorageManager storageManager)
+ throws SandeshaException {
+ if (log.isDebugEnabled())
+ log.debug("Enter: SandeshaGlobalInHandler::processDroppedMessage");
- if (rmMsgContext.getMessageType() == Sandesha2Constants.MessageTypes.APPLICATION) {
+ if (rmMsgContext.getMessageType() == Sandesha2Constants.MessageTypes.APPLICATION) {
Sequence sequence = (Sequence) rmMsgContext.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
String sequenceId = null;
@@ -350,11 +357,11 @@
ApplicationMsgProcessor ackProcessor = new ApplicationMsgProcessor();
// Even though the duplicate message is dropped, hv to send the ack
// if needed.
- ackProcessor.sendAckIfNeeded(rmMsgContext, receivedMsgStr,storageManager);
+ ackProcessor.sendAckIfNeeded(rmMsgContext, receivedMsgStr, storageManager);
}
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaGlobalInHandler::processDroppedMessage");
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaGlobalInHandler::processDroppedMessage");
}
private void doGlobalProcessing(RMMsgContext rmMsgCtx) throws SandeshaException {
@@ -372,9 +379,9 @@
return new QName(Sandesha2Constants.GLOBAL_IN_HANDLER_NAME);
}
- private AxisFault getAxisFaultFromFromSOAPFault(SOAPFault faultPart) {
- AxisFault axisFault = new AxisFault(faultPart.getCode(), faultPart.getReason(),
- faultPart.getNode(), faultPart.getRole(), faultPart.getDetail());
+ private AxisFault getAxisFaultFromFromSOAPFault(SOAPFault faultPart) {
+ AxisFault axisFault = new AxisFault(faultPart.getCode(), faultPart.getReason(), faultPart.getNode(), faultPart
+ .getRole(), faultPart.getDetail());
return axisFault;
}
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java Tue Jul 18 19:58:31 2006
@@ -30,6 +30,8 @@
import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.msgprocessors.MsgProcessor;
import org.apache.sandesha2.msgprocessors.MsgProcessorFactory;
import org.apache.sandesha2.storage.StorageManager;
@@ -46,7 +48,7 @@
private static final long serialVersionUID = 733210926016820857L;
- private static final Log log = LogFactory.getLog(SandeshaInHandler.class.getName());
+ private static final Log log = LogFactory.getLog(SandeshaInHandler.class.getName());
public QName getName() {
return new QName(Sandesha2Constants.IN_HANDLER_NAME);
@@ -54,12 +56,12 @@
public void invoke(MessageContext msgCtx) throws AxisFault {
- if (log.isDebugEnabled())
- log.debug("Enter: SandeshaInHandler::invoke, " + msgCtx.getEnvelope().getHeader());
+ if (log.isDebugEnabled())
+ log.debug("Enter: SandeshaInHandler::invoke, " + msgCtx.getEnvelope().getHeader());
ConfigurationContext context = msgCtx.getConfigurationContext();
if (context == null) {
- String message = "ConfigurationContext is null";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.configContextNotSet);
log.debug(message);
throw new AxisFault(message);
}
@@ -69,14 +71,14 @@
return;
String reinjectedMessage = (String) msgCtx.getProperty(Sandesha2Constants.REINJECTED_MESSAGE);
- if (reinjectedMessage!=null && Sandesha2Constants.VALUE_TRUE.equals(reinjectedMessage))
- {
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaInHandler::invoke, reinjectedMessage" );
- return; //Reinjected messages are not processed by Sandesha2 inflow handlers
- }
-
- StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context,context.getAxisConfiguration());
+ if (reinjectedMessage != null && Sandesha2Constants.VALUE_TRUE.equals(reinjectedMessage)) {
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaInHandler::invoke, reinjectedMessage");
+ return; // Reinjected messages are not processed by Sandesha2 inflow
+ // handlers
+ }
+
+ StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration());
boolean withinTransaction = false;
String withinTransactionStr = (String) msgCtx.getProperty(Sandesha2Constants.WITHIN_TRANSACTION);
@@ -95,7 +97,7 @@
AxisService axisService = msgCtx.getAxisService();
if (axisService == null) {
- String message = "AxisService is null";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.axisServiceIsNull);
log.debug(message);
throw new AxisFault(message);
}
@@ -104,14 +106,13 @@
try {
rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);
} catch (SandeshaException ex) {
- String message = "Cant initialize the message";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotInnitMessage);
log.debug(message);
throw new AxisFault(message);
}
-
-
- //validating the message
- MessageValidator.validateMessage(rmMsgCtx,storageManager);
+
+ // validating the message
+ MessageValidator.validateMessage(rmMsgCtx, storageManager);
MsgProcessor msgProcessor = MsgProcessorFactory.getMessageProcessor(rmMsgCtx);
@@ -119,41 +120,41 @@
if (msgProcessor != null)
msgProcessor.processInMessage(rmMsgCtx);
} catch (SandeshaException se) {
- String message = "Error in processing the message";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.msgError, se.toString());
log.debug(message, se);
throw new AxisFault(message, se);
}
} catch (Exception e) {
- //message should not be sent in a exception situation.
+ // message should not be sent in a exception situation.
msgCtx.pause();
-
+
if (!withinTransaction) {
try {
transaction.rollback();
msgCtx.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
rolebacked = true;
} catch (Exception e1) {
- String message = "Exception thrown when trying to roleback the transaction.";
- log.debug(message,e);
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.rollbackError, e1.toString());
+ log.debug(message, e);
}
}
-
- String message = "Sandesha2 got an exception when processing the in message";
- throw new AxisFault (message,e);
+
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.inMsgError, e.toString());
+ throw new AxisFault(message, e);
} finally {
if (!withinTransaction && !rolebacked) {
try {
transaction.commit();
msgCtx.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
} catch (Exception e) {
- String message = "Exception thrown when trying to commit the transaction.";
- log.debug(message,e);
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.commitError, e.toString());
+ log.debug(message, e);
}
}
}
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaInHandler::invoke" );
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaInHandler::invoke");
}
}
Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=423350&r1=423349&r2=423350&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java Tue Jul 18 19:58:31 2006
@@ -30,6 +30,8 @@
import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.client.SandeshaClientConstants;
+import org.apache.sandesha2.i18n.SandeshaMessageHelper;
+import org.apache.sandesha2.i18n.SandeshaMessageKeys;
import org.apache.sandesha2.msgprocessors.ApplicationMsgProcessor;
import org.apache.sandesha2.msgprocessors.MsgProcessor;
import org.apache.sandesha2.msgprocessors.MsgProcessorFactory;
@@ -46,43 +48,43 @@
public class SandeshaOutHandler extends AbstractHandler {
private static final long serialVersionUID = 8261092322051924103L;
-
- private static final Log log = LogFactory.getLog(SandeshaOutHandler.class.getName());
+
+ private static final Log log = LogFactory.getLog(SandeshaOutHandler.class.getName());
public void invoke(MessageContext msgCtx) throws AxisFault {
- if (log.isDebugEnabled())
- log.debug("Enter: SandeshaOutHandler::invoke, " + msgCtx.getEnvelope().getHeader() );
+ if (log.isDebugEnabled())
+ log.debug("Enter: SandeshaOutHandler::invoke, " + msgCtx.getEnvelope().getHeader());
ConfigurationContext context = msgCtx.getConfigurationContext();
if (context == null) {
- String message = "ConfigurationContext is null";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.configContextNotSet);
log.debug(message);
throw new AxisFault(message);
}
AxisService axisService = msgCtx.getAxisService();
if (axisService == null) {
- String message = "AxisService is null";
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.axisServiceIsNull);
log.debug(message);
throw new AxisFault(message);
}
-
+
String unreliable = (String) msgCtx.getProperty(SandeshaClientConstants.UNRELIABLE_MESSAGE);
- if(null != unreliable && "true".equals(unreliable)) {
- if(log.isDebugEnabled()) log.debug("Exit: SandeshaOutHandler::invoke, Skipping sandesha processing for unreliable message");
+ if (null != unreliable && "true".equals(unreliable)) {
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaOutHandler::invoke, Skipping sandesha processing for unreliable message");
return;
}
String DONE = (String) msgCtx.getProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE);
- if (null != DONE && "true".equals(DONE))
- {
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaOutHandler::invoke, Application processing done");
+ if (null != DONE && "true".equals(DONE)) {
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaOutHandler::invoke, Application processing done");
return;
- }
+ }
msgCtx.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE, "true");
- StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context,context.getAxisConfiguration());
+ StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration());
boolean withinTransaction = false;
String withinTransactionStr = (String) msgCtx.getProperty(Sandesha2Constants.WITHIN_TRANSACTION);
@@ -96,7 +98,7 @@
msgCtx.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_TRUE);
}
boolean rolebacked = false;
-
+
try {
// getting rm message
RMMsgContext rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);
@@ -117,8 +119,8 @@
.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
if (sequencePart != null)
msgProcessor = new ApplicationMsgProcessor();// a rm
- // intended
- // message.
+ // intended
+ // message.
} else if (!msgCtx.isServerSide()) // if client side.
msgProcessor = new ApplicationMsgProcessor();
} else {
@@ -129,36 +131,36 @@
msgProcessor.processOutMessage(rmMsgCtx);
} catch (Exception e) {
- //message should not be sent in a exception situation.
+ // message should not be sent in a exception situation.
msgCtx.pause();
-
- //rolling back the transaction
+
+ // rolling back the transaction
if (!withinTransaction) {
try {
transaction.rollback();
msgCtx.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
rolebacked = true;
} catch (Exception e1) {
- String message = "Exception thrown when trying to roleback the transaction.";
- log.debug(message,e);
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.rollbackError, e1.toString());
+ log.debug(message, e);
}
}
-
- String message = "Sandesha2 got an exception when processing the out message";
- throw new AxisFault (message,e);
+
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.outMsgError, e.toString());
+ throw new AxisFault(message, e);
} finally {
if (!withinTransaction && !rolebacked) {
try {
transaction.commit();
msgCtx.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
} catch (Exception e) {
- String message = "Exception thrown when trying to commit the transaction.";
- log.debug(message,e);
+ String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.commitError, e.toString());
+ log.debug(message, e);
}
}
}
- if (log.isDebugEnabled())
- log.debug("Exit: SandeshaOutHandler::invoke");
+ if (log.isDebugEnabled())
+ log.debug("Exit: SandeshaOutHandler::invoke");
}
public QName getName() {
Added: webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageHelper.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageHelper.java?rev=423350&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageHelper.java (added)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageHelper.java Tue Jul 18 19:58:31 2006
@@ -0,0 +1,174 @@
+package org.apache.sandesha2.i18n;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.apache.axis2.i18n.MessageBundle;
+import org.apache.axis2.i18n.Messages;
+import org.apache.axis2.i18n.ProjectResourceBundle;
+
+public class SandeshaMessageHelper {
+ public static final String projectName = "org.apache.sandesha2".intern();
+ public static final String resourceName = "resource".intern();
+ public static final Locale locale = null;
+ public static final String msgBundleKey = projectName;
+
+ public static final String rootPackageName = "org.apache.sandesha2.i18n".intern();
+
+ public static final ResourceBundle rootBundle =
+ ProjectResourceBundle.getBundle(projectName,
+ rootPackageName,
+ resourceName,
+ locale,
+ SandeshaMessageHelper.class.getClassLoader(),
+ null);
+
+ public static void innit(){
+ MessageBundle bundle = new MessageBundle(
+ projectName,
+ rootPackageName,
+ resourceName,
+ locale,
+ SandeshaMessageHelper.class.getClassLoader(),
+ rootBundle);
+
+ Messages.addMessageBundle(msgBundleKey, bundle);
+ }
+
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @return The formatted message
+ */
+ public static String getMessage(String key)
+ throws MissingResourceException{
+ try{
+ return Messages.getMessageFromBundle(msgBundleKey, key);
+ }
+ catch(MissingResourceException e){
+ throw e;
+ }
+ catch(Exception e){
+ return null;
+ }
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0)
+ throws MissingResourceException{
+ try{
+ return Messages.getMessageFromBundle(msgBundleKey, key, arg0);
+ }
+ catch(MissingResourceException e){
+ throw e;
+ }
+ catch(Exception e){
+ return null;
+ }
+ }
+
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1)
+ throws MissingResourceException{
+ try{
+ return Messages.getMessageFromBundle(msgBundleKey, key, arg0, arg1);
+ }
+ catch(MissingResourceException e){
+ throw e;
+ }
+ catch(Exception e){
+ return null;
+ }
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2)
+ throws MissingResourceException{
+ try{
+ return Messages.getMessageFromBundle(msgBundleKey, key, arg0, arg1, arg2);
+ }
+ catch(MissingResourceException e){
+ throw e;
+ }
+ catch(Exception e){
+ return null;
+ }
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3)
+ throws MissingResourceException{
+ try{
+ return Messages.getMessageFromBundle(msgBundleKey, key, arg0, arg1, arg2, arg3);
+ }
+ catch(MissingResourceException e){
+ throw e;
+ }
+ catch(Exception e){
+ return null;
+ }
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @param arg4 The argument to place in variable {4}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+ throws MissingResourceException{
+ try{
+ return Messages.getMessageFromBundle(msgBundleKey, key, arg0, arg1, arg2, arg3, arg4);
+ }
+ catch(MissingResourceException e){
+ throw e;
+ }
+ catch(Exception e){
+ return null;
+ }
+ }
+
+
+
+
+}
+
Added: webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java?rev=423350&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java (added)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java Tue Jul 18 19:58:31 2006
@@ -0,0 +1,218 @@
+package org.apache.sandesha2.i18n;
+
+public class SandeshaMessageKeys {
+
+
+ public static final String cannotInitInMemoryStorageManager="cannotInitInMemoryStorageManager";
+ public static final String cannotInitPersistentStorageManager="cannotInitPersistentStorageManager";
+ public static final String cannotProceedDueToStorageManager="cannotProceedDueToStorageManager";
+ public static final String cannotGetStorageKey="cannotGetStorageKey";
+ public static final String cannotGetStorageManager="cannotGetStorageManager";
+ public static final String storageManagerMustImplement="storageManagerMustImplement";
+
+ public static final String commitError="commitError";
+ public static final String rollbackError="rollbackError";
+ public static final String inMsgError="inMsgError";
+ public static final String outMsgError="outMsgError";
+ public static final String invokeMsgError="invokeMsgError";
+ public static final String msgError="msgError";
+ public static final String sendMsgError="sendMsgError";
+ public static final String noValidSyncResponse="noValidSyncResponse";
+ public static final String generalError="generalError";
+ public static final String classLoaderNotFound="classLoaderNotFound";
+
+ public static final String defaultPropertyBeanNotSet="defaultPropertyBeanNotSet";
+ public static final String optionsObjectNotSet="optionsObjectNotSet";
+ public static final String serviceContextNotSet="serviceContextNotSet";
+ public static final String sequenceIdBeanNotSet="sequenceIdBeanNotSet";
+ public static final String configContextNotSet="configContextNotSet";
+ public static final String soapEnvNotSet="soapEnvNotSet";
+ public static final String soapBodyNotPresent="soapBodyNotPresent";
+ public static final String unknownSoapVersion="unknownSoapVersion";
+ public static final String axisServiceIsNull="axisServiceIsNull";
+ public static final String msgContextNotSetInbound="msgContextNotSetInbound";
+ public static final String msgContextNotSetOutbound="msgContextNotSetOutbound";
+ public static final String msgContextNotSet="msgContextNotSet";
+ public static final String requestMsgContextNull="requestMsgContextNull";
+ public static final String axisOperationError="axisOperationError";
+ public static final String axisOperationRegisterError="axisOperationRegisterError";
+ public static final String transportOutNotPresent="transportOutNotPresent";
+ public static final String storedKeyNotPresent="storedKeyNotPresent";
+ public static final String invalidQName="invalidQName";
+
+ public static final String dummyCallback="dummyCallback";
+ public static final String cannotFindSequenceID="cannotFindSequenceID";
+ public static final String dummyCallbackError="dummyCallbackError";
+ public static final String setAValidMsgNumber="setAValidMsgNumber";
+ public final static String processTokenMethodError="processTokenMethodError";
+ public final static String policyProcessingException="policyProcessingException";
+ public static final String errorOnTokenStack="errorOnTokenStack";
+ public static final String unknownTokenAbortTran="unknownTokenAbortTran";
+ public static final String commitingUnknownToken="commitingUnknownToken";
+ public static final String cannotStartTransportListenerDueToError="cannotStartTransportListener";
+ public static final String cannotStartListenerForIncommingMsgs="cannotStartListenerForIncommingMsgs";
+ public static final String selectRSNotSupported="selectRSNotSupported";
+ public static final String nonUniqueResult="nonUniqueResult";
+ public static final String invalidStringArray="invalidStringArray";
+ public static final String nextMsgNotSetCorrectly="nextMsgNotSetCorrectly";
+ public static final String invalidNextMsgNumber="invalidNextMsgNumber";
+ public static final String cannotCointinueSender="cannotCointinueSender";
+ public static final String msgContextNotPresentInStorage="msgContextNotPresentInStorage";
+ public static final String sendHasUnavailableMsgEntry="sendHasUnavailableMsgEntry";
+ public static final String cannotInnitMessage="cannotInnitMessage";
+ public static final String propertyInvalidValue="propertyInvalidValue";
+ public static final String couldNotCopyParameters="couldNotCopyParameters";
+
+
+ public static final String rmNamespaceNotMatchSequence="rmNamespaceNotMatchSequence";
+ public static final String wsaNamespaceNotMatchSequence="wsaNamespaceNotMatchSequence";
+ public static final String unknownWSAVersion="unknownWSAVersion";
+ public static final String rmNamespaceMismatch="rmNamespaceMismatch";
+ public static final String emptyAckRequestSpecLevel="emptyAckRequestSpecLevel";
+ public static final String closeSequenceSpecLevel="closeSequenceSpecLevel";
+ public static final String unknownSpec="unknownSpec";
+ public static final String unknownRMNamespace="unknownRMNamespace";
+ public static final String unknownNamespace="unknownNamespace";
+ public static final String cannotDecideRMVersion="cannotDecideRMVersion";
+ public static final String specVersionPropertyNotAvailable="specVersionPropertyNotAvailable";
+ public static final String specVersionNotSet="specVersionNotSet";
+
+ public static final String couldNotSendTerminate="couldNotSendTerminate";
+ public static final String couldNotSendClose="couldNotSendClose";
+ public static final String couldNotSendAck="couldNotSendAck";
+ public static final String couldNotSendTerminateResponse="couldNotSendTerminateResponse";
+ public static final String couldNotSendTerminateSeqNotFound="couldNotSendTerminateSeqNotFound";
+ public static final String couldNotSendFault="couldNotSendFault";
+ public static final String cannotSendAckRequestNotActive="cannotSendAckRequestNotActive";
+ public static final String cannotSendAckRequestException="cannotSendAckRequestException";
+ public static final String cannotCloseSequenceNotActive="cannotCloseSequenceNotActive";
+ public static final String noSequenceEstablished="noSequenceEstablished";
+ public static final String invalidInternalSequenceID="invalidInternalSequenceID";
+ public static final String tempNotSetOnReceivedMsg="tempNotSetOnReceivedMsg";
+ public static final String completedMsgBeanIsNull="completedMsgBeanIsNull";
+ public static final String internalSeqBeanNotAvailableOnSequence="internalSeqBeanNotAvailableOnSequence";
+ public static final String createSeqEntryNotFound="createSeqEntryNotFound";
+
+ public static final String toEPRNotValid="toEPRNotValid";
+ public static final String noWSAACtionValue="noWSAACtionValue";
+ public static final String cannotFindSequence="cannotFindSequence";
+ public static final String notValidTerminate="notValidTerminate";
+ public static final String notValidTimeOut="notValidTimeOut";
+ public static final String cannotFindAcksTo="cannotFindAcksTo";
+ public static final String droppingDuplicate="droppingDuplicate";
+ public static final String cannotAcceptMsgAsSequenceClosed="cannotAcceptMsgAsSequenceClosed";
+ public static final String msgNumberMustBeLargerThanZero="msgNumberMustBeLargerThanZero";
+ public static final String msgNumberLargerThanLastMsg="msgNumberLargerThanLastMsg";
+ public static final String msgNumberNotLargerThanLastMsg="msgNumberNotLargerThanLastMsg";
+ public static final String outMsgHasNoEnvelope="outMsgHasNoEnvelope";
+ public static final String msgNumberExceededLastMsgNo="msgNumberExceededLastMsgNo";
+ public static final String ackInvalid="ackInvalid";
+ public static final String highestMsgKeyNotStored="highestMsgKeyNotStored";
+ public static final String cannotHaveFinalWithNack="cannotHaveFinalWithNack";
+ public static final String accptButNoSequenceOffered="accptButNoSequenceOffered";
+ public static final String relatesToNotAvailable="relatesToNotAvailable";
+ public static final String cannotDerriveAckInterval="cannotDerriveAckInterval";
+ public static final String cannotDerriveRetransInterval="cannotDerriveRetransInterval";
+ public static final String cannotDerriveInactivityTimeout="cannotDerriveInactivityTimeout";
+ public static final String noCreateSeqParts="noCreateSeqParts";
+ public static final String noAcceptPart="noAcceptPart";
+ public static final String noAcksToPartInCreateSequence="noAcksToPartInCreateSequence";
+ public static final String tempSeqIdNotSet="tempSeqIdNotSet";
+ public static final String ackRandDoesNotHaveCorrectValues="ackRandDoesNotHaveCorrectValues";
+ public static final String cannotSetAckRangeNullElement="cannotSetAckRangeNullElement";
+ public static final String completedMessagesNull="completedMessagesNull";
+ public static final String emptyLastMsg="emptyLastMsg";
+ public static final String acksToStrNotSet="acksToStrNotSet";
+ public static final String invalidSequenceID="invalidsequenceID";
+
+ public static final String noCreateSeqResponse="noCreateSeqResponse";
+ public static final String noTerminateSeqPart="noTerminateSeqPart";
+ public static final String noNackInSeqAckPart="noNackInSeqAckPart";
+ public static final String nackDoesNotContainValidLongValue="nackDoesNotContainValidLongValue";
+ public static final String cannotSetNackElemnt="cannotSetNackElemnt";
+ public static final String seqAckPartIsNull="seqAckPartIsNull";
+ public static final String cannotAddSequencePartNullMsgNumber="cannotAddSequencePartNullMsgNumber";
+ public static final String cannotSetSeqAck="cannotSetSeqAck";
+ public static final String noneNotAllowedNamespace="noneNotAllowedNamespace";
+ public static final String noneNotAllowedAckRangesPresent="noneNotAllowedAckRangesPresent";
+ public static final String noneNotAllowedNackPresent="noneNotAllowedNackPresent";
+ public static final String finalNotAllowedNamespace="finalNotAllowedNamespace";
+ public static final String noFaultCodeNullElement="noFaultCodeNullElement";
+ public static final String noSeqFaultInElement="noSeqFaultInElement";
+ public static final String noSeqOfferInElement="noSeqOfferInElement";
+ public static final String noCreateSeqInElement="noCreateSeqInElement";
+ public static final String noTerminateSeqInElement="noTerminateSeqInElement";
+ public static final String noTerminateSeqResponseInElement="noTerminateSeqResponseInElement";
+ public static final String noAcceptPartInElement="noAcceptPartInElement";
+ public static final String noUpperOrLowerAttributesInElement="noUpperOrLowerAttributesInElement";
+ public static final String noSequencePartInElement="noSequencePartInElement";
+ public static final String noLastMessagePartInElement="noLastMessagePartInElement";
+ public static final String noFinalPartInElement="noFinalPartInElement";
+ public static final String noNonePartInElement="noNonePartInElement";
+ public static final String noCloseSequencePartInElement="noCloseSequencePartInElement";
+ public static final String noMessageNumberPartInElement="noMessageNumberPartInElement";
+ public static final String noCloseSeqResponsePartInElement="noCloseSeqResponsePartInElement";
+ public static final String noExpiresPartInElement="noExpiresPartInElement";
+ public static final String noCreateSeqPartInElement="noCreateSeqPartInElement";
+ public static final String noAckRequestedPartInElement="noAckRequestedPartInElement";
+ public static final String noCreateSeqResponsePartInElement="noCreateSeqResponsePartInElement";
+ public static final String noFaultCodePart="noFaultCodePart";
+ public static final String cannotFindAddressElement="cannotFindAddressElement";
+ public static final String cannotFindAddressText="cannotFindAddressText";
+ public static final String nullPassedElement="nullPassedElement";
+ public static final String noAckRequestedElement="noAckRequestedElement";
+ public static final String invalidAckMessageEntry="invalidAckMessageEntry";
+ public static final String seqPartIsNull="seqPartIsNull";
+ public static final String incomingSequenceNotValidID="incomingSequenceNotValidID";
+
+ public static final String seqFaultCannotBeExtractedToNonHeader="seqFaultCannotBeExtractedToNonHeader";
+ public static final String seqElementCannotBeAddedToNonHeader="seqElementCannotBeAddedToNonHeader";
+ public static final String ackRequestedCannotBeAddedToNonHeader="ackRequestedCannotBeAddedToNonHeader";
+ public static final String terminateSeqCannotBeAddedToNonBody="terminateSeqCannotBeAddedToNonBody";
+ public static final String terminateSeqResponseCannotBeAddedToNonBody="terminateSeqResponseCannotBeAddedToNonBody";
+ public static final String closeSeqCannotBeAddedToNonBody="closeSeqCannotBeAddedToNonBody";
+ public static final String closeSeqCannotBeExtractedFromNonBody="closeSeqCannotBeExtractedFromNonBody";
+ public static final String closeSeqResponseCannotBeAddedToNonBody="closeSeqResponseCannotBeAddedToNonBody";
+ public static final String createSeqCannotBeAddedToNonBody="createSeqCannotBeAddedToNonBody";
+ public static final String createSeqResponseCannotBeAddedToNonBody="createSeqResponseCannotBeAddedToNonBody";
+ public static final String seqOfferNullID="seqOfferNullID";
+ public static final String terminateSequence="terminateSequence";
+ public static final String terminateSeqResponseNullID="terminateSeqResponseNullID";
+ public static final String sequencePartNullID="sequencePartNullID";
+ public static final String closeSeqPartNullID="closeSeqPartNullID";
+ public static final String invalidIdentifier="invalidIdentifier";
+ public static final String closeSeqResponsePartNullID="closeSeqResponsePartNullID";
+ public static final String ackRequestNullID="ackRequestNullID";
+ public static final String createSeqNullAcksTo="createSeqNullAcksTo";
+ public static final String acceptNullAcksTo="acceptNullAcksTo";
+ public static final String noAcksToPart="noAcksToPart";
+ public static final String cannotProcessExpires="cannotProcessExpires";
+ public static final String noFaultCode="noFaultCode";
+ public static final String seqAckNonHeader="seqAckNonHeader";
+
+ public static final String cannotSetACksTo="cannotSetACksTo";
+ public static final String invalidMsgNumber="invalidMsgNumber";
+ public static final String addressNotValid="addressNotValid";
+
+ public static final String incommingSequenceReportNotFound="incommingSequenceReportNotFound";
+ public static final String cannotGenerateReport="cannotGenerateReport";
+ public static final String cannotFindReportForGivenData="cannotFindReportForGivenData";
+ public static final String cannotGenerateReportNonUniqueSequence="cannotGenerateReportNonUniqueSequence";
+
+ public static final String outSeqIDIsNull="outSeqIDIsNull";
+ public static final String requestMsgNotPresent="requestMsgNotPresent";
+ public static final String requestSeqIsNull="requestSeqIsNull";
+ public static final String newSeqIdIsNull="newSeqIdIsNull";
+ public static final String unavailableAppMsg="unavailableAppMsg";
+ public static final String terminateAddedPreviously="terminateAddedPreviously";
+ public static final String maximumRetransmissionCountProcessor="maximumRetransmissionCountProcessor";
+ public static final String nullMsgId="nullMsgId";
+ public static final String storageMapNotPresent="storageMapNotPresent";
+ public static final String entryNotPresentForUpdating="entryNotPresentForUpdating";
+ public static final String appMsgIsNull="appMsgIsNull";
+ public static final String terminateOpperationIsNull="terminateOpperationIsNull";
+ public static final String invalidMsgNumberList="invalidMsgNumberList";
+ public static final String cannotFindReqMsgFromOpContext="cannotFindReqMsgFromOpContext";
+
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org