summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-04-26 12:07:39 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-04-26 12:07:39 +0000
commit6c95938049df206e3d80fc5aa477f9565e97dba6 (patch)
tree2135148fa9e6a5be7c675b346c083c4a5715230b /branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache
parent9128938679b150f3f1d00743e090fd145225e0ca (diff)
TUSCANY-2987, TUSCANY-2964. Rename operation selector that allows the user to specify which message property holds the operation name. Add tests cases for this and the default selector. Rename default selector to be all lowers case (it's still in the Tuscany namespace though)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@768695 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache')
-rw-r--r--branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropProviderFactory.java (renamed from branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropProviderFactory.java)7
-rw-r--r--branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropServiceInterceptor.java (renamed from branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropServiceInterceptor.java)10
-rw-r--r--branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropServiceProvider.java (renamed from branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropServiceProvider.java)2
3 files changed, 10 insertions, 9 deletions
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropProviderFactory.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropProviderFactory.java
index a7692ba87a..49ad6add50 100644
--- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropProviderFactory.java
+++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropProviderFactory.java
@@ -17,13 +17,10 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.jms.operationselector.userprop.runtime;
+package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.runtime;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.operationselector.userprop.OperationSelectorJMSUserProp;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryExtensionPoint;
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.OperationSelectorJMSUserProp;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.provider.OperationSelectorProvider;
import org.apache.tuscany.sca.provider.OperationSelectorProviderFactory;
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropServiceInterceptor.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropServiceInterceptor.java
index 0436b2c484..272a0a3c21 100644
--- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropServiceInterceptor.java
+++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropServiceInterceptor.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.binding.jms.operationselector.userprop.runtime;
+package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.runtime;
import java.util.List;
@@ -25,7 +25,7 @@ import javax.jms.JMSException;
import org.apache.tuscany.sca.binding.jms.context.JMSBindingContext;
import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
-import org.apache.tuscany.sca.binding.jms.operationselector.userprop.OperationSelectorJMSUserProp;
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.OperationSelectorJMSUserProp;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Interceptor;
import org.apache.tuscany.sca.invocation.Invoker;
@@ -74,7 +74,7 @@ public class OperationSelectorJMSUserPropServiceInterceptor implements Intercept
protected Operation getTargetOperation(javax.jms.Message jmsMsg) {
String operationName = null;
- String opSelectorPropertyName =operationSelector.getPropertyName();
+ String opSelectorPropertyName = operationSelector.getPropertyName();
try {
operationName = jmsMsg.getStringProperty(opSelectorPropertyName);
@@ -82,6 +82,10 @@ public class OperationSelectorJMSUserPropServiceInterceptor implements Intercept
throw new JMSBindingException(e);
}
+ if (operationName == null){
+ throw new JMSBindingException("Property " + opSelectorPropertyName + " not found in message header");
+ }
+
for (Operation op : serviceOperations) {
if (op.getName().equals(operationName)) {
return op;
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropServiceProvider.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropServiceProvider.java
index 740c4b19d1..ece54f5974 100644
--- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/userprop/runtime/OperationSelectorJMSUserPropServiceProvider.java
+++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/runtime/OperationSelectorJMSUserPropServiceProvider.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.jms.operationselector.userprop.runtime;
+package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.runtime;
import org.apache.tuscany.sca.assembly.Binding;
import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;