Author: antelder
Date: Wed Jan 28 12:00:19 2009
New Revision: 738462

URL: http://svn.apache.org/viewvc?rev=738462&view=rev
Log:
Make the default jms host use the jms host extension point

Added:
    
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSHostExtensionPointImpl.java
    
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSServiceListenerFactoryImpl.java
    
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/
    
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/services/
    
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint

Added: 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSHostExtensionPointImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSHostExtensionPointImpl.java?rev=738462&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSHostExtensionPointImpl.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSHostExtensionPointImpl.java
 Wed Jan 28 12:00:19 2009
@@ -0,0 +1,42 @@
+/*
+ * 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.host.jms.asf;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint;
+import org.apache.tuscany.sca.host.jms.JMSServiceListenerFactory;
+import org.apache.tuscany.sca.work.WorkScheduler;
+
+public class JMSHostExtensionPointImpl implements JMSHostExtensionPoint {
+
+    private JMSServiceListenerFactory jmsServiceListenerFactory;
+
+    public JMSHostExtensionPointImpl(ExtensionPointRegistry extensionPoints) {
+        UtilityExtensionPoint utilities = 
extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
+        WorkScheduler workScheduler = 
utilities.getUtility(WorkScheduler.class);
+        this.jmsServiceListenerFactory = new 
JMSServiceListenerFactoryImpl(workScheduler);
+    }
+
+    public JMSServiceListenerFactory getJMSServiceListenerFactory() {
+        return jmsServiceListenerFactory;
+    }
+
+}

Added: 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSServiceListenerFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSServiceListenerFactoryImpl.java?rev=738462&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSServiceListenerFactoryImpl.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/JMSServiceListenerFactoryImpl.java
 Wed Jan 28 12:00:19 2009
@@ -0,0 +1,41 @@
+/*
+ * 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.host.jms.asf;
+
+import javax.jms.MessageListener;
+
+import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.host.jms.JMSServiceListener;
+import org.apache.tuscany.sca.host.jms.JMSServiceListenerFactory;
+import org.apache.tuscany.sca.work.WorkScheduler;
+
+public class JMSServiceListenerFactoryImpl implements 
JMSServiceListenerFactory {
+
+    private WorkScheduler workScheduler;
+
+    public JMSServiceListenerFactoryImpl(WorkScheduler workScheduler) {
+        this.workScheduler = workScheduler;
+    }
+
+    public JMSServiceListener createJMSServiceListener(String serviceName, 
boolean isCallbackService, JMSBinding jmsBinding, MessageListener listener) {
+        return new ASFListener(listener, serviceName, isCallbackService, 
jmsBinding, workScheduler);
+    }
+
+}

Added: 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint?rev=738462&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/host-jms-asf/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint
 Wed Jan 28 12:00:19 2009
@@ -0,0 +1,19 @@
+# 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.
+# Implementation class for the ModuleActivator
+org.apache.tuscany.sca.host.jms.asf.JMSHostExtensionPointImpl
+


Reply via email to