Added: 
tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory?rev=706556&view=auto
==============================================================================
--- 
tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
 (added)
+++ 
tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
 Tue Oct 21 02:04:28 2008
@@ -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 binding extension
+org.apache.tuscany.sca.binding.event.impl.EventBindingProviderFactory;model=org.apache.tuscany.sca.binding.event.impl.EventBindingImpl

Added: 
tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider?rev=706556&view=auto
==============================================================================
--- 
tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
 (added)
+++ 
tuscany/sandbox/event/modules/binding-event/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
 Tue Oct 21 02:04:28 2008
@@ -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 SCA Definitions Providers
+org.apache.tuscany.sca.binding.event.EventBindingDefinitionsProvider
\ No newline at end of file

Added: 
tuscany/sandbox/event/modules/binding-event/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/binding-event/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml?rev=706556&view=auto
==============================================================================
--- 
tuscany/sandbox/event/modules/binding-event/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
 (added)
+++ 
tuscany/sandbox/event/modules/binding-event/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
 Tue Oct 21 02:04:28 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.    
+-->
+<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0";
+                       targetNamespace="http://www.osoa.org/xmlns/sca/1.0";
+                       xmlns:sca="http://www.osoa.org/xmlns/sca/1.0";
+                       xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";>
+                       
+       <sca:bindingType type="sca:binding.event"  mayProvide="" 
alwaysProvides=""/>                    
+ </sca:definitions>
\ No newline at end of file

Propchange: 
tuscany/sandbox/event/modules/binding-event/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/event/modules/binding-event/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
tuscany/sandbox/event/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/AbstractImplementation.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/AbstractImplementation.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/AbstractImplementation.java
 (original)
+++ 
tuscany/sandbox/event/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/AbstractImplementation.java
 Tue Oct 21 02:04:28 2008
@@ -24,7 +24,9 @@
 
 import org.apache.tuscany.sca.assembly.ConfiguredOperation;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.Consumer;
 import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.Producer;
 import org.apache.tuscany.sca.assembly.Property;
 import org.apache.tuscany.sca.assembly.Reference;
 import org.apache.tuscany.sca.assembly.Service;
@@ -42,6 +44,8 @@
 
     private List<Service> services = new ArrayList<Service>();
     private List<Reference> references = new ArrayList<Reference>();
+    private List<Producer> producers = new ArrayList<Producer>();
+    private List<Consumer> consumers = new ArrayList<Consumer>();
     private List<Property> properties = new ArrayList<Property>();
     private ConstrainingType constrainingType;
     private String uri;
@@ -66,6 +70,16 @@
     public List<Service> getServices() {
         return services;
     }
