tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r951651 [3/13] - in /tuscany/sca-java-2.x/trunk/modules: assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly/src/main/java/org/apache/tuscany/sca/assembly/ assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ bi...
Date Sat, 05 Jun 2010 05:17:51 GMT
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSHostExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSHostExtensionPoint.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSHostExtensionPoint.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSHostExtensionPoint.java Sat Jun  5 05:17:47 2010
@@ -1,40 +1,40 @@
-/*
- * 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.host;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.work.WorkScheduler;
-
-public class DefaultJMSHostExtensionPoint implements JMSHostExtensionPoint {
-
-    private JMSServiceListenerFactory jmsServiceListenerFactory;
-
-    public DefaultJMSHostExtensionPoint(ExtensionPointRegistry extensionPoints) {
-        UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
-        WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
-        this.jmsServiceListenerFactory = new DefaultJMSServiceListenerFactory(workScheduler);
-    }
-
-    public JMSServiceListenerFactory getJMSServiceListenerFactory() {
-        return jmsServiceListenerFactory;
-    }
-
-}
+/*
+ * 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.host;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.work.WorkScheduler;
+
+public class DefaultJMSHostExtensionPoint implements JMSHostExtensionPoint {
+
+    private JMSServiceListenerFactory jmsServiceListenerFactory;
+
+    public DefaultJMSHostExtensionPoint(ExtensionPointRegistry extensionPoints) {
+        UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
+        WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
+        this.jmsServiceListenerFactory = new DefaultJMSServiceListenerFactory(workScheduler);
+    }
+
+    public JMSServiceListenerFactory getJMSServiceListenerFactory() {
+        return jmsServiceListenerFactory;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSHostExtensionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSHostExtensionPoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java Sat Jun  5 05:17:47 2010
@@ -1,234 +1,234 @@
-/*
- * 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.host;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.naming.NamingException;
-
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.JMSBindingException;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-import org.apache.tuscany.sca.work.WorkScheduler;
-
-/**
- * Implementation of the JMS service binding provider.
- * 
- * @version $Rev: 721811 $ $Date: 2008-11-30 13:46:51 +0000 (Sun, 30 Nov 2008) $
- */
-public class DefaultJMSServiceListener implements JMSServiceListener {
-    private static final Logger logger = Logger.getLogger(DefaultJMSServiceListener.class.getName());
-
-    private MessageListener listener;
-    private String serviceName;
-    private boolean isCallbackService;
-    private JMSBinding jmsBinding;
-    private WorkScheduler workScheduler;
-
-    private JMSResourceFactory jmsResourceFactory;
-    private MessageConsumer consumer;
-    private boolean running;
-
-    private Destination destination;
-
-    public DefaultJMSServiceListener(MessageListener listener, String serviceName, boolean isCallbackService, JMSBinding jmsBinding, WorkScheduler workScheduler, JMSResourceFactory rf) {
-        this.listener = listener;
-        this.serviceName = serviceName;
-        this.isCallbackService = isCallbackService;
-        this.jmsBinding = jmsBinding;
-        this.workScheduler = workScheduler;
-        this.jmsResourceFactory = rf;
-    }
-    
-    public void start() {
-        this.running = true;
-
-        try {
-            registerListerner();
-        } catch (Exception e) {
-            throw new JMSBindingException("Error starting JMSServiceBinding", e);
-        }
-    }
-
-    public void stop() {
-        this.running = false;
-        try {
-            consumer.close();
-            jmsResourceFactory.closeConnection();
-            jmsResourceFactory.closeResponseConnection();
-        } catch (Exception e) {
-            // if using an embedded broker then when shutting down Tuscany the broker may get closed
-            // before this stop method is called. I can't see how to detect that so for now just
-            // ignore the exception if the message is that the transport is already disposed
-            if ((e.getMessage() == null) || !e.getMessage().contains("disposed")) {
-                throw new JMSBindingException("Error stopping JMSServiceBinding", e);
-            }
-        }
-    }
-
-    private void registerListerner() throws NamingException, JMSException {
-
-        Session session = jmsResourceFactory.createSession();
-        destination = lookupDestinationQueue();
-        if (destination == null) {
-            destination = session.createTemporaryQueue();
-        }
-
-        if (jmsBinding.getJMSSelector() != null) {
-            consumer = session.createConsumer(destination, jmsBinding.getJMSSelector());
-        } else {
-            consumer = session.createConsumer(destination);
-        }
-
-        try {
-
-            consumer.setMessageListener(listener);
-            jmsResourceFactory.startConnection();
-
-        } catch (javax.jms.JMSException e) {
-
-            // setMessageListener not allowed in JEE container so use Tuscany threads
-
-            jmsResourceFactory.startConnection();
-            workScheduler.scheduleWork(new Runnable() {
-                public void run() {
-                    try {
-                        while (running) {
-                            final Message msg = consumer.receive();
-                            workScheduler.scheduleWork(new Runnable() {
-                                public void run() {
-                                    try {
-                                        listener.onMessage(msg);
-                                    } catch (Exception e) {
-                                        e.printStackTrace();
-                                    }
-                                }
-                            });
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            });
-        }
-        logger.log(Level.INFO, "JMS " + (isCallbackService ? "callback service" : "service")
-            + " '"
-            + serviceName
-            + "' listening on destination "
-            + ((destination instanceof Queue) ? ((Queue)destination).getQueueName() : ((Topic)destination).getTopicName()));
-    }
-
-    /**
-     * Looks up the Destination Queue for the JMS Binding.
-     * <p>
-     * What happens in the look up will depend on the create mode specified for the JMS Binding:
-     * <ul>
-     * <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>
-     * See the SCA JMS Binding specification for more information.
-     * <p>
-     * 
-     * @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 existence/non-existence is not
-     *                 compatible with the create mode specified on the binding
-     */
-    private Destination lookupDestinationQueue() throws NamingException, JMSBindingException {
-
-        if (isCallbackService && (jmsBinding.getDestinationName() == null)) {
-            // if its a callback service returning null indicates to use a temporary queue
-            return null;
-        }
-
-        Destination destination = jmsResourceFactory.lookupDestination(jmsBinding.getDestinationName());
-
-        String qCreateMode = jmsBinding.getDestinationCreate();
-        if (qCreateMode.equals(JMSBindingConstants.CREATE_ALWAYS)) {
-            // In this mode, the queue must not already exist as we are creating it
-            if (destination != null) {
-                throw new JMSBindingException("JMS Destination " + jmsBinding.getDestinationName()
-                    + " already exists but has create mode of \""
-                    + qCreateMode
-                    + "\" while registering service "
-                    + serviceName
-                    + " listener");
-            }
-
-            // Create the queue
-            destination = jmsResourceFactory.createDestination(jmsBinding.getDestinationName());
-
-        } 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 (destination == null) {
-                destination = jmsResourceFactory.createDestination(jmsBinding.getDestinationName());
-            }
-
-        } else if (qCreateMode.equals(JMSBindingConstants.CREATE_NEVER)) {
-            // In this mode, the queue must have already been created.
-            if (destination == null) {
-                throw new JMSBindingException("JMS Destination " + jmsBinding.getDestinationName()
-                    + " not found but create mode of \""
-                    + qCreateMode
-                    + "\" while registering service "
-                    + serviceName
-                    + " listener");
-            }
-        }
-
-        // Make sure we ended up with a queue
-        if (destination == null) {
-            throw new JMSBindingException("JMS Destination " + jmsBinding.getDestinationName()
-                + " not found with create mode of \""
-                + qCreateMode
-                + "\" while registering service "
-                + serviceName
-                + " listener");
-        }
-
-        return destination;
-    }
-
-    public String getDestinationName() {
-        try {
-            if (destination instanceof Queue) {
-                return ((Queue)destination).getQueueName();
-            } else if (destination instanceof Topic) {
-                return ((Topic)destination).getTopicName();
-            } else {
-                return null;
-            }
-        } catch (JMSException e) {
-            throw new JMSBindingException(e);
-        }
-    }
-
-}
+/*
+ * 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.host;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.naming.NamingException;
+
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
+import org.apache.tuscany.sca.work.WorkScheduler;
+
+/**
+ * Implementation of the JMS service binding provider.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class DefaultJMSServiceListener implements JMSServiceListener {
+    private static final Logger logger = Logger.getLogger(DefaultJMSServiceListener.class.getName());
+
+    private MessageListener listener;
+    private String serviceName;
+    private boolean isCallbackService;
+    private JMSBinding jmsBinding;
+    private WorkScheduler workScheduler;
+
+    private JMSResourceFactory jmsResourceFactory;
+    private MessageConsumer consumer;
+    private boolean running;
+
+    private Destination destination;
+
+    public DefaultJMSServiceListener(MessageListener listener, String serviceName, boolean isCallbackService, JMSBinding jmsBinding, WorkScheduler workScheduler, JMSResourceFactory rf) {
+        this.listener = listener;
+        this.serviceName = serviceName;
+        this.isCallbackService = isCallbackService;
+        this.jmsBinding = jmsBinding;
+        this.workScheduler = workScheduler;
+        this.jmsResourceFactory = rf;
+    }
+    
+    public void start() {
+        this.running = true;
+
+        try {
+            registerListerner();
+        } catch (Exception e) {
+            throw new JMSBindingException("Error starting JMSServiceBinding", e);
+        }
+    }
+
+    public void stop() {
+        this.running = false;
+        try {
+            consumer.close();
+            jmsResourceFactory.closeConnection();
+            jmsResourceFactory.closeResponseConnection();
+        } catch (Exception e) {
+            // if using an embedded broker then when shutting down Tuscany the broker may get closed
+            // before this stop method is called. I can't see how to detect that so for now just
+            // ignore the exception if the message is that the transport is already disposed
+            if ((e.getMessage() == null) || !e.getMessage().contains("disposed")) {
+                throw new JMSBindingException("Error stopping JMSServiceBinding", e);
+            }
+        }
+    }
+
+    private void registerListerner() throws NamingException, JMSException {
+
+        Session session = jmsResourceFactory.createSession();
+        destination = lookupDestinationQueue();
+        if (destination == null) {
+            destination = session.createTemporaryQueue();
+        }
+
+        if (jmsBinding.getJMSSelector() != null) {
+            consumer = session.createConsumer(destination, jmsBinding.getJMSSelector());
+        } else {
+            consumer = session.createConsumer(destination);
+        }
+
+        try {
+
+            consumer.setMessageListener(listener);
+            jmsResourceFactory.startConnection();
+
+        } catch (javax.jms.JMSException e) {
+
+            // setMessageListener not allowed in JEE container so use Tuscany threads
+
+            jmsResourceFactory.startConnection();
+            workScheduler.scheduleWork(new Runnable() {
+                public void run() {
+                    try {
+                        while (running) {
+                            final Message msg = consumer.receive();
+                            workScheduler.scheduleWork(new Runnable() {
+                                public void run() {
+                                    try {
+                                        listener.onMessage(msg);
+                                    } catch (Exception e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            });
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            });
+        }
+        logger.log(Level.INFO, "JMS " + (isCallbackService ? "callback service" : "service")
+            + " '"
+            + serviceName
+            + "' listening on destination "
+            + ((destination instanceof Queue) ? ((Queue)destination).getQueueName() : ((Topic)destination).getTopicName()));
+    }
+
+    /**
+     * Looks up the Destination Queue for the JMS Binding.
+     * <p>
+     * What happens in the look up will depend on the create mode specified for the JMS Binding:
+     * <ul>
+     * <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>
+     * See the SCA JMS Binding specification for more information.
+     * <p>
+     * 
+     * @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 existence/non-existence is not
+     *                 compatible with the create mode specified on the binding
+     */
+    private Destination lookupDestinationQueue() throws NamingException, JMSBindingException {
+
+        if (isCallbackService && (jmsBinding.getDestinationName() == null)) {
+            // if its a callback service returning null indicates to use a temporary queue
+            return null;
+        }
+
+        Destination destination = jmsResourceFactory.lookupDestination(jmsBinding.getDestinationName());
+
+        String qCreateMode = jmsBinding.getDestinationCreate();
+        if (qCreateMode.equals(JMSBindingConstants.CREATE_ALWAYS)) {
+            // In this mode, the queue must not already exist as we are creating it
+            if (destination != null) {
+                throw new JMSBindingException("JMS Destination " + jmsBinding.getDestinationName()
+                    + " already exists but has create mode of \""
+                    + qCreateMode
+                    + "\" while registering service "
+                    + serviceName
+                    + " listener");
+            }
+
+            // Create the queue
+            destination = jmsResourceFactory.createDestination(jmsBinding.getDestinationName());
+
+        } 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 (destination == null) {
+                destination = jmsResourceFactory.createDestination(jmsBinding.getDestinationName());
+            }
+
+        } else if (qCreateMode.equals(JMSBindingConstants.CREATE_NEVER)) {
+            // In this mode, the queue must have already been created.
+            if (destination == null) {
+                throw new JMSBindingException("JMS Destination " + jmsBinding.getDestinationName()
+                    + " not found but create mode of \""
+                    + qCreateMode
+                    + "\" while registering service "
+                    + serviceName
+                    + " listener");
+            }
+        }
+
+        // Make sure we ended up with a queue
+        if (destination == null) {
+            throw new JMSBindingException("JMS Destination " + jmsBinding.getDestinationName()
+                + " not found with create mode of \""
+                + qCreateMode
+                + "\" while registering service "
+                + serviceName
+                + " listener");
+        }
+
+        return destination;
+    }
+
+    public String getDestinationName() {
+        try {
+            if (destination instanceof Queue) {
+                return ((Queue)destination).getQueueName();
+            } else if (destination instanceof Topic) {
+                return ((Topic)destination).getTopicName();
+            } else {
+                return null;
+            }
+        } catch (JMSException e) {
+            throw new JMSBindingException(e);
+        }
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListenerFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListenerFactory.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListenerFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListenerFactory.java Sat Jun  5 05:17:47 2010
@@ -1,55 +1,55 @@
-/*
- * 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.host;
-
-import javax.jms.MessageListener;
-import javax.naming.NamingException;
-
-import org.apache.tuscany.sca.binding.jms.JMSBindingException;
-import org.apache.tuscany.sca.binding.jms.provider.JMSBindingServiceBindingProvider;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.work.WorkScheduler;
-
-public class DefaultJMSServiceListenerFactory implements JMSServiceListenerFactory {
-
-    private WorkScheduler workScheduler;
-
-    public DefaultJMSServiceListenerFactory(WorkScheduler workScheduler) {
-        this.workScheduler = workScheduler;
-    }
-
-    public JMSServiceListener createJMSServiceListener(JMSServiceListenerDetails jmsSLD) {
-        try {
-
-            JMSResourceFactory rf = ((JMSBindingServiceBindingProvider)jmsSLD).getResourceFactory();
-            
-            RuntimeComponentService service = (RuntimeComponentService) jmsSLD.getEndpoint().getService();
-            MessageListener listener = new DefaultServiceInvoker(jmsSLD.getEndpoint(), jmsSLD.getTargetBinding(), jmsSLD.getMessageFactory(), rf);
-
-//            return new ASFListener(listener, service.getName(), service.isCallback(), jmsSLD.getJmsBinding(), workScheduler, rf);
-// TODO: 2.x migration, service.isCallback()             
-            return new DefaultJMSServiceListener(listener, service.getName(), false, jmsSLD.getJmsBinding(), workScheduler, rf);
-
-        } catch (NamingException e) {
-            throw new JMSBindingException(e);
-        }
-    }
-}
+/*
+ * 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.host;
+
+import javax.jms.MessageListener;
+import javax.naming.NamingException;
+
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.provider.JMSBindingServiceBindingProvider;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.work.WorkScheduler;
+
+public class DefaultJMSServiceListenerFactory implements JMSServiceListenerFactory {
+
+    private WorkScheduler workScheduler;
+
+    public DefaultJMSServiceListenerFactory(WorkScheduler workScheduler) {
+        this.workScheduler = workScheduler;
+    }
+
+    public JMSServiceListener createJMSServiceListener(JMSServiceListenerDetails jmsSLD) {
+        try {
+
+            JMSResourceFactory rf = ((JMSBindingServiceBindingProvider)jmsSLD).getResourceFactory();
+            
+            RuntimeComponentService service = (RuntimeComponentService) jmsSLD.getEndpoint().getService();
+            MessageListener listener = new DefaultServiceInvoker(jmsSLD.getEndpoint(), jmsSLD.getTargetBinding(), jmsSLD.getMessageFactory(), rf);
+
+//            return new ASFListener(listener, service.getName(), service.isCallback(), jmsSLD.getJmsBinding(), workScheduler, rf);
+// TODO: 2.x migration, service.isCallback()             
+            return new DefaultJMSServiceListener(listener, service.getName(), false, jmsSLD.getJmsBinding(), workScheduler, rf);
+
+        } catch (NamingException e) {
+            throw new JMSBindingException(e);
+        }
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListenerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListenerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultServiceInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultServiceInvoker.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultServiceInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultServiceInvoker.java Sat Jun  5 05:17:47 2010
@@ -1,106 +1,106 @@
-/*
- * 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.host;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.naming.NamingException;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Endpoint;
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.context.JMSBindingContext;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
-
-/**
- * TODO RRB experiement
- * Listener for the JMSBinding.
- * 
- * @version $Rev: 721811 $ $Date: 2008-11-30 13:46:51 +0000 (Sun, 30 Nov 2008) $
- */
-public class DefaultServiceInvoker implements MessageListener {
-
-    private static final Logger logger = Logger.getLogger(DefaultServiceInvoker.class.getName());
-
-    private RuntimeEndpoint endpoint;
-    private JMSBinding jmsBinding;
-    private Binding targetBinding;
-    private JMSResourceFactory jmsResourceFactory;
-    private RuntimeComponentService service;
-    private MessageFactory messageFactory;
-
-    public DefaultServiceInvoker(RuntimeEndpoint endpoint, Binding targetBinding, MessageFactory messageFactory, JMSResourceFactory rf) throws NamingException {
-        this.endpoint = endpoint;
-        this.jmsBinding = (JMSBinding) endpoint.getBinding();
-        this.jmsResourceFactory = rf;
-        this.service = (RuntimeComponentService) endpoint.getService();
-        this.targetBinding = targetBinding;
-        this.messageFactory = messageFactory;
-        
-    }
-
-    public void onMessage(Message requestJMSMsg) {
-        logger.log(Level.FINE, "JMS service '" + service.getName() + "' received message " + requestJMSMsg);
-        try {
-            invokeService(requestJMSMsg);
-        } catch (Throwable e) {
-            logger.log(Level.SEVERE, "Exception send fault response '" + service.getName(), e);
-        }
-    }
-
-    protected void invokeService(Message requestJMSMsg) throws JMSException, InvocationTargetException {
-
-        // create the tuscany message
-        org.apache.tuscany.sca.invocation.Message tuscanyMsg = messageFactory.createMessage();
-        
-        // populate the message context with JMS binding information
-        JMSBindingContext context = new JMSBindingContext();
-        tuscanyMsg.setBindingContext(context);
-        
-        context.setJmsMsg(requestJMSMsg);
-        context.setJmsResourceFactory(jmsResourceFactory);
-        context.setReplyToDestination(requestJMSMsg.getJMSReplyTo());
-        
-        // set the message body
-        tuscanyMsg.setBody(requestJMSMsg);
-        
-        // call the runtime wire - the response is handled by the 
-        // transport interceptor
-        getEndpoint(targetBinding).invoke(tuscanyMsg);
-            
-    } 
-    
-    private RuntimeEndpoint getEndpoint(Binding targetBinding) {
-        for(Endpoint ep: service.getEndpoints()) {
-            if(ep.getBinding() == targetBinding) {
-                return (RuntimeEndpoint) ep;
-            }
-        }
-        return endpoint; 
-    }
-
-}
+/*
+ * 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.host;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.naming.NamingException;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.context.JMSBindingContext;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+/**
+ * TODO RRB experiement
+ * Listener for the JMSBinding.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class DefaultServiceInvoker implements MessageListener {
+
+    private static final Logger logger = Logger.getLogger(DefaultServiceInvoker.class.getName());
+
+    private RuntimeEndpoint endpoint;
+    private JMSBinding jmsBinding;
+    private Binding targetBinding;
+    private JMSResourceFactory jmsResourceFactory;
+    private RuntimeComponentService service;
+    private MessageFactory messageFactory;
+
+    public DefaultServiceInvoker(RuntimeEndpoint endpoint, Binding targetBinding, MessageFactory messageFactory, JMSResourceFactory rf) throws NamingException {
+        this.endpoint = endpoint;
+        this.jmsBinding = (JMSBinding) endpoint.getBinding();
+        this.jmsResourceFactory = rf;
+        this.service = (RuntimeComponentService) endpoint.getService();
+        this.targetBinding = targetBinding;
+        this.messageFactory = messageFactory;
+        
+    }
+
+    public void onMessage(Message requestJMSMsg) {
+        logger.log(Level.FINE, "JMS service '" + service.getName() + "' received message " + requestJMSMsg);
+        try {
+            invokeService(requestJMSMsg);
+        } catch (Throwable e) {
+            logger.log(Level.SEVERE, "Exception send fault response '" + service.getName(), e);
+        }
+    }
+
+    protected void invokeService(Message requestJMSMsg) throws JMSException, InvocationTargetException {
+
+        // create the tuscany message
+        org.apache.tuscany.sca.invocation.Message tuscanyMsg = messageFactory.createMessage();
+        
+        // populate the message context with JMS binding information
+        JMSBindingContext context = new JMSBindingContext();
+        tuscanyMsg.setBindingContext(context);
+        
+        context.setJmsMsg(requestJMSMsg);
+        context.setJmsResourceFactory(jmsResourceFactory);
+        context.setReplyToDestination(requestJMSMsg.getJMSReplyTo());
+        
+        // set the message body
+        tuscanyMsg.setBody(requestJMSMsg);
+        
+        // call the runtime wire - the response is handled by the 
+        // transport interceptor
+        getEndpoint(targetBinding).invoke(tuscanyMsg);
+            
+    } 
+    
+    private RuntimeEndpoint getEndpoint(Binding targetBinding) {
+        for(Endpoint ep: service.getEndpoints()) {
+            if(ep.getBinding() == targetBinding) {
+                return (RuntimeEndpoint) ep;
+            }
+        }
+        return endpoint; 
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultServiceInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultServiceInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSHostExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSHostExtensionPoint.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSHostExtensionPoint.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSHostExtensionPoint.java Sat Jun  5 05:17:47 2010
@@ -1,27 +1,27 @@
-/*
- * 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.host;
-
-
-public interface JMSHostExtensionPoint {
-
-    JMSServiceListenerFactory getJMSServiceListenerFactory();
-    
-}
+/*
+ * 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.host;
+
+
+public interface JMSHostExtensionPoint {
+
+    JMSServiceListenerFactory getJMSServiceListenerFactory();
+    
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSHostExtensionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSHostExtensionPoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListener.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListener.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListener.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListener.java Sat Jun  5 05:17:47 2010
@@ -1,29 +1,29 @@
-/*
- * 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.host;
-
-public interface JMSServiceListener {
-    
-    void start();
-    
-    void stop();
-    
-    String getDestinationName();
-}
+/*
+ * 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.host;
+
+public interface JMSServiceListener {
+    
+    void start();
+    
+    void stop();
+    
+    String getDestinationName();
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListener.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerDetails.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerDetails.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerDetails.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerDetails.java Sat Jun  5 05:17:47 2010
@@ -1,37 +1,37 @@
-/*
- * 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.host;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
-
-public interface JMSServiceListenerDetails {
-
-    JMSBinding getJmsBinding();
-
-    Binding getTargetBinding();
-    
-    RuntimeEndpoint getEndpoint();
-
-    MessageFactory getMessageFactory();
-
-}
+/*
+ * 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.host;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public interface JMSServiceListenerDetails {
+
+    JMSBinding getJmsBinding();
+
+    Binding getTargetBinding();
+    
+    RuntimeEndpoint getEndpoint();
+
+    MessageFactory getMessageFactory();
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerDetails.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerDetails.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerFactory.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerFactory.java Sat Jun  5 05:17:47 2010
@@ -1,27 +1,27 @@
-/*
- * 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.host;
-
-
-public interface JMSServiceListenerFactory {
-    
-    JMSServiceListener createJMSServiceListener(JMSServiceListenerDetails jmsServiceBindingProvider);
-
-}
+/*
+ * 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.host;
+
+
+public interface JMSServiceListenerFactory {
+    
+    JMSServiceListener createJMSServiceListener(JMSServiceListenerDetails jmsServiceBindingProvider);
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/JMSServiceListenerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultJMSResourceFactoryExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultJMSResourceFactoryExtensionPoint.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultJMSResourceFactoryExtensionPoint.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultJMSResourceFactoryExtensionPoint.java Sat Jun  5 05:17:47 2010
@@ -1,30 +1,30 @@
-/*
- * 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.provider;
-
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-
-public class DefaultJMSResourceFactoryExtensionPoint implements JMSResourceFactoryExtensionPoint {
-
-    public JMSResourceFactory createJMSResourceFactory(JMSBinding binding) {
-        return new JMSResourceFactoryImpl(binding.getConnectionFactoryName(), binding.getResponseConnectionFactoryName(), binding.getInitialContextFactoryName(), binding.getJndiURL());
-    }
-
-}
+/*
+ * 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.provider;
+
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+
+public class DefaultJMSResourceFactoryExtensionPoint implements JMSResourceFactoryExtensionPoint {
+
+    public JMSResourceFactory createJMSResourceFactory(JMSBinding binding) {
+        return new JMSResourceFactoryImpl(binding.getConnectionFactoryName(), binding.getResponseConnectionFactoryName(), binding.getInitialContextFactoryName(), binding.getJndiURL());
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultJMSResourceFactoryExtensionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultJMSResourceFactoryExtensionPoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java Sat Jun  5 05:17:47 2010
@@ -28,7 +28,7 @@ import org.apache.tuscany.sca.core.Exten
 /**
  * Utility methods to load JMS message processors.
  * 
- * @version $Rev: $ $Date: $
+ * @version $Rev$ $Date$
  */
 public class JMSMessageProcessorUtil {
 

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSMessageProcessorUtil.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java Sat Jun  5 05:17:47 2010
@@ -1,95 +1,95 @@
-/*
- * 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.provider;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-public interface JMSResourceFactory {
-
-    /*
-     * This is a simple implementation where a connection is created per binding Ideally the resource factory should be
-     * able to leverage the host environment to provide connection pooling if it can. E.g. if Tuscany is running inside 
-     * an AppServer Then we could leverage the JMS resources it provides
-     * 
-     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#getConnection()
-     */
-    public abstract Connection getConnection() throws NamingException, JMSException;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#createSession()
-     */
-    public abstract Session createSession() throws JMSException, NamingException;
-
-    public abstract void closeSession(Session session) throws JMSException;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#startConnection()
-     */
-    public abstract void startConnection() throws JMSException, NamingException;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#closeConnection()
-     */
-    public abstract void closeConnection() throws JMSException;
-
-    public abstract Destination lookupDestination(String destName) throws NamingException;
-
-    /**
-     * You can create a destination in ActiveMQ (and have it appear in JNDI) by putting "dynamicQueues/" in front of the queue name being looked up
-     */
-    public abstract Destination createDestination(String jndiName) throws NamingException;
-
-    /*
-     * This is a simple implementation where a connection is created per binding Ideally the resource factory should be
-     * able to leverage the host environment to provide connection pooling if it can. E.g. if Tuscany is running inside 
-     * an AppServer Then we could leverage the JMS resources it provides
-     * 
-     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#getConnection()
-     */
-    public abstract Connection getResponseConnection() throws NamingException, JMSException;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#createSession()
-     */
-    public abstract Session createResponseSession() throws JMSException, NamingException;
-
-    public abstract void closeResponseSession(Session session) throws JMSException;
-    
-    public abstract void closeResponseConnection() throws JMSException;
-
-    /*
-     * Indicates whether connections obtained using getConnection() or getResponseConnection()
-     * must be closed after each use.  This is necessary in environments where connections are
-     * shared with other users, or where connections cannot be held across transaction boundaries.
-     */
-    public abstract boolean isConnectionClosedAfterUse();
-}
+/*
+ * 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.provider;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Session;
+import javax.naming.NamingException;
+
+public interface JMSResourceFactory {
+
+    /*
+     * This is a simple implementation where a connection is created per binding Ideally the resource factory should be
+     * able to leverage the host environment to provide connection pooling if it can. E.g. if Tuscany is running inside 
+     * an AppServer Then we could leverage the JMS resources it provides
+     * 
+     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#getConnection()
+     */
+    public abstract Connection getConnection() throws NamingException, JMSException;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#createSession()
+     */
+    public abstract Session createSession() throws JMSException, NamingException;
+
+    public abstract void closeSession(Session session) throws JMSException;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#startConnection()
+     */
+    public abstract void startConnection() throws JMSException, NamingException;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#closeConnection()
+     */
+    public abstract void closeConnection() throws JMSException;
+
+    public abstract Destination lookupDestination(String destName) throws NamingException;
+
+    /**
+     * You can create a destination in ActiveMQ (and have it appear in JNDI) by putting "dynamicQueues/" in front of the queue name being looked up
+     */
+    public abstract Destination createDestination(String jndiName) throws NamingException;
+
+    /*
+     * This is a simple implementation where a connection is created per binding Ideally the resource factory should be
+     * able to leverage the host environment to provide connection pooling if it can. E.g. if Tuscany is running inside 
+     * an AppServer Then we could leverage the JMS resources it provides
+     * 
+     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#getConnection()
+     */
+    public abstract Connection getResponseConnection() throws NamingException, JMSException;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.tuscany.binding.jms.JMSResourceFactory#createSession()
+     */
+    public abstract Session createResponseSession() throws JMSException, NamingException;
+
+    public abstract void closeResponseSession(Session session) throws JMSException;
+    
+    public abstract void closeResponseConnection() throws JMSException;
+
+    /*
+     * Indicates whether connections obtained using getConnection() or getResponseConnection()
+     * must be closed after each use.  This is necessary in environments where connections are
+     * shared with other users, or where connections cannot be held across transaction boundaries.
+     */
+    public abstract boolean isConnectionClosedAfterUse();
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryExtensionPoint.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryExtensionPoint.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryExtensionPoint.java Sat Jun  5 05:17:47 2010
@@ -1,28 +1,28 @@
-/*
- * 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.provider;
-
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-
-public interface JMSResourceFactoryExtensionPoint {
-    
-    JMSResourceFactory createJMSResourceFactory(JMSBinding binding);
-
-}
+/*
+ * 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.provider;
+
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+
+public interface JMSResourceFactoryExtensionPoint {
+    
+    JMSResourceFactory createJMSResourceFactory(JMSBinding binding);
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryExtensionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryExtensionPoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message