summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-15 20:56:35 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-15 20:56:35 +0000
commit7eebc571e4e502003f47967069ad273ad63ac363 (patch)
tree127c87d256e31996a7d1f65610379e80716b074d /branches/sca-equinox/modules
parentc97a45a13aee9f28e98d8709e59302bd0e9d99a3 (diff)
Restrict Export-Package and refactor some internal classes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@705041 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules')
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/pom.xml2
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java6
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java6
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java6
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java2
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java6
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java6
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java4
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java4
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/ObjectMessageProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/TextMessageProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/XMLTextMessageProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-jms-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory2
-rw-r--r--branches/sca-equinox/modules/binding-jms/pom.xml2
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java241
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingException.java (renamed from branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingException.java)2
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingFactory.java31
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingFactoryImpl.java34
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingImpl.java (renamed from branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java)7
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/xml/JMSBindingConstants.java (renamed from branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java)2
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/xml/JMSBindingProcessor.java (renamed from branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java)9
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.jms.JMSBindingFactory17
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor2
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessorTestCase.java10
24 files changed, 371 insertions, 42 deletions
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/pom.xml b/branches/sca-equinox/modules/binding-jms-runtime/pom.xml
index 75224861a5..ea751f349f 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/pom.xml
+++ b/branches/sca-equinox/modules/binding-jms-runtime/pom.xml
@@ -126,7 +126,7 @@
<Bundle-Version>${tuscany.version}</Bundle-Version>
<Bundle-SymbolicName>org.apache.tuscany.sca.binding.jms.runtime</Bundle-SymbolicName>
<Bundle-Description>${pom.name}</Bundle-Description>
- <Export-Package>org.apache.tuscany.sca.binding.jms.provider*</Export-Package>
+ <Export-Package>org.apache.tuscany.sca.binding.jms.provider</Export-Package>
</instructions>
</configuration>
</plugin>
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
index 2fcb07a07f..398b364c13 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
@@ -23,9 +23,9 @@ import javax.jms.Message;
import javax.jms.ObjectMessage;
import javax.jms.Session;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
import org.osoa.sca.ServiceRuntimeException;
/**
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
index a14e2bd018..51166e5b30 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
@@ -30,9 +30,9 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.naming.NamingException;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
index 1990e553e0..07a617bc6c 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
@@ -34,9 +34,9 @@ import javax.jms.Topic;
import javax.naming.NamingException;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
import org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl;
import org.apache.tuscany.sca.core.invocation.MessageImpl;
import org.apache.tuscany.sca.interfacedef.Operation;
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java
index e0cd756849..0fe28e5a0f 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.binding.jms.provider;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.provider.BindingProviderFactory;
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
index 4266a6c7c8..901eb42650 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
@@ -25,9 +25,9 @@ import java.util.List;
import javax.jms.JMSException;
import org.apache.axiom.om.OMElement;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
index 7db640b7d1..9c391bacf9 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
@@ -33,9 +33,9 @@ import javax.naming.NamingException;
import org.apache.axiom.om.OMElement;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java
index 699b1cb176..09fe7310e6 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java
@@ -21,8 +21,8 @@ package org.apache.tuscany.sca.binding.jms.provider;
import java.lang.reflect.Constructor;
-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.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
/**
* Utility methods to load JMS message processors.
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
index a1308d98cf..6cf69abe5b 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
@@ -29,8 +29,8 @@ import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
/**
* Abstracts away any JMS provide specific feature from the JMS binding
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/ObjectMessageProcessor.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/ObjectMessageProcessor.java
index e9ae3cecaa..477ec2c2ae 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/ObjectMessageProcessor.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/ObjectMessageProcessor.java
@@ -25,8 +25,8 @@ import javax.jms.Message;
import javax.jms.ObjectMessage;
import javax.jms.Session;
-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.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
/**
* MessageProcessor for sending/receiving Serializable objects with the JMSBinding.
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/TextMessageProcessor.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/TextMessageProcessor.java
index d8490c6223..32d024ec32 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/TextMessageProcessor.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/TextMessageProcessor.java
@@ -23,8 +23,8 @@ import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;
-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.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
/**
* MessageProcessor for sending/receiving javax.jms.TextMessage with the JMSBinding.
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/XMLTextMessageProcessor.java b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/XMLTextMessageProcessor.java
index 88dd41cc57..6e5556df01 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/XMLTextMessageProcessor.java
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/XMLTextMessageProcessor.java
@@ -30,8 +30,8 @@ import javax.xml.stream.XMLStreamReader;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-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.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
/**
* MessageProcessor for sending/receiving XML javax.jms.TextMessage with the JMSBinding.
diff --git a/branches/sca-equinox/modules/binding-jms-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/branches/sca-equinox/modules/binding-jms-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
index dec0991984..4cb8e90b7a 100644
--- a/branches/sca-equinox/modules/binding-jms-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
+++ b/branches/sca-equinox/modules/binding-jms-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
@@ -16,4 +16,4 @@
# under the License.
# Implementation class for the binding extension
-org.apache.tuscany.sca.binding.jms.provider.JMSBindingProviderFactory;model=org.apache.tuscany.sca.binding.jms.impl.JMSBinding
+org.apache.tuscany.sca.binding.jms.provider.JMSBindingProviderFactory;model=org.apache.tuscany.sca.binding.jms.JMSBinding
diff --git a/branches/sca-equinox/modules/binding-jms/pom.xml b/branches/sca-equinox/modules/binding-jms/pom.xml
index e7dd413a78..7726c41098 100644
--- a/branches/sca-equinox/modules/binding-jms/pom.xml
+++ b/branches/sca-equinox/modules/binding-jms/pom.xml
@@ -56,7 +56,7 @@
<Bundle-Version>${tuscany.version}</Bundle-Version>
<Bundle-SymbolicName>org.apache.tuscany.sca.binding.jms</Bundle-SymbolicName>
<Bundle-Description>${pom.name}</Bundle-Description>
- <Export-Package>org.apache.tuscany.sca.binding.jms*</Export-Package>
+ <Export-Package>org.apache.tuscany.sca.binding.jms</Export-Package>
</instructions>
</configuration>
</plugin>
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java
new file mode 100644
index 0000000000..ddc41a463a
--- /dev/null
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java
@@ -0,0 +1,241 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tuscany.sca.binding.jms;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tuscany.sca.assembly.Binding;
+
+/**
+ * Models a binding to a JMS resource.
+ *
+ * @version $Rev$ $Date$
+ */
+
+public interface JMSBinding extends Binding {
+
+ public Object clone() throws CloneNotSupportedException;
+
+ /**
+ * Returns the binding URI.
+ *
+ * @return the binding URI
+ */
+ public String getURI();
+
+ /**
+ * Sets the binding URI.
+ *
+ * @param uri the binding URI
+ */
+ public void setURI(String uri);
+
+ /**
+ * Returns the binding name.
+ *
+ * @return the binding name
+ */
+ public String getName();
+
+ /**
+ * Sets the binding name.
+ *
+ * @param name the binding name
+ */
+ public void setName(String name);
+
+ public boolean isUnresolved();
+
+ public void setUnresolved(boolean unresolved);
+
+ public List<Object> getExtensions();
+
+ // Methods for getting/setting JMS binding model information
+ // as derived from the XML of the binding.jms element
+
+ public void setCorrelationScheme(String correlationScheme);
+
+ public String getCorrelationScheme();
+
+ public String getInitialContextFactoryName();
+
+ public void setInitialContextFactoryName(String initialContextFactoryName);
+
+ public String getJndiURL();
+
+ public void setJndiURL(String jndiURL);
+
+ public String getDestinationName();
+
+ public void setDestinationName(String destinationName);
+
+ public String getDestinationType();
+
+ public void setDestinationType(String destinationType);
+
+ public String getDestinationCreate();
+
+ public void setDestinationCreate(String create);
+
+ public String getConnectionFactoryName();
+
+ public void setConnectionFactoryName(String connectionFactoryName);
+
+ public String getConnectionFactoryCreate();
+
+ public void setConnectionFactoryCreate(String create);
+
+ public String getActivationSpecName();
+
+ public void setActivationSpecName(String activationSpecName);
+
+ public String getActivationSpecCreate();
+
+ public void setActivationSpecCreate(String create);
+
+ public String getResponseDestinationName();
+
+ public void setResponseDestinationName(String name);
+
+ public String getResponseDestinationType();
+
+ public void setResponseDestinationType(String type);
+
+ public String getResponseDestinationCreate();
+
+ public void setResponseDestinationCreate(String create);
+
+ public String getResponseConnectionFactoryName();
+
+ public void setResponseConnectionFactoryName(String connectionFactoryName);
+
+ public String getResponseConnectionFactoryCreate();
+
+ public void setResponseConnectionFactoryCreate(String create);
+
+ public String getResponseActivationSpecName();
+
+ public void setResponseActivationSpecName(String activationSpecName);
+
+ public String getResponseActivationSpecCreate();
+
+ public void setResponseActivationSpecCreate(String create);
+
+ public String getJmsResourceFactoryName();
+
+ public void setJmsResourceFactoryName(String jmsResourceFactoryName);
+
+ public void setRequestMessageProcessorName(String name);
+
+ public String getRequestMessageProcessorName();
+
+ public void setResponseMessageProcessorName(String name);
+
+ public String getResponseMessageProcessorName();
+
+ public String getOperationSelectorPropertyName();
+
+ public void setOperationSelectorPropertyName(String operationSelectorPropertyName);
+
+ public String getOperationSelectorName();
+
+ public void setOperationSelectorName(String operationSelectorName);
+
+ public String getReplyTo();
+
+ public void setReplyTo(String replyTo);
+
+ public String getJMSType();
+
+ public void setJMSType(String jmsType);
+
+ public String getJMSCorrelationId();
+
+ public void setJMSCorrelationId(String jmsCorrelationId);
+
+ public Boolean isdeliveryModePersistent();
+
+ public void setJMSDeliveryMode(boolean persistent);
+
+ public Integer getJMSPriority();
+
+ public void setJMSPriority(int jmsPriority);
+
+ public Long getJMSTimeToLive();
+
+ public void setJMSTimeToLive(long timeToLive);
+
+ public Set<String> getPropertyNames();
+
+ public Object getProperty(String name);
+
+ public void setProperty(String name, Object value);
+
+ public Map<String, Object> getOperationProperties(String opName);
+
+ public void setOperationProperty(String opName, String propName, Object value);
+
+ public boolean hasNativeOperationName(String opName);
+
+ public String getNativeOperationName(String opName);
+
+ public void setNativeOperationName(String opName, String nativeOpName);
+
+ public String getOperationJMSType(String opName);
+
+ public void setOperationJMSType(String opName, String jmsType);
+
+ public String getOperationJMSCorrelationId(String opName);
+
+ public void setOperationJMSCorrelationId(String opName, String jmsCorrelationId);
+
+ public Boolean getOperationJMSDeliveryMode(String opName);
+
+ public void setOperationJMSDeliveryMode(String opName, boolean b);
+
+ public Long getOperationJMSTimeToLive(String opName);
+
+ public void setOperationJMSTimeToLive(String opName, Long ttl);
+
+ public Integer getOperationJMSPriority(String opName);
+
+ public void setOperationJMSPriority(String opName, int p);
+
+ public String getJMSSelector();
+
+ public void setJMSSelector(String jmsSelector);
+
+ public String getRequestConnectionName();
+
+ public void setRequestConnectionName(String requestConnectionName);
+
+ public void setResponseConnectionName(String responseConnectionName);
+
+ public String getResponseConnectionName();
+
+ public void setRequestConnectionBinding(JMSBinding binding);
+
+ public JMSBinding getRequestConnectionBinding();
+
+ public void setResponseConnectionBinding(JMSBinding binding);
+
+ public JMSBinding getResponseConnectionBinding();
+}
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingException.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingException.java
index 0928e02082..74f030ca21 100644
--- a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingException.java
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingException.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.binding.jms.impl;
+package org.apache.tuscany.sca.binding.jms;
/**
* Base exception for the JMSBinding.
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingFactory.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingFactory.java
new file mode 100644
index 0000000000..d96dadf8c5
--- /dev/null
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingFactory.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tuscany.sca.binding.jms;
+
+/**
+ * Factroy interface to create JMSBinding model
+ *
+ */
+public interface JMSBindingFactory {
+ /**
+ * Create an instance of JMSBinding
+ * @return A new instance of JMSBinding
+ */
+ JMSBinding createJMSBinding();
+}
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingFactoryImpl.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingFactoryImpl.java
new file mode 100644
index 0000000000..b67ee97eb3
--- /dev/null
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingFactoryImpl.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tuscany.sca.binding.jms.impl;
+
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingFactory;
+
+/**
+ * Default implementation of JMSBindingFactory
+ *
+ */
+public class JMSBindingFactoryImpl implements JMSBindingFactory {
+
+ public JMSBinding createJMSBinding() {
+ return new JMSBindingImpl();
+ }
+
+}
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingImpl.java
index bd493bb658..b6bb6fe67c 100644
--- a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingImpl.java
@@ -24,7 +24,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
/**
* Models a binding to a JMS resource.
@@ -32,7 +33,7 @@ import org.apache.tuscany.sca.assembly.Binding;
* @version $Rev$ $Date$
*/
-public class JMSBinding implements Binding {
+public class JMSBindingImpl implements JMSBinding {
@Override
public Object clone() throws CloneNotSupportedException {
@@ -105,7 +106,7 @@ public class JMSBinding implements Binding {
private JMSBinding requestConnectionBinding;
private JMSBinding responseConnectionBinding;
- public JMSBinding() {
+ public JMSBindingImpl() {
super();
}
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/xml/JMSBindingConstants.java
index 7317c2118d..e299e54cbe 100644
--- a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/xml/JMSBindingConstants.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.binding.jms.impl;
+package org.apache.tuscany.sca.binding.jms.xml;
import java.util.Arrays;
import java.util.List;
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/xml/JMSBindingProcessor.java
index 3990a55b96..6b39a9d8d1 100644
--- a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/xml/JMSBindingProcessor.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.jms.impl;
+package org.apache.tuscany.sca.binding.jms.xml;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
@@ -32,6 +32,9 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.JMSBindingFactory;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
@@ -118,10 +121,12 @@ public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
private PolicyFactory policyFactory;
private PolicyAttachPointProcessor policyProcessor;
private Monitor monitor;
+ private JMSBindingFactory jmsBindingFactory;
public JMSBindingProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
+ this.jmsBindingFactory = modelFactories.getFactory(JMSBindingFactory.class);
this.monitor = monitor;
}
@@ -162,7 +167,7 @@ public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
}
public JMSBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- JMSBinding jmsBinding = new JMSBinding();
+ JMSBinding jmsBinding = jmsBindingFactory.createJMSBinding();
// Read policies
policyProcessor.readPolicies(jmsBinding, reader);
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.jms.JMSBindingFactory b/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.jms.JMSBindingFactory
new file mode 100644
index 0000000000..f2d2c4bce1
--- /dev/null
+++ b/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.jms.JMSBindingFactory
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+org.apache.tuscany.sca.binding.jms.impl.JMSBindingFactoryImpl \ No newline at end of file
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
index ac37a0f26b..97f1cc50be 100644
--- a/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ b/branches/sca-equinox/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -16,4 +16,4 @@
# under the License.
# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.binding.jms.impl.JMSBindingProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#binding.jms,model=org.apache.tuscany.sca.binding.jms.impl.JMSBinding
+org.apache.tuscany.sca.binding.jms.xml.JMSBindingProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#binding.jms,model=org.apache.tuscany.sca.binding.jms.JMSBinding
diff --git a/branches/sca-equinox/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessorTestCase.java b/branches/sca-equinox/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessorTestCase.java
index 82fd6a5149..6d59e41534 100644
--- a/branches/sca-equinox/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessorTestCase.java
+++ b/branches/sca-equinox/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessorTestCase.java
@@ -148,7 +148,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE));
Composite composite = (Composite)staxProcessor.read(reader);
- JMSBinding binding = (JMSBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
+ JMSBindingImpl binding = (JMSBindingImpl) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
assertNotNull(binding);
assertEquals("testQueue", binding.getDestinationName());
@@ -158,7 +158,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(HEADERS1));
Composite composite = (Composite)staxProcessor.read(reader);
- JMSBinding binding = (JMSBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
+ JMSBindingImpl binding = (JMSBindingImpl) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
assertNotNull(binding);
assertEquals("myType", binding.getJMSType());
@@ -172,7 +172,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(PROPERTIES1));
Composite composite = (Composite)staxProcessor.read(reader);
- JMSBinding binding = (JMSBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
+ JMSBindingImpl binding = (JMSBindingImpl) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
assertNotNull(binding);
assertEquals("bla", binding.getProperty("p1"));
@@ -183,7 +183,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(OP_PROPERTIES1));
Composite composite = (Composite)staxProcessor.read(reader);
- JMSBinding binding = (JMSBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
+ JMSBindingImpl binding = (JMSBindingImpl) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
assertNotNull(binding);
@@ -202,7 +202,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(SELECTOR));
Composite composite = (Composite)staxProcessor.read(reader);
- JMSBinding binding = (JMSBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
+ JMSBindingImpl binding = (JMSBindingImpl) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
assertNotNull(binding);