+    
+
+    public List<Producer> getProducers() {
+        return producers;
+    }
+
+    public List<Consumer> getConsumers() {
+        return consumers;
+    }
+
 
     public String getURI() {
         return uri;

Modified: 
tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
 (original)
+++ 
tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
 Tue Oct 21 02:04:28 2008
@@ -33,6 +33,7 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.EndpointFactory;
+import org.apache.tuscany.sca.assembly.EventBindingFactory;
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
@@ -216,6 +217,7 @@
         //Get factory extension point
         ModelFactoryExtensionPoint factories = 
registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
         SCABindingFactory scaBindingFactory = 
factories.getFactory(SCABindingFactory.class);
+        EventBindingFactory eventBindingFactory = 
factories.getFactory(EventBindingFactory.class);
         IntentAttachPointTypeFactory intentAttachPointTypeFactory = 
factories.getFactory(IntentAttachPointTypeFactory.class);
         EndpointFactory endpointFactory = 
factories.getFactory(EndpointFactory.class);        
         UtilityExtensionPoint utilities = 
registry.getExtensionPoint(UtilityExtensionPoint.class);
@@ -231,6 +233,7 @@
         compositeBuilder = 
ReallySmallRuntimeBuilder.createCompositeBuilder(monitor,
                                                                             
assemblyFactory,
                                                                             
scaBindingFactory,
+                                                                            
eventBindingFactory,
                                                                             
endpointFactory,
                                                                             
intentAttachPointTypeFactory,
                                                                             
documentBuilderFactory,

Modified: 
tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
 (original)
+++ 
tuscany/sandbox/event/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
 Tue Oct 21 02:04:28 2008
@@ -32,6 +32,7 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.EndpointFactory;
+import org.apache.tuscany.sca.assembly.EventBindingFactory;
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
@@ -142,6 +143,7 @@
     public static CompositeBuilder createCompositeBuilder(Monitor monitor,
                                                           AssemblyFactory 
assemblyFactory,
                                                           SCABindingFactory 
scaBindingFactory,
+                                                          EventBindingFactory 
eventBindingFactory,
                                                           EndpointFactory 
endpointFactory,
                                                           
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
                                                           
DocumentBuilderFactory documentBuilderFactory,
@@ -153,6 +155,7 @@
         return new CompositeBuilderImpl(assemblyFactory, 
                                         endpointFactory,
                                         scaBindingFactory, 
+                                        eventBindingFactory,
                                         intentAttachPointTypeFactory, 
                                         documentBuilderFactory,
                                         transformerFactory,

Modified: 
tuscany/sandbox/event/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/impl/TestImplementationImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/impl/TestImplementationImpl.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/impl/TestImplementationImpl.java
 (original)
+++ 
tuscany/sandbox/event/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/impl/TestImplementationImpl.java
 Tue Oct 21 02:04:28 2008
@@ -23,6 +23,8 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.Consumer;
+import org.apache.tuscany.sca.assembly.Producer;
 import org.apache.tuscany.sca.assembly.Property;
 import org.apache.tuscany.sca.assembly.Reference;
 import org.apache.tuscany.sca.assembly.Service;
@@ -92,8 +94,19 @@
         // The test implementation does not support properties
         return Collections.emptyList();
     }
+   
 
-    public String getURI() {
+    public List<Consumer> getConsumers() {
+       // The test implementation does not support consumers
+        return Collections.emptyList();
+       }
+
+       public List<Producer> getProducers() {
+               // The test implementation does not support producers
+        return Collections.emptyList();
+       }
+
+       public String getURI() {
         // The test implementation does not have a URI
         return null;
     }

Modified: 
tuscany/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
 Tue Oct 21 02:04:28 2008
@@ -36,7 +36,9 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.ComponentType;
 import org.apache.tuscany.sca.assembly.ConfiguredOperation;
+import org.apache.tuscany.sca.assembly.Consumer;
 import org.apache.tuscany.sca.assembly.OperationsConfigurator;
+import org.apache.tuscany.sca.assembly.Producer;
 import org.apache.tuscany.sca.assembly.Property;
 import org.apache.tuscany.sca.assembly.Reference;
 import org.apache.tuscany.sca.assembly.Service;
@@ -274,6 +276,26 @@
             }
             impl.getServices().clear();
             impl.getServices().addAll(serviceMap.values());
+            
+            Map<String, Producer> producerMap = new HashMap<String, 
Producer>();
+            for (Producer producer : impl.getProducers()) {
+               producerMap.put(producer.getName(), producer);
+            }
+            for (Producer producer : componentType.getProducers()) {
+               producerMap.put(producer.getName(), producer);
+            }
+            impl.getProducers().clear();
+            impl.getProducers().addAll(producerMap.values());
+            
+            Map<String, Consumer> consumerMap = new HashMap<String, 
Consumer>();
+            for (Consumer consumer : impl.getConsumers()) {
+               consumerMap.put(consumer.getName(), consumer);
+            }
+            for (Consumer consumer : componentType.getConsumers()) {
+               consumerMap.put(consumer.getName(), consumer);
+            }
+            impl.getConsumers().clear();
+            impl.getConsumers().addAll(consumerMap.values());
 
             Map<String, Property> propMap = new HashMap<String, Property>();
             for (Property prop : impl.getProperties()) {

Modified: 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementation.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementation.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementation.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementation.java
 Tue Oct 21 02:04:28 2008
@@ -155,6 +155,7 @@
      */
     Map<String, JavaElementImpl> getReferenceMembers();
 
+
     /**
      * @return the scope
      */

Modified: 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationActivator.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationActivator.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationActivator.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationActivator.java
 Tue Oct 21 02:04:28 2008
@@ -29,6 +29,7 @@
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.BaseJavaClassVisitor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ComponentNameProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ConstructorProcessor;
+import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ConsumerProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ContextProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ConversationIDProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ConversationProcessor;
@@ -37,6 +38,7 @@
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.HeuristicPojoProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.InitProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.PolicyProcessor;
+import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ProducerProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.PropertyProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ReferenceProcessor;
 import 
org.apache.tuscany.sca.implementation.java.introspect.impl.ResourceProcessor;
@@ -70,6 +72,8 @@
                                         new 
ReferenceProcessor(assemblyFactory, javaFactory),
                                         new 
ResourceProcessor(assemblyFactory), new ScopeProcessor(assemblyFactory),
                                         new ServiceProcessor(assemblyFactory, 
javaFactory),
+                                        new ProducerProcessor(assemblyFactory, 
javaFactory),
+                                        new ConsumerProcessor(assemblyFactory, 
javaFactory),
                                         new 
HeuristicPojoProcessor(assemblyFactory, javaFactory),
                                         new PolicyProcessor(assemblyFactory, 
policyFactory)};
 

Modified: 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationImpl.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationImpl.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationImpl.java
 Tue Oct 21 02:04:28 2008
@@ -44,6 +44,8 @@
     private final Map<String, JavaElementImpl> propertyMembers = new 
HashMap<String, JavaElementImpl>();
     private final Map<String, JavaElementImpl> referenceMembers = new 
HashMap<String, JavaElementImpl>();
     private final Map<String, Collection<JavaElementImpl>> callbackMembers = 
new HashMap<String, Collection<JavaElementImpl>>();
+    private final Map<String, Collection<JavaElementImpl>> consumerMembers = 
new HashMap<String, Collection<JavaElementImpl>>();
+    private final Map<String, JavaElementImpl> producerMembers = new 
HashMap<String, JavaElementImpl>();
     private List<Member> conversationIDMember = new ArrayList<Member>();
     private boolean eagerInit;
     private boolean allowsPassByReference;
@@ -133,7 +135,15 @@
         return referenceMembers;
     }
 
-    public JavaScopeImpl getJavaScope() {
+    public Map<String, Collection<JavaElementImpl>> getConsumerMembers() {
+       return consumerMembers;
+       }
+
+       public Map<String, JavaElementImpl> getProducerMembers() {
+               return producerMembers;
+       }
+
+       public JavaScopeImpl getJavaScope() {
         return scope;
     }
 

Modified: 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java
 Tue Oct 21 02:04:28 2008
@@ -55,7 +55,7 @@
                                     SCADefinitions policyDefinitions,
                                     Monitor monitor) {
         super(assemblyFactory, scaBindingFactory,
-              null, null,
+              null, null, null,
               interfaceContractMapper, policyDefinitions, monitor);
     }
 
@@ -66,7 +66,7 @@
                                                   InterfaceContractMapper 
interfaceContractMapper,
                                                   SCADefinitions 
policyDefinitions,
                                                   Monitor monitor) {
-        super(assemblyFactory, scaBindingFactory,
+        super(assemblyFactory, scaBindingFactory, null,
               documentBuilderFactory, transformerFactory,
               interfaceContractMapper, policyDefinitions, monitor);
     }

Modified: 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java
 Tue Oct 21 02:04:28 2008
@@ -24,6 +24,8 @@
 
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.Consumer;
+import org.apache.tuscany.sca.assembly.Producer;
 import org.apache.tuscany.sca.assembly.Property;
 import org.apache.tuscany.sca.assembly.Reference;
 import org.apache.tuscany.sca.assembly.Service;
@@ -68,6 +70,18 @@
         // The node implementation does not support properties
         return Collections.emptyList();
     }
+    
+
+
+    public List<Consumer> getConsumers() {
+       // The test implementation does not support consumers
+        return Collections.emptyList();
+       }
+
+       public List<Producer> getProducers() {
+               // The test implementation does not support producers
+        return Collections.emptyList();
+       }
 
     public String getURI() {
         return uri;

Modified: 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java
 (original)
+++ 
tuscany/sandbox/event/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java
 Tue Oct 21 02:04:28 2008
@@ -23,6 +23,8 @@
 
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.Consumer;
+import org.apache.tuscany.sca.assembly.Producer;
 import org.apache.tuscany.sca.assembly.Property;
 import org.apache.tuscany.sca.assembly.Reference;
 import org.apache.tuscany.sca.assembly.Service;
@@ -65,6 +67,16 @@
         // The node implementation does not support properties
         return Collections.emptyList();
     }
+    
+    public List<Consumer> getConsumers() {
+       // The test implementation does not support consumers
+        return Collections.emptyList();
+       }
+
+       public List<Producer> getProducers() {
+               // The test implementation does not support producers
+        return Collections.emptyList();
+       }
 
     public String getURI() {
         return uri;

Modified: 
tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
 (original)
+++ 
tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
 Tue Oct 21 02:04:28 2008
@@ -33,6 +33,7 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.EndpointFactory;
+import org.apache.tuscany.sca.assembly.EventBindingFactory;
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
@@ -218,6 +219,7 @@
         //Get factory extension point
         ModelFactoryExtensionPoint factories = 
registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
         SCABindingFactory scaBindingFactory = 
factories.getFactory(SCABindingFactory.class);
+        EventBindingFactory eventBindingFactory = 
factories.getFactory(EventBindingFactory.class);
         IntentAttachPointTypeFactory intentAttachPointTypeFactory =
             factories.getFactory(IntentAttachPointTypeFactory.class);
         EndpointFactory endpointFactory = 
factories.getFactory(EndpointFactory.class);
@@ -235,6 +237,7 @@
             RuntimeBuilder.createCompositeBuilder(monitor,
                                                   assemblyFactory,
                                                   scaBindingFactory,
+                                                  eventBindingFactory,
                                                   endpointFactory,
                                                   intentAttachPointTypeFactory,
                                                   documentBuilderFactory,

Modified: 
tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
 (original)
+++ 
tuscany/sandbox/event/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
 Tue Oct 21 02:04:28 2008
@@ -32,6 +32,7 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.EndpointFactory;
+import org.apache.tuscany.sca.assembly.EventBindingFactory;
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
@@ -143,6 +144,7 @@
     public static CompositeBuilder createCompositeBuilder(Monitor monitor,
                                                           AssemblyFactory 
assemblyFactory,
                                                           SCABindingFactory 
scaBindingFactory,
+                                                          EventBindingFactory 
eventBindingFactory,
                                                           EndpointFactory 
endpointFactory,
                                                           
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
                                                           
DocumentBuilderFactory documentBuilderFactory,
@@ -150,7 +152,7 @@
                                                           
InterfaceContractMapper interfaceContractMapper,
                                                           SCADefinitions 
policyDefinitions) {
 
-        return new CompositeBuilderImpl(assemblyFactory, endpointFactory, 
scaBindingFactory,
+        return new CompositeBuilderImpl(assemblyFactory, endpointFactory, 
scaBindingFactory, eventBindingFactory,
                                         intentAttachPointTypeFactory, 
documentBuilderFactory, transformerFactory,
                                         interfaceContractMapper, 
policyDefinitions,
                                         monitor);

Added: 
tuscany/sandbox/event/modules/sca-api/src/main/java/org/osoa/sca/annotations/EventType.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/modules/sca-api/src/main/java/org/osoa/sca/annotations/EventType.java?rev=706556&view=auto
==============================================================================
--- 
tuscany/sandbox/event/modules/sca-api/src/main/java/org/osoa/sca/annotations/EventType.java
 (added)
+++ 
tuscany/sandbox/event/modules/sca-api/src/main/java/org/osoa/sca/annotations/EventType.java
 Tue Oct 21 02:04:28 2008
@@ -0,0 +1,30 @@
+/*
+ * (c) Copyright BEA Systems, Inc., Cape Clear Software, International 
Business Machines Corp, Interface21, IONA Technologies,
+ * Oracle, Primeton Technologies, Progress Software, Red Hat, Rogue Wave 
Software, SAP AG., Siemens AG., Software AG., Sybase
+ * Inc., TIBCO Software Inc., 2005, 2007. All rights reserved.
+ * 
+ * see 
http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate the service interfaces exposed by a Java class.
+ *
+ * @version $$
+ */
[EMAIL PROTECTED]({TYPE})
[EMAIL PROTECTED](RUNTIME)
+public @interface EventType {
+    
+    /**
+     * Name of this EventType
+     * @return
+     */
+    String name() default "";
+}

Propchange: 
tuscany/sandbox/event/modules/sca-api/src/main/java/org/osoa/sca/annotations/EventType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/event/modules/sca-api/src/main/java/org/osoa/sca/annotations/EventType.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java
 (original)
+++ 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java
 Tue Oct 21 02:04:28 2008
@@ -18,6 +18,11 @@
  */
 package weather;
 
+import org.osoa.sca.annotations.Remotable;
+
+// FIXME: At the moment, we need this @Remotable to make sure all the 
processing
+//        is done properly
[EMAIL PROTECTED]
 public interface WeatherPublisher {
        
        void publishWeatherReport(String report);

Modified: 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisherComponent.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisherComponent.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisherComponent.java
 (original)
+++ 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisherComponent.java
 Tue Oct 21 02:04:28 2008
@@ -31,7 +31,7 @@
 public class WeatherPublisherComponent implements WeatherService {
     
     @Producer
-    public WeatherPublisher publisher;
+    public WeatherPublisher weatherPublisher;
     
     public void start() {
         try {
@@ -47,7 +47,7 @@
         int temperature = new Random().nextInt(20);
         String report = "Location: New York, Time: " + new Date() + ", 
Temperature " + temperature;
         
-        publisher.publishWeatherReport(report);
+        weatherPublisher.publishWeatherReport(report);
     }
     
 }

Modified: 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java
 (original)
+++ 
tuscany/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java
 Tue Oct 21 02:04:28 2008
@@ -21,13 +21,15 @@
 import java.util.Date;
 
 import org.osoa.sca.annotations.Consumer;
+import org.osoa.sca.annotations.Remotable;
 
 
 
 /**
  * The WeatherService subscriber implementation - receives weather reports and 
prints it on stdout
  */
-public class WeatherSubscriberComponent  {
[EMAIL PROTECTED]
+public class WeatherSubscriberComponent {
       
        @Consumer(name="weatherSubscriber")
     public void onWeather(String report) {

Modified: 
tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherPublisher.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherPublisher.composite?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherPublisher.composite
 (original)
+++ 
tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherPublisher.composite
 Tue Oct 21 02:04:28 2008
@@ -31,6 +31,10 @@
         
         
         <producer name="weatherPublisher">
+          <binding.jms 
initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+                       jndiURL="tcp://localhost:61619">
+              <destination name="WeatherQueue" create="ifnotexist"/>
+          </binding.jms>
         </producer>
         
     </component>

Modified: 
tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherSubscriber.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherSubscriber.composite?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherSubscriber.composite
 (original)
+++ 
tuscany/sandbox/event/samples/event-jms/src/main/resources/weatherSubscriber.composite
 Tue Oct 21 02:04:28 2008
@@ -28,6 +28,10 @@
       
       
       <consumer name="weatherSubscriber">
+          <binding.jms 
initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+                             jndiURL="tcp://localhost:61619">
+              <destination name="WeatherQueue" create="ifnotexist"/>
+          </binding.jms>
       </consumer>
       
     </component>

Modified: 
tuscany/sandbox/event/samples/event-jms/src/test/java/weather/WeatherTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/event/samples/event-jms/src/test/java/weather/WeatherTestCase.java?rev=706556&r1=706555&r2=706556&view=diff
==============================================================================
--- 
tuscany/sandbox/event/samples/event-jms/src/test/java/weather/WeatherTestCase.java
 (original)
+++ 
tuscany/sandbox/event/samples/event-jms/src/test/java/weather/WeatherTestCase.java
 Tue Oct 21 02:04:28 2008
@@ -20,6 +20,7 @@
 package weather;
 
 
+import org.apache.activemq.broker.BrokerService;
 import org.apache.tuscany.sca.host.embedded.SCADomain;
 import org.junit.After;
 import org.junit.Before;
@@ -33,14 +34,19 @@
  */
 public class WeatherTestCase {
 
+    private BrokerService jmsBroker;
+         
     private WeatherService weatherService;
     private SCADomain weatherSubscriberDomain;
     private SCADomain weatherPublisherDomain;
    
 
     @Before
-    public void startClient() throws Exception {
+    public void startWeatherTest() throws Exception {
         try {
+
+            startBroker();
+               
             weatherPublisherDomain = 
SCADomain.newInstance("weatherPublisher.composite");
             weatherSubscriberDomain = 
SCADomain.newInstance("weatherSubscriber.composite");
             weatherService = 
weatherPublisherDomain.getService(WeatherService.class, 
"WeatherPublisherComponent");
@@ -51,7 +57,7 @@
     }
     
     @Test
-    public void testClient() throws Exception {
+    public void runWeatherTest() throws Exception {
         weatherService.start();
     }
     
@@ -62,5 +68,13 @@
         weatherSubscriberDomain.close();
     }
 
-    
+
+
+    protected void startBroker() throws Exception {
+        jmsBroker = new BrokerService();
+        jmsBroker.setPersistent(false);
+        jmsBroker.setUseJmx(false);
+        jmsBroker.addConnector("tcp://localhost:61619");
+        jmsBroker.start();
+    }
 }


Reply via email to