You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2008/01/02 21:35:17 UTC
svn commit: r608212 [1/2] - in
/incubator/tuscany/java/sca/modules/binding-jms/src:
main/java/org/apache/tuscany/sca/binding/jms/
main/java/org/apache/tuscany/sca/binding/jms/impl/
main/java/org/apache/tuscany/sca/binding/jms/provider/ test/java/org/ap...
Author: antelder
Date: Wed Jan 2 12:35:15 2008
New Revision: 608212
URL: http://svn.apache.org/viewvc?rev=608212&view=rev
Log:
Format the code, no other changes
Modified:
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ActivationSpec.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ConnectionFactory.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/CreateResource.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Destination.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/DestinationType.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Headers.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/OperationProperties.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ResourceAdapter.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessor.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorImpl.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryActiveMQImpl.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSTestCaseFIXME.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/OperationSelectionTestCase.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/mock/MockJMSResourceFactory.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/mock/MockJMSResourceFactoryQueueExist.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/mock/MockJMSResourceFactoryQueueNotExist.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceQueueCreateModeTestCase.java
incubator/tuscany/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceQueueCreateModeTestCase.java
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ActivationSpec.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ActivationSpec.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ActivationSpec.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ActivationSpec.java Wed Jan 2 12:35:15 2008
@@ -24,7 +24,10 @@
*/
public interface ActivationSpec extends PropertyList {
String getName();
+
void setName(String name);
+
CreateResource getCreate();
+
void setCreate(CreateResource create);
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ConnectionFactory.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ConnectionFactory.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ConnectionFactory.java Wed Jan 2 12:35:15 2008
@@ -20,12 +20,14 @@
package org.apache.tuscany.sca.binding.jms;
/**
- *
* @version $Rev$ $Date$
*/
public interface ConnectionFactory extends PropertyList {
String getName();
+
void setName(String name);
+
CreateResource getCreate();
+
void setCreate(CreateResource create);
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/CreateResource.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/CreateResource.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/CreateResource.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/CreateResource.java Wed Jan 2 12:35:15 2008
@@ -20,10 +20,9 @@
package org.apache.tuscany.sca.binding.jms;
/**
- * Indicates whether the destination should be created when the containing composite is
- * deployed. Valid values are "always", "never" and "ifnotexist". The default value is
- * "ifnotexist". If "always" is specified and the corresponding resource already exists,
- * then this should be considered an error
+ * Indicates whether the destination should be created when the containing composite is deployed. Valid values are
+ * "always", "never" and "ifnotexist". The default value is "ifnotexist". If "always" is specified and the corresponding
+ * resource already exists, then this should be considered an error
*
* @version $Rev$ $Date$
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Destination.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Destination.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Destination.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Destination.java Wed Jan 2 12:35:15 2008
@@ -20,15 +20,14 @@
package org.apache.tuscany.sca.binding.jms;
/**
- * Identifies the destination that is to be used to process requests/responses by this
- * binding.
+ * Identifies the destination that is to be used to process requests/responses by this binding.
*
* @version $Rev$ $Date$
*/
public interface Destination extends PropertyList {
/**
- * The name of the destination to which the binding is connected. This may be a JNDI
- * name or a plain destination name
+ * The name of the destination to which the binding is connected. This may be a JNDI name or a plain destination
+ * name
*
* @return
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/DestinationType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/DestinationType.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/DestinationType.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/DestinationType.java Wed Jan 2 12:35:15 2008
@@ -20,9 +20,8 @@
package org.apache.tuscany.sca.binding.jms;
/**
- * The type of the request destination. Must take one of the values "queue" or "topic".
- * The default value is "queue". When "topic" is specified, then all the operations in
- * the interface that corresponds to the binding must be one-way.
+ * The type of the request destination. Must take one of the values "queue" or "topic". The default value is "queue".
+ * When "topic" is specified, then all the operations in the interface that corresponds to the binding must be one-way.
*
* @version $Rev$ $Date$
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Headers.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Headers.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Headers.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/Headers.java Wed Jan 2 12:35:15 2008
@@ -20,9 +20,8 @@
package org.apache.tuscany.sca.binding.jms;
/**
- * this element allows JMS headers to be set to the given values for all
- * operations. These values apply to requests from a reference and responses
- * from a service.
+ * this element allows JMS headers to be set to the given values for all operations. These values apply to requests from
+ * a reference and responses from a service.
*
* @version $Rev$ $Date$
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBinding.java Wed Jan 2 12:35:15 2008
@@ -23,18 +23,15 @@
import org.apache.tuscany.sca.assembly.Extensible;
/**
- * This is the generic JMS binding type. The type is extensible so that JMS
- * binding implementers can add additional JMS provider-specific attributes and
- * elements although such extensions are not guaranteed to be portable across
- * runtimes.
+ * This is the generic JMS binding type. The type is extensible so that JMS binding implementers can add additional JMS
+ * provider-specific attributes and elements although such extensions are not guaranteed to be portable across runtimes.
*
* @version $Rev$ $Date$
*/
public interface JMSBinding extends Binding, Extensible {
/**
- * Identifies the correlation scheme used when sending reply or callback
- * messages. Valid values are "RequestMsgIDToCorrelID" (the default),
- * "RequestCorrelIDToCorrelID", and "None".
+ * Identifies the correlation scheme used when sending reply or callback messages. Valid values are
+ * "RequestMsgIDToCorrelID" (the default), "RequestCorrelIDToCorrelID", and "None".
*
* @return
*/
@@ -61,11 +58,9 @@
void setJndiURL(String jndiURL);
/**
- * identifies a binding.jms element that is present in a definition
- * document, whose destination, connectionFactory, activationSpec and
- * resourceAdapter children are used to define the values for this binding.
- * In this case the corresponding elements must not be present within this
- * binding element
+ * identifies a binding.jms element that is present in a definition document, whose destination, connectionFactory,
+ * activationSpec and resourceAdapter children are used to define the values for this binding. In this case the
+ * corresponding elements must not be present within this binding element
*
* @return
*/
@@ -74,10 +69,9 @@
void setRequestConnection(ConnectionInfo requestConnection);
/**
- * identifies a binding.jms element that is present in a definition
- * document, whose response child element is used to define the values for
- * this binding. In this case no response element must be present within
- * this binding element
+ * identifies a binding.jms element that is present in a definition document, whose response child element is used
+ * to define the values for this binding. In this case no response element must be present within this binding
+ * element
*
* @return
*/
@@ -86,10 +80,9 @@
void setResponseConnection(ConnectionInfo responseConnection);
/**
- * identifies a binding.jms element that is present in a definition
- * document, whose operationProperties children are used to define the
- * values for this binding. In this case no operationProperties elements
- * must be present within this binding element
+ * identifies a binding.jms element that is present in a definition document, whose operationProperties children are
+ * used to define the values for this binding. In this case no operationProperties elements must be present within
+ * this binding element
*
* @return
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/OperationProperties.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/OperationProperties.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/OperationProperties.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/OperationProperties.java Wed Jan 2 12:35:15 2008
@@ -20,8 +20,7 @@
package org.apache.tuscany.sca.binding.jms;
/**
- * Specifies various properties that are specific to the processing of a particular
- * operation.
+ * Specifies various properties that are specific to the processing of a particular operation.
*
* @version $Rev$ $Date$
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ResourceAdapter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ResourceAdapter.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ResourceAdapter.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/ResourceAdapter.java Wed Jan 2 12:35:15 2008
@@ -20,12 +20,11 @@
package org.apache.tuscany.sca.binding.jms;
/**
- * Specifies name, type and properties of the Resource Adapter Java bean. This is required
- * when the JMS resources are to be created for a JCA 1.5-compliant JMS provider, and is
- * ignored otherwise. There may be a restriction, depending on the deployment platform,
- * about specifying properties of the RA Java Bean. For non-JCA 1.5-compliant JMS providers,
- * information necessary for resource creation must be done in provider-specific elements or
- * attributes allowed by the extensibility of the binding.jms element.
+ * Specifies name, type and properties of the Resource Adapter Java bean. This is required when the JMS resources are to
+ * be created for a JCA 1.5-compliant JMS provider, and is ignored otherwise. There may be a restriction, depending on
+ * the deployment platform, about specifying properties of the RA Java Bean. For non-JCA 1.5-compliant JMS providers,
+ * information necessary for resource creation must be done in provider-specific elements or attributes allowed by the
+ * extensibility of the binding.jms element.
*
* @version $Rev$ $Date$
*/
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java Wed Jan 2 12:35:15 2008
@@ -28,173 +28,167 @@
import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessor;
import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-
/**
* Models a binding to a JMS resource.
*/
public class JMSBinding implements Binding {
-
+
/**
* Clone the binding
*/
public Object clone() throws CloneNotSupportedException {
return super.clone();
- }
-
- // properties required to implement the Tuscany
+ }
+
+ // properties required to implement the Tuscany
// binding extension SPI
- private String uri = null;
- private String name = null;
- private boolean unresolved = false;
- private List<Object> extensions = new ArrayList<Object>();
+ private String uri = null;
+ private String name = null;
+ private boolean unresolved = false;
+ private List<Object> extensions = new ArrayList<Object>();
- // Properties required to describe the JMS
+ // Properties required to describe the JMS
// binding model
-
- // <binding.jms correlationScheme="string"? Not yet implemented in binding
- // initialContextFactory="xs:anyURI"?
- // jndiURL="xs:anyURI"?
- // requestConnection="QName"? Not yet implemented in binding
- // responseConnection="QName"? Not yet implemented in binding
- // operationProperties="QName"? Not yet implemented in binding
- // ...>
- private String correlationScheme = JMSBindingConstants.CORRELATE_MSG_ID;
+
+ // <binding.jms correlationScheme="string"? Not yet implemented in binding
+ // initialContextFactory="xs:anyURI"?
+ // jndiURL="xs:anyURI"?
+ // requestConnection="QName"? Not yet implemented in binding
+ // responseConnection="QName"? Not yet implemented in binding
+ // operationProperties="QName"? Not yet implemented in binding
+ // ...>
+ private String correlationScheme = JMSBindingConstants.CORRELATE_MSG_ID;
private String initialContextFactoryName = JMSBindingConstants.DEFAULT_CONTEXT_FACTORY_NAME;
- private String jndiURL = JMSBindingConstants.DEFAULT_JNDI_URL;
- //private String requestConnection = null;
- //private String responseConnection = null;
- //private String operationProperties = null;
+ private String jndiURL = JMSBindingConstants.DEFAULT_JNDI_URL;
+ // private String requestConnection = null;
+ // private String responseConnection = null;
+ // private String operationProperties = null;
//
- // <destination name="xs:anyURI"
- // type="string"? Not yet implemented in binding
- // create="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </destination>?
- private String destinationName = JMSBindingConstants.DEFAULT_DESTINATION_NAME;
- private String destinationType = JMSBindingConstants.DESTINATION_TYPE_QUEUE;
- private String destinationCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
+ // <destination name="xs:anyURI"
+ // type="string"? Not yet implemented in binding
+ // create="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </destination>?
+ private String destinationName = JMSBindingConstants.DEFAULT_DESTINATION_NAME;
+ private String destinationType = JMSBindingConstants.DESTINATION_TYPE_QUEUE;
+ private String destinationCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
//
- // <connectionFactory name="xs:anyURI" Not yet implemented in binding
- // create="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </connectionFactory>?
- private String connectionFactoryName = JMSBindingConstants.DEFAULT_CONNECTION_FACTORY_NAME;
- private String connectionFactoryCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
+ // <connectionFactory name="xs:anyURI" Not yet implemented in binding
+ // create="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </connectionFactory>?
+ private String connectionFactoryName = JMSBindingConstants.DEFAULT_CONNECTION_FACTORY_NAME;
+ private String connectionFactoryCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
//
- // <activationSpec name="xs:anyURI" Not yet implemented in binding
- // create="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </activationSpec>?
- private String activationSpecName = null;
- private String activationSpecCreate = null;
+ // <activationSpec name="xs:anyURI" Not yet implemented in binding
+ // create="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </activationSpec>?
+ private String activationSpecName = null;
+ private String activationSpecCreate = null;
//
- // <response>
- // <destination name="xs:anyURI"
- // type="string"? Not yet implemented in binding
- // create="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </destination>?
- private String responseDestinationName = JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME;
- private String responseDestinationType = JMSBindingConstants.DESTINATION_TYPE_QUEUE;
- private String responseDestinationCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
+ // <response>
+ // <destination name="xs:anyURI"
+ // type="string"? Not yet implemented in binding
+ // create="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </destination>?
+ private String responseDestinationName = JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME;
+ private String responseDestinationType = JMSBindingConstants.DESTINATION_TYPE_QUEUE;
+ private String responseDestinationCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
//
- // <connectionFactory name="xs:anyURI" Not yet implemented in binding
- // create="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </connectionFactory>?
- private String responseConnectionFactoryName = JMSBindingConstants.DEFAULT_CONNECTION_FACTORY_NAME;
- private String responseConnectionFactoryCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
+ // <connectionFactory name="xs:anyURI" Not yet implemented in binding
+ // create="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </connectionFactory>?
+ private String responseConnectionFactoryName = JMSBindingConstants.DEFAULT_CONNECTION_FACTORY_NAME;
+ private String responseConnectionFactoryCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
//
- // <activationSpec name="xs:anyURI" Not yet implemented in binding
- // create="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </activationSpec>?
- private String responseActivationSpecName = null;
- private String responseActivationSpecCreate = null;
- // </response>?
+ // <activationSpec name="xs:anyURI" Not yet implemented in binding
+ // create="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </activationSpec>?
+ private String responseActivationSpecName = null;
+ private String responseActivationSpecCreate = null;
+ // </response>?
//
- // <resourceAdapter name="NMTOKEN">? Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </resourceAdapter>?
- //private String resourceAdapterName = null;
+ // <resourceAdapter name="NMTOKEN">? Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </resourceAdapter>?
+ // private String resourceAdapterName = null;
//
- // <headers JMSType="string"? Not yet implemented in binding
- // JMSCorrelationId="string"? Not yet implemented in binding
- // JMSDeliveryMode="string"? Not yet implemented in binding
- // JMSTimeToLive="int"? Not yet implemented in binding
- // JMSPriority="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </headers>?
- //private String jmsType = null;
- //private String jmsCorrelationId = null;
- private int jmsDeliveryMode = DeliveryMode.NON_PERSISTENT; // Maps to javax.jms.DeliveryMode
- private int jmsTimeToLive = JMSBindingConstants.DEFAULT_TIME_TO_LIVE;
- private int jmsPriority = JMSBindingConstants.DEFAULT_PRIORITY;
+ // <headers JMSType="string"? Not yet implemented in binding
+ // JMSCorrelationId="string"? Not yet implemented in binding
+ // JMSDeliveryMode="string"? Not yet implemented in binding
+ // JMSTimeToLive="int"? Not yet implemented in binding
+ // JMSPriority="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </headers>?
+ // private String jmsType = null;
+ // private String jmsCorrelationId = null;
+ private int jmsDeliveryMode = DeliveryMode.NON_PERSISTENT; // Maps to javax.jms.DeliveryMode
+ private int jmsTimeToLive = JMSBindingConstants.DEFAULT_TIME_TO_LIVE;
+ private int jmsPriority = JMSBindingConstants.DEFAULT_PRIORITY;
//
- // <operationProperties name="string" Not yet implemented in binding
- // nativeOperation="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // <headers JMSType="string"? Not yet implemented in binding
- // JMSCorrelationId="string"? Not yet implemented in binding
- // JMSDeliveryMode="string"? Not yet implemented in binding
- // JMSTimeToLive="int"? Not yet implemented in binding
- // JMSPriority="string"?> Not yet implemented in binding
- // <property name="NMTOKEN" Not yet implemented in binding
- // type="NMTOKEN">* Not yet implemented in binding
- // </headers>?
- // </operationProperties>*
+ // <operationProperties name="string" Not yet implemented in binding
+ // nativeOperation="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // <headers JMSType="string"? Not yet implemented in binding
+ // JMSCorrelationId="string"? Not yet implemented in binding
+ // JMSDeliveryMode="string"? Not yet implemented in binding
+ // JMSTimeToLive="int"? Not yet implemented in binding
+ // JMSPriority="string"?> Not yet implemented in binding
+ // <property name="NMTOKEN" Not yet implemented in binding
+ // type="NMTOKEN">* Not yet implemented in binding
+ // </headers>?
+ // </operationProperties>*
// </binding.jms>
// Other properties not directly related to the
// XML definition of the JMS binding
-
-
- // Provides the name of the factory that interfaces to the
- // JMS API for us.
- private String jmsResourceFactoryName = JMSBindingConstants.DEFAULT_RF_CLASSNAME;
-
+
+ // Provides the name of the factory that interfaces to the
+ // JMS API for us.
+ private String jmsResourceFactoryName = JMSBindingConstants.DEFAULT_RF_CLASSNAME;
+
// Message processors used to deal with the request
// and response messages
- public String requestMessageProcessorName = JMSBindingConstants.DEFAULT_MP_CLASSNAME;
- public String responseMessageProcessorName = JMSBindingConstants.DEFAULT_MP_CLASSNAME;
-
- // The JMS message property used to hold the name of the
+ public String requestMessageProcessorName = JMSBindingConstants.DEFAULT_MP_CLASSNAME;
+ public String responseMessageProcessorName = JMSBindingConstants.DEFAULT_MP_CLASSNAME;
+
+ // The JMS message property used to hold the name of the
// operation being called
- private String operationSelectorPropertyName = JMSBindingConstants.DEFAULT_OPERATION_PROP_NAME;
-
+ private String operationSelectorPropertyName = JMSBindingConstants.DEFAULT_OPERATION_PROP_NAME;
+
// If the operation selector is derived automatically from the service
// interface it's stored here
- private String operationSelectorName = null;
-
+ private String operationSelectorName = null;
+
// Set true if messages are sent/received in XML format
- private boolean xmlFormat = true;
-
-
-//TODO .....
- private String replyTo;
+ private boolean xmlFormat = true;
+ // TODO .....
+ private String replyTo;
// Methods required by the Tuscany SPI
/**
- * No arg constructor used by the JSMBindingFactoryImpl
- * to create JMS binding model objects
- *
+ * No arg constructor used by the JSMBindingFactoryImpl to create JMS binding model objects
*/
public JMSBinding() {
super();
}
-
+
/**
* Returns the binding URI.
*
@@ -230,40 +224,42 @@
public void setName(String name) {
this.name = name;
}
-
public boolean isUnresolved() {
return this.unresolved;
}
-
+
public void setUnresolved(boolean unresolved) {
this.unresolved = unresolved;
- }
+ }
public List<Object> getExtensions() {
return extensions;
- }
-
- // Methods for getting/setting JMS binding model information
+ }
+
+ // Methods for getting/setting JMS binding model information
// as derived from the XML of the binding.jms element
-
+
public void setCorrelationScheme(String correlationScheme) {
this.correlationScheme = correlationScheme;
}
+
public String getCorrelationScheme() {
return correlationScheme;
}
-
+
public String getInitialContextFactoryName() {
return initialContextFactoryName;
}
+
public void setInitialContextFactoryName(String initialContextFactoryName) {
this.initialContextFactoryName = initialContextFactoryName;
- }
-
+ }
+
public String getJndiURL() {
return this.jndiURL;
}
+
public void setJndiURL(String jndiURL) {
this.jndiURL = jndiURL;
}
@@ -271,182 +267,207 @@
public String getDestinationName() {
return destinationName;
}
+
public void setDestinationName(String destinationName) {
this.destinationName = destinationName;
}
-
+
public String getDestinationType() {
return destinationType;
}
+
public void setDestinationType(String destinationType) {
this.destinationType = destinationType;
- }
-
+ }
+
public String getDestinationCreate() {
return this.destinationCreate;
- }
+ }
+
public void setDestinationCreate(String create) {
this.destinationCreate = create;
- }
-
+ }
+
public String getConnectionFactoryName() {
return connectionFactoryName;
}
+
public void setConnectionFactoryName(String connectionFactoryName) {
this.connectionFactoryName = connectionFactoryName;
- }
-
+ }
+
public String getConnectionFactoryCreate() {
return this.connectionFactoryCreate;
- }
+ }
+
public void setConnectionFactoryCreate(String create) {
this.connectionFactoryCreate = create;
}
-
+
public String getActivationSpecName() {
return activationSpecName;
}
+
public void setActivationSpecName(String activationSpecName) {
this.activationSpecName = activationSpecName;
- }
-
+ }
+
public String getActivationSpecCreate() {
return this.activationSpecCreate;
- }
+ }
+
public void setActivationSpecCreate(String create) {
this.activationSpecCreate = create;
- }
-
+ }
+
public String getResponseDestinationName() {
return this.responseDestinationName;
- }
+ }
+
public void setResponseDestinationName(String name) {
this.responseDestinationName = name;
- }
-
+ }
+
public String getResponseDestinationType() {
return this.responseDestinationType;
- }
+ }
+
public void setResponseDestinationType(String type) {
this.responseDestinationType = type;
- }
-
+ }
+
public String getResponseDestinationCreate() {
return this.responseDestinationCreate;
- }
+ }
+
public void setResponseDestinationCreate(String create) {
this.responseDestinationCreate = create;
- }
-
+ }
+
public String getResponseConnectionFactoryName() {
return responseConnectionFactoryName;
}
+
public void setResponseConnectionFactoryName(String connectionFactoryName) {
this.responseConnectionFactoryName = connectionFactoryName;
- }
-
+ }
+
public String getResponseConnectionFactoryCreate() {
return this.responseConnectionFactoryCreate;
- }
+ }
+
public void setResponseConnectionFactoryCreate(String create) {
this.responseConnectionFactoryCreate = create;
- }
-
+ }
+
public String getResponseActivationSpecName() {
return responseActivationSpecName;
}
+
public void setResponseActivationSpecName(String activationSpecName) {
this.responseActivationSpecName = activationSpecName;
- }
-
+ }
+
public String getResponseActivationSpecCreate() {
return this.responseActivationSpecCreate;
- }
+ }
+
public void setResponseActivationSpecCreate(String create) {
this.responseActivationSpecCreate = create;
- }
-
+ }
+
public int getDeliveryMode() {
return jmsDeliveryMode;
}
+
public void setDeliveryMode(int deliveryMode) {
this.jmsDeliveryMode = deliveryMode;
- }
-
+ }
+
public int getTimeToLive() {
return jmsTimeToLive;
}
+
public void setTimeToLive(int timeToLive) {
this.jmsTimeToLive = timeToLive;
- }
-
+ }
+
public int getPriority() {
return jmsPriority;
}
+
public void setPriority(int priority) {
this.jmsPriority = priority;
- }
-
- // operations to manage the other information required by the
+ }
+
+ // operations to manage the other information required by the
// JMS binding
-
+
public String getJmsResourceFactoryName() {
return jmsResourceFactoryName;
}
+
public void setJmsResourceFactoryName(String jmsResourceFactoryName) {
this.jmsResourceFactoryName = jmsResourceFactoryName;
- }
+ }
+
public JMSResourceFactory getJmsResourceFactory() {
- return (JMSResourceFactory)instantiate(null,jmsResourceFactoryName);
- }
-
+ return (JMSResourceFactory)instantiate(null, jmsResourceFactoryName);
+ }
+
public void setRequestMessageProcessorName(String name) {
this.requestMessageProcessorName = name;
}
+
public String getRequestMessageProcessorName() {
return requestMessageProcessorName;
}
+
public JMSMessageProcessor getRequestMessageProcessor() {
- return (JMSMessageProcessor)instantiate(null,requestMessageProcessorName);
- }
-
+ return (JMSMessageProcessor)instantiate(null, requestMessageProcessorName);
+ }
+
public void setResponseMessageProcessorName(String name) {
this.responseMessageProcessorName = name;
}
+
public String getResponseMessageProcessorName() {
return responseMessageProcessorName;
- }
+ }
+
public JMSMessageProcessor getResponseMessageProcessor() {
- return (JMSMessageProcessor)instantiate(null,responseMessageProcessorName);
- }
-
+ return (JMSMessageProcessor)instantiate(null, responseMessageProcessorName);
+ }
+
public String getOperationSelectorPropertyName() {
return operationSelectorPropertyName;
}
+
public void setOperationSelectorPropertyName(String operationSelectorPropertyName) {
this.operationSelectorPropertyName = operationSelectorPropertyName;
- }
-
+ }
+
public String getOperationSelectorName() {
return operationSelectorName;
}
+
public void setOperationSelectorName(String operationSelectorName) {
this.operationSelectorName = operationSelectorName;
- }
-
+ }
+
public boolean getXMLFormat() {
return xmlFormat;
}
+
public void setXMLFormat(boolean b) {
this.xmlFormat = b;
- }
-
+ }
+
/**
- * Used to create instances of the JMSResourceFactory
- * and RequestMessageProcessor and ResponseMessageProcessor
- * from sting based classname provided in the configuration
+ * Used to create instances of the JMSResourceFactory and RequestMessageProcessor and ResponseMessageProcessor from
+ * sting based classname provided in the configuration
*
- * @param cl classloader
+ * @param cl classloader
* @param className the string based classname to load and instantiate
* @return the new object
*/
@@ -458,64 +479,56 @@
try {
Class clazz;
-
+
try {
clazz = cl.loadClass(className);
} catch (ClassNotFoundException e) {
clazz = this.getClass().getClassLoader().loadClass(className);
}
-
- Constructor constructor = clazz.getDeclaredConstructor(new Class[]{JMSBinding.class});
+
+ Constructor constructor = clazz.getDeclaredConstructor(new Class[] {JMSBinding.class});
instance = constructor.newInstance(this);
} catch (Throwable e) {
throw new JMSBindingException("Exception instantiating OperationAndDataBinding class", e);
}
-
+
return instance;
- }
-
+ }
+
/**
- * The validation rules for the JMS model are relatively complicated to
- * they all live together here
+ * The validation rules for the JMS model are relatively complicated to they all live together here
*/
public void validate() throws JMSBindingException {
/*
- * first fix up anything now the model
- * has been read
+ * first fix up anything now the model has been read
*/
-
- if (getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)){
+
+ if (getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)) {
/*
- * No desitnation name has been set so make sure that
- * the runtime is able to create one automatically
+ * No desitnation name has been set so make sure that the runtime is able to create one automatically
*/
setDestinationCreate(JMSBindingConstants.CREATE_IF_NOT_EXIST);
}
-
- if (getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)){
+
+ if (getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)) {
/*
- * No repsonse desitination name has been set so make sure that
- * the runtime is able to create one automatically
+ * No repsonse desitination name has been set so make sure that the runtime is able to create one
+ * automatically
*/
setResponseDestinationCreate(JMSBindingConstants.CREATE_IF_NOT_EXIST);
- }
-
-
+ }
+
/*
* Now some cross field validation
*/
-
+
// connection factory doesn't contradict detsination type
-
// connection factory and activation spec are mutually exclusive
-
// TODO check spec for all validations
}
-
-
-// TODO...
+ // TODO...
public String getReplyTo() {
return replyTo;
@@ -525,7 +538,4 @@
this.replyTo = replyTo;
}
-
-
-
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java Wed Jan 2 12:35:15 2008
@@ -31,30 +31,29 @@
// Contants used when describing the JMS binding
// model and for setting up defaults
- public final static String BINDING_JMS = "binding.jms";
- public final static QName BINDING_JMS_QNAME = new QName(Constants.SCA10_NS, BINDING_JMS);
- public final static String CORRELATE_MSG_ID = "requestmsgidtocorrelid";
- public final static String CORRELATE_CORRELATION_ID = "requestcorrelidtocorrelid";
- public final static String CORRELATE_NONE = "none";
- public final static List<String> VALID_CORRELATION_SCHEMES = Arrays.asList(new String[] {CORRELATE_MSG_ID,
- CORRELATE_CORRELATION_ID,
- CORRELATE_NONE});
- public final static String DESTINATION_TYPE_QUEUE = "queue"; //0
- public final static String DESTINATION_TYPE_TOPIC = "topic"; //1
- public final static List<String> VALID_DESTINATION_TYPES = Arrays.asList(new String[] {DESTINATION_TYPE_QUEUE,
- DESTINATION_TYPE_TOPIC});
- public final static String CREATE_ALWAYS = "always";
- public final static String CREATE_NEVER = "never";
- public final static String CREATE_IF_NOT_EXIST = "ifnotexist";
- public final static String DEFAULT_DESTINATION_NAME = "NODESTINATION";
- public final static String DEFAULT_RESPONSE_DESTINATION_NAME = "NORESPONSEDESTINATION";
- public final static String DEFAULT_CONNECTION_FACTORY_NAME = "ConnectionFactory";
- public final static String DEFAULT_CONTEXT_FACTORY_NAME = "org.apache.activemq.jndi.ActiveMQInitialContextFactory";
- public final static String DEFAULT_JNDI_URL = "tcp://localhost:61616";
- public final static int DEFAULT_TIME_TO_LIVE = 10000; // in milli seconds
- public final static int DEFAULT_PRIORITY = 1;
- public final static String DEFAULT_RF_CLASSNAME = JMSResourceFactoryActiveMQImpl.class.getName();
- public final static String DEFAULT_MP_CLASSNAME = JMSMessageProcessorImpl.class.getName();
- public final static String DEFAULT_OPERATION_PROP_NAME = "scaOperationName";
+ public final static String BINDING_JMS = "binding.jms";
+ public final static QName BINDING_JMS_QNAME = new QName(Constants.SCA10_NS, BINDING_JMS);
+ public final static String CORRELATE_MSG_ID = "requestmsgidtocorrelid";
+ public final static String CORRELATE_CORRELATION_ID = "requestcorrelidtocorrelid";
+ public final static String CORRELATE_NONE = "none";
+ public final static List<String> VALID_CORRELATION_SCHEMES =
+ Arrays.asList(new String[] {CORRELATE_MSG_ID, CORRELATE_CORRELATION_ID, CORRELATE_NONE});
+ public final static String DESTINATION_TYPE_QUEUE = "queue"; // 0
+ public final static String DESTINATION_TYPE_TOPIC = "topic"; // 1
+ public final static List<String> VALID_DESTINATION_TYPES =
+ Arrays.asList(new String[] {DESTINATION_TYPE_QUEUE, DESTINATION_TYPE_TOPIC});
+ public final static String CREATE_ALWAYS = "always";
+ public final static String CREATE_NEVER = "never";
+ public final static String CREATE_IF_NOT_EXIST = "ifnotexist";
+ public final static String DEFAULT_DESTINATION_NAME = "NODESTINATION";
+ public final static String DEFAULT_RESPONSE_DESTINATION_NAME = "NORESPONSEDESTINATION";
+ public final static String DEFAULT_CONNECTION_FACTORY_NAME = "ConnectionFactory";
+ public final static String DEFAULT_CONTEXT_FACTORY_NAME = "org.apache.activemq.jndi.ActiveMQInitialContextFactory";
+ public final static String DEFAULT_JNDI_URL = "tcp://localhost:61616";
+ public final static int DEFAULT_TIME_TO_LIVE = 10000; // in milli seconds
+ public final static int DEFAULT_PRIORITY = 1;
+ public final static String DEFAULT_RF_CLASSNAME = JMSResourceFactoryActiveMQImpl.class.getName();
+ public final static String DEFAULT_MP_CLASSNAME = JMSMessageProcessorImpl.class.getName();
+ public final static String DEFAULT_OPERATION_PROP_NAME = "scaOperationName";
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java Wed Jan 2 12:35:15 2008
@@ -38,73 +38,28 @@
import org.apache.tuscany.sca.policy.PolicyFactory;
/**
- * A processor to read the XML that describes the JMS binding...
- *
- * <binding.jms correlationScheme="string"?
- * initialContextFactory="xs:anyURI"?
- * jndiURL="xs:anyURI"?
- * requestConnection="QName"?
- * responseConnection="QName"?
- * operationProperties="QName"?
- * ...>
- *
- * <destination name="xs:anyURI" type="string"? create="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </destination>?
- *
- * <connectionFactory name="xs:anyURI" create="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </connectionFactory>?
- *
- * <activationSpec name="xs:anyURI" create="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </activationSpec>?
- *
- * <response>
- * <destination name="xs:anyURI" type="string"? create="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </destination>?
- *
- * <connectionFactory name="xs:anyURI" create="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </connectionFactory>?
- *
- * <activationSpec name="xs:anyURI" create="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </activationSpec>?
- * </response>?
- *
- * <resourceAdapter name="NMTOKEN">?
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </resourceAdapter>?
- *
- * <headers JMSType="string"?
- * JMSCorrelationId="string"?
- * JMSDeliveryMode="string"?
- * JMSTimeToLive="int"?
- * JMSPriority="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </headers>?
- *
- * <operationProperties name="string" nativeOperation="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * <headers JMSType="string"?
- * JMSCorrelationId="string"?
- * JMSDeliveryMode="string"?
- * JMSTimeToLive="int"?
- * JMSPriority="string"?>
- * <property name="NMTOKEN" type="NMTOKEN">*
- * </headers>?
- * </operationProperties>*
- * </binding.jms>
+ * A processor to read the XML that describes the JMS binding... <binding.jms correlationScheme="string"?
+ * initialContextFactory="xs:anyURI"? jndiURL="xs:anyURI"? requestConnection="QName"? responseConnection="QName"?
+ * operationProperties="QName"? ...> <destination name="xs:anyURI" type="string"? create="string"?> <property
+ * name="NMTOKEN" type="NMTOKEN">* </destination>? <connectionFactory name="xs:anyURI" create="string"?> <property
+ * name="NMTOKEN" type="NMTOKEN">* </connectionFactory>? <activationSpec name="xs:anyURI" create="string"?> <property
+ * name="NMTOKEN" type="NMTOKEN">* </activationSpec>? <response> <destination name="xs:anyURI" type="string"?
+ * create="string"?> <property name="NMTOKEN" type="NMTOKEN">* </destination>? <connectionFactory name="xs:anyURI"
+ * create="string"?> <property name="NMTOKEN" type="NMTOKEN">* </connectionFactory>? <activationSpec name="xs:anyURI"
+ * create="string"?> <property name="NMTOKEN" type="NMTOKEN">* </activationSpec>? </response>? <resourceAdapter
+ * name="NMTOKEN">? <property name="NMTOKEN" type="NMTOKEN">* </resourceAdapter>? <headers JMSType="string"?
+ * JMSCorrelationId="string"? JMSDeliveryMode="string"? JMSTimeToLive="int"? JMSPriority="string"?> <property
+ * name="NMTOKEN" type="NMTOKEN">* </headers>? <operationProperties name="string" nativeOperation="string"?> <property
+ * name="NMTOKEN" type="NMTOKEN">* <headers JMSType="string"? JMSCorrelationId="string"? JMSDeliveryMode="string"?
+ * JMSTimeToLive="int"? JMSPriority="string"?> <property name="NMTOKEN" type="NMTOKEN">* </headers>?
+ * </operationProperties>* </binding.jms>
*/
-public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding>{
-
+public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
+
private PolicyFactory policyFactory;
private PolicyAttachPointProcessor policyProcessor;
-
public JMSBindingProcessor(ModelFactoryExtensionPoint modelFactories) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
@@ -118,9 +73,9 @@
return JMSBinding.class;
}
- public JMSBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+ public JMSBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
JMSBinding jmsBinding = new JMSBinding();
-
+
// Read policies
policyProcessor.readPolicies(jmsBinding, reader);
@@ -129,7 +84,7 @@
if (name != null) {
jmsBinding.setName(name);
}
-
+
// Read binding URI
String uri = reader.getAttributeValue(null, "uri");
if (uri != null) {
@@ -159,14 +114,14 @@
if (jndiURL != null && jndiURL.length() > 0) {
jmsBinding.setJndiURL(jndiURL);
}
-
+
// Read requestConnection
// TODO
// Read reponseConnection
// TODO
// Read operationProperties
// TODO
-
+
// Read subelements of binding.jms
boolean endFound = false;
while (!endFound) {
@@ -182,12 +137,12 @@
} else if ("response".equals(elementName)) {
parseResponse(reader, jmsBinding);
} else if ("resourceAdapter".equals(elementName)) {
- parseResourceAdapter(reader, jmsBinding);
+ parseResourceAdapter(reader, jmsBinding);
} else if ("headers".equals(elementName)) {
parseHeaders(reader, jmsBinding);
} else if ("operationProperties".equals(elementName)) {
parseOperationProperties(reader, jmsBinding);
- }
+ }
reader.next();
break;
case END_ELEMENT:
@@ -195,35 +150,36 @@
if (x.equals(JMSBindingConstants.BINDING_JMS_QNAME)) {
endFound = true;
} else {
- throw new RuntimeException("Incomplete binding.jms definition found unexpected element " + x.toString());
+ throw new RuntimeException("Incomplete binding.jms definition found unexpected element " + x
+ .toString());
}
}
}
-
- jmsBinding.validate();
-
+
+ jmsBinding.validate();
+
return jmsBinding;
}
-
+
public void resolve(JMSBinding model, ModelResolver resolver) throws ContributionResolveException {
- }
+ }
- public void write(JMSBinding rmiBinding, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
+ public void write(JMSBinding rmiBinding, XMLStreamWriter writer) throws ContributionWriteException,
+ XMLStreamException {
// Write a <binding.jms>
writer.writeStartElement(Constants.SCA10_NS, JMSBindingConstants.BINDING_JMS);
// FIXME Implement
-
+
writer.writeEndElement();
}
-
private void parseDestination(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException {
String name = reader.getAttributeValue(null, "name");
if (name != null && name.length() > 0) {
jmsBinding.setDestinationName(name);
}
-
+
String type = reader.getAttributeValue(null, "type");
if (type != null && type.length() > 0) {
if (JMSBindingConstants.DESTINATION_TYPE_QUEUE.equalsIgnoreCase(type)) {
@@ -235,13 +191,13 @@
}
System.err.println("JMS Binding doesn't process destination type yet");
}
-
+
String create = reader.getAttributeValue(null, "create");
if (create != null && create.length() > 0) {
jmsBinding.setDestinationCreate(create);
}
- }
-
+ }
+
private void parseConnectionFactory(XMLStreamReader reader, JMSBinding jmsBinding) {
String name = reader.getAttributeValue(null, "name");
if (name != null && name.length() > 0) {
@@ -249,7 +205,7 @@
} else {
throw new RuntimeException("missing connectionFactory name");
}
- }
+ }
private void parseActivationSpec(XMLStreamReader reader, JMSBinding jmsBinding) {
String name = reader.getAttributeValue(null, "name");
@@ -265,8 +221,8 @@
String name = reader.getAttributeValue(null, "name");
if (name != null && name.length() > 0) {
jmsBinding.setResponseDestinationName(name);
- }
-
+ }
+
String type = reader.getAttributeValue(null, "type");
if (type != null && type.length() > 0) {
if (JMSBindingConstants.DESTINATION_TYPE_QUEUE.equalsIgnoreCase(type)) {
@@ -278,13 +234,13 @@
}
System.err.println("JMS Binding doesn't process response destination type yet");
}
-
+
String create = reader.getAttributeValue(null, "create");
if (create != null && create.length() > 0) {
jmsBinding.setResponseDestinationCreate(create);
}
- }
-
+ }
+
private void parseResponseConnectionFactory(XMLStreamReader reader, JMSBinding jmsBinding) {
String name = reader.getAttributeValue(null, "name");
if (name != null && name.length() > 0) {
@@ -293,7 +249,7 @@
} else {
throw new RuntimeException("missing response connectionFactory name");
}
- }
+ }
private void parseResponseActivationSpec(XMLStreamReader reader, JMSBinding jmsBinding) {
String name = reader.getAttributeValue(null, "name");
@@ -304,9 +260,8 @@
throw new RuntimeException("missing response ActivationSpec name");
}
}
-
- private void parseResponse(XMLStreamReader reader, JMSBinding jmsBinding)
- throws XMLStreamException {
+
+ private void parseResponse(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException {
// Read subelements of response
while (true) {
switch (reader.next()) {
@@ -318,7 +273,7 @@
parseResponseConnectionFactory(reader, jmsBinding);
} else if ("activationSpec".equals(elementName)) {
parseResponseActivationSpec(reader, jmsBinding);
- }
+ }
reader.next();
break;
case END_ELEMENT:
@@ -326,7 +281,9 @@
if (x.getLocalPart().equals("response")) {
return;
} else {
- throw new RuntimeException("Incomplete binding.jms/response definition found unexpected element " + x.toString());
+ throw new RuntimeException(
+ "Incomplete binding.jms/response definition found unexpected element " + x
+ .toString());
}
}
}
@@ -335,10 +292,10 @@
private void parseResourceAdapter(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException {
System.err.println("JMS Binding doesn't process resourceAdapter yet");
}
-
+
private void parseHeaders(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException {
System.err.println("JMS Binding doesn't process headers yet");
- }
+ }
private void parseOperationProperties(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException {
System.err.println("JMS Binding doesn't process operationProperties yet");
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java Wed Jan 2 12:35:15 2008
@@ -41,32 +41,31 @@
*/
public class JMSBindingInvoker implements Invoker {
- protected Operation operation;
- protected String operationName;
-
- protected JMSBinding jmsBinding;
- protected JMSResourceFactory jmsResourceFactory;
+ protected Operation operation;
+ protected String operationName;
+
+ protected JMSBinding jmsBinding;
+ protected JMSResourceFactory jmsResourceFactory;
protected JMSMessageProcessor requestMessageProcessor;
protected JMSMessageProcessor responseMessageProcessor;
- protected Destination requestDest;
- protected Destination replyDest;
+ protected Destination requestDest;
+ protected Destination replyDest;
+
+ public JMSBindingInvoker(JMSBinding jmsBinding, Operation operation) {
- public JMSBindingInvoker(JMSBinding jmsBinding,
- Operation operation ) {
-
- this.operation = operation;
- operationName = operation.getName();
-
- this.jmsBinding = jmsBinding;
- jmsResourceFactory = jmsBinding.getJmsResourceFactory();
- requestMessageProcessor = jmsBinding.getRequestMessageProcessor();
+ this.operation = operation;
+ operationName = operation.getName();
+
+ this.jmsBinding = jmsBinding;
+ jmsResourceFactory = jmsBinding.getJmsResourceFactory();
+ requestMessageProcessor = jmsBinding.getRequestMessageProcessor();
responseMessageProcessor = jmsBinding.getResponseMessageProcessor();
try {
- requestDest = lookupDestination();
- replyDest = lookupResponseDestination();
+ requestDest = lookupDestination();
+ replyDest = lookupResponseDestination();
} catch (NamingException e) {
throw new JMSBindingException(e);
- }
+ }
}
@@ -76,20 +75,18 @@
* @return The Destination Queue
* @throws NamingException Failed to lookup Destination Queue
* @throws JMSBindingException Failed to lookup Destination Queue
- *
* @see #lookupDestinationQueue(boolean)
*/
private Destination lookupDestination() throws NamingException, JMSBindingException {
return lookupDestinationQueue(false);
}
-
+
/**
* Looks up the Destination Response Queue for the JMS Binding
*
* @return The Destination Response Queue
* @throws NamingException Failed to lookup Destination Response Queue
* @throws JMSBindingException Failed to lookup Destination Response Queue
- *
* @see #lookupDestinationQueue(boolean)
*/
private Destination lookupResponseDestination() throws NamingException, JMSBindingException {
@@ -104,15 +101,16 @@
* <li>always - the JMS queue is always created. It is an error if the queue already exists
* <li>ifnotexist - the JMS queue is created if it does not exist. It is not an error if the queue already exists
* <li>never - the JMS queue is never created. It is an error if the queue does not exist
- * </ul>
+ * </ul>
* See the SCA JMS Binding specification for more information.
* <p>
+ *
* @param isReponseQueue <code>true</code> if we are creating a response queue. <code>false</code> if we are
- * creating a request queue
+ * creating a request queue
* @return The Destination queue.
* @throws NamingException Failed to lookup JMS queue
- * @throws JMSBindingException Failed to lookup JMS Queue. Probable cause is that the JMS queue's current
- * existance/non-existance is not compatible with the create mode specified on the binding
+ * @throws JMSBindingException Failed to lookup JMS Queue. Probable cause is that the JMS queue's current
+ * existance/non-existance is not compatible with the create mode specified on the binding
*/
private Destination lookupDestinationQueue(boolean isReponseQueue) throws NamingException, JMSBindingException {
String queueName;
@@ -127,21 +125,22 @@
queueType = "JMS Destination ";
qCreateMode = jmsBinding.getDestinationCreate();
}
-
- Destination dest = jmsResourceFactory.lookupDestination(queueName);
-
+
+ Destination dest = jmsResourceFactory.lookupDestination(queueName);
+
if (qCreateMode.equals(JMSBindingConstants.CREATE_ALWAYS)) {
// In this mode, the queue must not already exist as we are creating it
if (dest != null) {
- throw new JMSBindingException(queueType +
- queueName +
- " already exists but has create mode of \"" + qCreateMode + "\" while registering binding " +
- jmsBinding.getName() +
- " invoker");
+ throw new JMSBindingException(queueType + queueName
+ + " already exists but has create mode of \""
+ + qCreateMode
+ + "\" while registering binding "
+ + jmsBinding.getName()
+ + " invoker");
}
// Create the queue
dest = jmsResourceFactory.createDestination(queueName);
-
+
} else if (qCreateMode.equals(JMSBindingConstants.CREATE_IF_NOT_EXIST)) {
// In this mode, the queue may nor may not exist. It will be created if it does not exist
if (dest == null) {
@@ -151,27 +150,28 @@
} else if (qCreateMode.equals(JMSBindingConstants.CREATE_NEVER)) {
// In this mode, the queue must have already been created.
if (dest == null) {
- throw new JMSBindingException(queueType +
- queueName +
- " not found but create mode of \"" + qCreateMode + "\" while registering binding " +
- jmsBinding.getName() +
- " invoker");
+ throw new JMSBindingException(queueType + queueName
+ + " not found but create mode of \""
+ + qCreateMode
+ + "\" while registering binding "
+ + jmsBinding.getName()
+ + " invoker");
}
}
-
-
+
// Make sure we ended up with a queue
if (dest == null) {
- throw new JMSBindingException(queueType +
- queueName +
- " not found with create mode of \"" + qCreateMode + "\" while registering binding " +
- jmsBinding.getName() +
- " invoker");
+ throw new JMSBindingException(queueType + queueName
+ + " not found with create mode of \""
+ + qCreateMode
+ + "\" while registering binding "
+ + jmsBinding.getName()
+ + " invoker");
}
return dest;
}
-
+
public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message msg) {
try {
Object resp = invokeTarget((Object[])msg.getBody(), (short)0);
@@ -183,14 +183,14 @@
}
return msg;
}
-
+
public Object invokeTarget(Object payload, final short sequence) throws InvocationTargetException {
try {
Session session = jmsResourceFactory.createSession();
try {
Destination replyToDest = (replyDest != null) ? replyDest : session.createTemporaryQueue();
-
+
Message requestMsg = sendRequest((Object[])payload, session, replyToDest);
Message replyMsg = receiveReply(session, replyToDest, requestMsg.getJMSMessageID());
@@ -205,8 +205,8 @@
throw new InvocationTargetException(e);
}
}
-
- public void stop() throws NamingException, JMSException{
+
+ public void stop() throws NamingException, JMSException {
jmsResourceFactory.closeConnection();
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java Wed Jan 2 12:35:15 2008
@@ -65,9 +65,8 @@
}
}
- /**
- * Turn the JMS message back into a Tuscany message and invoke the
- * target component
+ /**
+ * Turn the JMS message back into a Tuscany message and invoke the target component
*
* @param requestJMSMsg
* @return
@@ -86,7 +85,7 @@
if (opList.size() == 1) {
// SCA JMS Binding Specification - Rule 1.5.1 line 203
operation = opList.get(0);
- } else if (operationName != null){
+ } else if (operationName != null) {
// SCA JMS Binding Specification - Rule 1.5.1 line 205
for (Operation op : opList) {
if (op.getName().equals(operationName)) {
@@ -107,8 +106,8 @@
if (operation != null) {
return service.getRuntimeWire(jmsBinding).invoke(operation, (Object[])requestPayload);
} else {
- throw new JMSBindingException("Can't find operation " +
- (operationName != null ? operationName : ON_MESSAGE_METHOD_NAME) );
+ throw new JMSBindingException("Can't find operation " + (operationName != null ? operationName
+ : ON_MESSAGE_METHOD_NAME));
}
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingProviderFactory.java Wed Jan 2 12:35:15 2008
@@ -28,26 +28,28 @@
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-
/**
* A factory from creating the JMS binding provider.
- *
+ *
* @version $Rev$ $Date$
*/
public class JMSBindingProviderFactory implements BindingProviderFactory<JMSBinding> {
-
- public JMSBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+
+ public JMSBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
}
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, JMSBinding binding) {
+ public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
+ RuntimeComponentReference reference,
+ JMSBinding binding) {
return new JMSBindingReferenceBindingProvider(component, reference, binding);
}
- public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, JMSBinding binding) {
+ public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
+ RuntimeComponentService service,
+ JMSBinding binding) {
return new JMSBindingServiceBindingProvider(component, service, binding);
}
-
+
public Class<JMSBinding> getModelType() {
return JMSBinding.class;
}
Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java?rev=608212&r1=608211&r2=608212&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java Wed Jan 2 12:35:15 2008
@@ -33,7 +33,6 @@
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-
/**
* Implementation of the JMS reference binding provider.
*
@@ -42,14 +41,14 @@
public class JMSBindingReferenceBindingProvider implements ReferenceBindingProvider {
private RuntimeComponentReference reference;
- private JMSBinding jmsBinding;
- private List<JMSBindingInvoker> jmsBindingInvokers = new ArrayList<JMSBindingInvoker>();
+ private JMSBinding jmsBinding;
+ private List<JMSBindingInvoker> jmsBindingInvokers = new ArrayList<JMSBindingInvoker>();
public JMSBindingReferenceBindingProvider(RuntimeComponent component,
RuntimeComponentReference reference,
JMSBinding binding) {
- this.reference = reference;
- this.jmsBinding = binding;
+ this.reference = reference;
+ this.jmsBinding = binding;
if (jmsBinding.getXMLFormat()) {
setXMLDataBinding(reference);
@@ -72,52 +71,29 @@
}
public Invoker createInvoker(Operation operation) {
-
- if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)){
- throw new JMSBindingException("No destination specified for reference " +
- reference.getName());
+
+ if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)) {
+ throw new JMSBindingException("No destination specified for reference " + reference.getName());
}
-
- if (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)){
- throw new JMSBindingException("No response destination specified for reference " +
- reference.getName());
- }
-/* The following doesn't work as I can't get to the
- * target list on the composite reference
- // if the default destination queue name is set
- // set the destination queue name to the wired service name
- // so that any wires can be assured a unique endpoint.
-
- if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)){
- // get the name of the target service
- List<ComponentService> targets = reference.getTargets();
-
- if (targets.size() < 1){
- throw new JMSBindingException("No target specified for reference " +
- reference.getName() +
- " so destination queue name can't be determined");
- }
-
- if (targets.size() > 1){
- throw new JMSBindingException("More than one target specified for reference " +
- reference.getName() +
- " so destination queue name can't be determined");
- }
-
- ComponentService service = targets.get(0);
- jmsBinding.setDestinationName(service.getName());
+
+ if (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)) {
+ throw new JMSBindingException("No response destination specified for reference " + reference.getName());
}
-
-
- // if the default response queue name is set
- // set the response queue to the names of this
- // reference
- if (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)){
- jmsBinding.setResponseDestinationName(reference.getName());
- }
-*/
- JMSBindingInvoker invoker = new JMSBindingInvoker(jmsBinding,
- operation);
+ /*
+ * The following doesn't work as I can't get to the target list on the composite reference // if the default
+ * destination queue name is set // set the destination queue name to the wired service name // so that any
+ * wires can be assured a unique endpoint. if
+ * (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)){ // get the name of
+ * the target service List<ComponentService> targets = reference.getTargets(); if (targets.size() < 1){ throw
+ * new JMSBindingException("No target specified for reference " + reference.getName() + " so destination queue
+ * name can't be determined"); } if (targets.size() > 1){ throw new JMSBindingException("More than one target
+ * specified for reference " + reference.getName() + " so destination queue name can't be determined"); }
+ * ComponentService service = targets.get(0); jmsBinding.setDestinationName(service.getName()); } // if the
+ * default response queue name is set // set the response queue to the names of this // reference if
+ * (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)){
+ * jmsBinding.setResponseDestinationName(reference.getName()); }
+ */
+ JMSBindingInvoker invoker = new JMSBindingInvoker(jmsBinding, operation);
jmsBindingInvokers.add(invoker);
return invoker;
}
@@ -131,18 +107,18 @@
}
public void start() {
-
+
}
public void stop() {
try {
for (JMSBindingInvoker invoker : jmsBindingInvokers) {
invoker.stop();
-
+
}
} catch (Exception e) {
throw new JMSBindingException("Error stopping JMSReferenceBinding", e);
- }
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org