servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r468487 - in /incubator/servicemix/trunk: servicemix-bean/src/main/java/org/apache/servicemix/bean/ servicemix-common/src/main/java/org/apache/servicemix/common/ servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ servic...
Date Fri, 27 Oct 2006 18:35:30 GMT
Author: gnodet
Date: Fri Oct 27 11:35:28 2006
New Revision: 468487

URL: http://svn.apache.org/viewvc?view=rev&rev=468487
Log:
Introduce more endpoint types and refactor existing ones

Added:
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/SimpleEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/EPRTest.java
Removed:
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/PollingEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ProviderEndpoint.java
Modified:
    incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java
    incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
    incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/EndpointFinder.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ExternalEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceMixComponent.java
    incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileComponent.java
    incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileEndpoint.java
    incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollingEndpoint.java
    incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/DynamicEndpointTest.java
    incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java
    incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/SpringComponentTest.java
    incubator/servicemix/trunk/servicemix-file/src/test/resources/spring-polling.xml
    incubator/servicemix/trunk/servicemix-ftp/   (props changed)
    incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java
    incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
    incubator/servicemix/trunk/servicemix-jms/src/main/java/org/apache/servicemix/jms/JmsLifeCycle.java
    incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Component.java
    incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java
    incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java
    incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java
    incubator/servicemix/trunk/servicemix-xmpp/   (props changed)
    incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPComponent.java
    incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPEndpoint.java
    incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPMarshaler.java

Modified: incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java Fri Oct 27 11:35:28 2006
@@ -16,24 +16,20 @@
  */
 package org.apache.servicemix.bean;
 
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.jbi.servicedesc.ServiceEndpoint;
+
 import org.apache.servicemix.common.DefaultComponent;
 import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ResolvedEndpoint;
 import org.apache.servicemix.jbi.util.IntrospectionSupport;
 import org.apache.servicemix.jbi.util.URISupport;
 import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.context.ApplicationContextAware;
 import org.springframework.context.ApplicationContext;
-import org.w3c.dom.DocumentFragment;
-
-import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-import java.util.ArrayList;
+import org.springframework.context.ApplicationContextAware;
 
 /**
  * A JBI component for binding beans to the JBI bus which work directly off of the JBI messages
@@ -45,10 +41,6 @@
  */
 public class BeanComponent extends DefaultComponent implements ApplicationContextAware {
 
-    public final static String EPR_URI = "urn:servicemix:bean";
-    public final static QName EPR_SERVICE = new QName(EPR_URI, "BeanComponent");
-    public final static String EPR_NAME = "epr";
-
     private BeanEndpoint[] endpoints;
     private String[] searchPackages;
     private ApplicationContext applicationContext;
@@ -78,10 +70,6 @@
         this.searchPackages = searchPackages;
     }
 
-    public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
-        return ResolvedEndpoint.resolveEndpoint(epr, EPR_URI, EPR_NAME, EPR_SERVICE, "bean:");
-    }
-
     protected List getConfiguredEndpoints() {
         List list = new ArrayList(asList(getEndpoints()));
         if (searchPackages != null) {
@@ -93,10 +81,6 @@
 
     protected Class[] getEndpointClasses() {
         return new Class[]{BeanEndpoint.class};
-    }
-
-    protected QName getEPRServiceName() {
-        return EPR_SERVICE;
     }
 
     protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {

Modified: incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java Fri Oct 27 11:35:28 2006
@@ -49,7 +49,7 @@
 import org.apache.servicemix.bean.support.ReflectionUtils;
 import org.apache.servicemix.bean.support.Request;
 import org.apache.servicemix.common.EndpointComponentContext;
-import org.apache.servicemix.common.ProviderEndpoint;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.expression.JAXPStringXPathExpression;
 import org.apache.servicemix.expression.PropertyExpression;
 import org.apache.servicemix.jbi.resolver.URIResolver;

Modified: incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/EndpointFinder.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/EndpointFinder.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/EndpointFinder.java (original)
+++ incubator/servicemix/trunk/servicemix-bean/src/main/java/org/apache/servicemix/bean/EndpointFinder.java Fri Oct 27 11:35:28 2006
@@ -115,7 +115,7 @@
         answer.setEndpoint(endpointAnnotation.name());
         QName service = createQName(endpointAnnotation.serviceName(), endpointAnnotation.targetNamespace());
         if (service == null) {
-            service = BeanComponent.EPR_SERVICE;
+            service = beanComponent.getEPRServiceName();
         }
         answer.setService(service);
         return answer;

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java Fri Oct 27 11:35:28 2006
@@ -113,7 +113,7 @@
         return this.context.getMBeanNames().createCustomComponentMBeanName("Configuration");
     }
 
-    protected QName getEPRServiceName() {
+    public QName getEPRServiceName() {
         return null;
     }
 

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java Fri Oct 27 11:35:28 2006
@@ -29,6 +29,7 @@
 import javax.jbi.messaging.MessagingException;
 import javax.jbi.messaging.MessageExchange.Role;
 import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.xml.namespace.QName;
 
 /**
  * Base class for a component.
@@ -193,4 +194,8 @@
         lifeCycle.sendConsumerExchange(exchange, endpoint);
     }
 
+    public QName getEPRElementName() {
+        return null;
+    }
+    
 }

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java Fri Oct 27 11:35:28 2006
@@ -30,6 +30,8 @@
 import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.xml.namespace.QName;
+
 import java.util.Arrays;
 import java.util.List;
 import java.util.Iterator;
@@ -128,10 +130,54 @@
         return true;
     }
 
+    public QName getEPRServiceName() {
+        return new QName(getEPRUri(), getEPRComponentName());
+    }
+    
+    public QName getEPRElementName() {
+        return new QName(getEPRUri(), "epr");
+    }
+    
+    protected String[] getEPRProtocols() {
+        String protocol = getEPRStrippedComponentName().toLowerCase() + ":";
+        return new String[] { protocol };
+    }
+    
+    private String getEPRComponentName() {
+        String suffix = getClass().getName();
+        suffix = suffix.substring(suffix.lastIndexOf('.') + 1);
+        if (suffix.lastIndexOf('$') > 0) {
+            suffix = suffix.substring(suffix.lastIndexOf('$') + 1);
+        }
+        return suffix;
+    }
+    
+    private String getEPRStrippedComponentName() {
+        String suffix = getEPRComponentName();
+        if (suffix.endsWith("Component")) {
+            suffix = suffix.substring(0, suffix.length() - 9);
+        }
+        return suffix;
+    }
+    
+    private String getEPRUri() {
+        String uri = "urn:servicemix:" + getEPRStrippedComponentName().toLowerCase();
+        return uri;
+    }
+
     /* (non-Javadoc)
      * @see javax.jbi.component.Component#resolveEndpointReference(org.w3c.dom.DocumentFragment)
      */
     public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
+        String[] protocols = getEPRProtocols();
+        QName elementName = getEPRElementName();
+        QName serviceName = getEPRServiceName();
+        for (int i = 0; i < protocols.length; i++) {
+            ServiceEndpoint ep = ResolvedEndpoint.resolveEndpoint(epr, elementName, serviceName, protocols[i]);
+            if (ep != null) {
+                return ep;
+            }
+        }
         return null;
     }
 

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ExternalEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ExternalEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ExternalEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ExternalEndpoint.java Fri Oct 27 11:35:28 2006
@@ -27,28 +27,31 @@
 
 public class ExternalEndpoint implements ServiceEndpoint {
 
-    private String eprUri;
-    private String eprName;
-    private String uri;
-    private String endpointName;
+    private QName eprElement;
+    private String locationUri;
     private QName serviceName;
+    private String endpointName;
     private QName[] interfaces = null;
     
-    public ExternalEndpoint(String eprUri, String eprName, String uri, 
-                            String epName, QName serviceName, QName[] interfaces) {
-        this.eprUri = eprUri;
-        this.eprName = eprName;
-        this.uri = uri;
+    public ExternalEndpoint(QName eprElement, 
+                            String locationUri,
+                            QName serviceName, 
+                            String epName, 
+                            QName[] interfaces) {
+        this.eprElement = eprElement;
+        this.locationUri = locationUri;
         this.endpointName = epName;
         this.serviceName = serviceName;
         this.interfaces = interfaces;
     }
 
-    public ExternalEndpoint(String eprUri, String eprName, String uri, 
-                            String epName, QName serviceName, QName interfaceName) {
-        this.eprUri = eprUri;
-        this.eprName = eprName;
-        this.uri = uri;
+    public ExternalEndpoint(QName eprElement, 
+                            String locationUri,
+                            QName serviceName, 
+                            String epName, 
+                            QName interfaceName) {
+        this.eprElement = eprElement;
+        this.locationUri = locationUri;
         this.endpointName = epName;
         this.serviceName = serviceName;
         if (interfaceName != null) {
@@ -62,8 +65,8 @@
             dbf.setNamespaceAware(true);
             Document doc = dbf.newDocumentBuilder().newDocument();
             DocumentFragment df = doc.createDocumentFragment();
-            Element e = doc.createElementNS(eprUri, eprName);
-            Text t = doc.createTextNode(uri);
+            Element e = doc.createElementNS(eprElement.getNamespaceURI(), eprElement.getLocalPart());
+            Text t = doc.createTextNode(locationUri);
             e.appendChild(t);
             df.appendChild(e);
             return df;
@@ -72,16 +75,16 @@
         }
     }
 
+    public QName getServiceName() {
+        return serviceName;
+    }
+
     public String getEndpointName() {
         return endpointName;
     }
 
     public QName[] getInterfaces() {
         return interfaces;
-    }
-
-    public QName getServiceName() {
-        return serviceName;
     }
 
 }

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java Fri Oct 27 11:35:28 2006
@@ -71,7 +71,7 @@
         return interfaces;
     }
 
-    public static ServiceEndpoint resolveEndpoint(DocumentFragment epr, String eprUri, String eprName, QName serviceName, String uriPrefix) {
+    public static ServiceEndpoint resolveEndpoint(DocumentFragment epr, QName elementName, QName serviceName, String uriPrefix) {
         if (epr.getChildNodes().getLength() == 1) {
             Node child = epr.getFirstChild();
             if (child instanceof Element) {
@@ -79,7 +79,7 @@
                 String nsUri = elem.getNamespaceURI();
                 String name = elem.getLocalName();
                 // Check simple endpoints
-                if (eprUri.equals(nsUri) && eprName.equals(name)) {
+                if (elementName.getNamespaceURI().equals(nsUri) && elementName.getLocalPart().equals(name)) {
                     return new ResolvedEndpoint(epr, DOMUtil.getElementText(elem), serviceName);
                     // Check WSA endpoints
                 }

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceMixComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceMixComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceMixComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceMixComponent.java Fri Oct 27 11:35:28 2006
@@ -24,6 +24,7 @@
 import javax.jbi.component.ComponentContext;
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.MessagingException;
+import javax.xml.namespace.QName;
 
 /**
  * Represents an extended JBI Component implementation which exposes some extra features
@@ -65,4 +66,9 @@
      * @throws MessagingException
      */
     public void sendConsumerExchange(MessageExchange exchange, Endpoint endpoint) throws MessagingException;
+
+    /**
+     * @return the QName of the element used in EPR
+     */
+    public QName getEPRElementName();
 }

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java?view=auto&rev=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java Fri Oct 27 11:35:28 2006
@@ -0,0 +1,161 @@
+/*
+ * 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.servicemix.common.endpoints;
+
+import javax.jbi.component.ComponentContext;
+import javax.jbi.management.DeploymentException;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessageExchange.Role;
+import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.ExternalEndpoint;
+import org.apache.servicemix.common.ServiceMixComponent;
+import org.apache.servicemix.common.ServiceUnit;
+import org.apache.servicemix.jbi.resolver.URIResolver;
+
+public abstract class ConsumerEndpoint extends SimpleEndpoint {
+
+    private ServiceEndpoint activated;
+    private QName targetInterface;
+    private QName targetService;
+    private String targetEndpoint;
+    private String targetUri;
+    
+    public ConsumerEndpoint() {
+    }
+
+    public ConsumerEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
+        super(serviceUnit, service, endpoint);
+    }
+
+    public ConsumerEndpoint(DefaultComponent component, ServiceEndpoint endpoint) {
+        super(component.getServiceUnit(), endpoint.getServiceName(), endpoint.getEndpointName());
+    }
+
+    public Role getRole() {
+        return Role.CONSUMER;
+    }
+
+    public synchronized void start() throws Exception {
+        ServiceMixComponent component = getServiceUnit().getComponent();
+        ComponentContext ctx = component.getComponentContext();
+        activated = new ExternalEndpoint(component.getEPRElementName(),
+                                         getLocationURI(),
+                                         getService(),
+                                         getEndpoint(),
+                                         getInterfaceName());
+        ctx.registerExternalEndpoint(activated);
+    }
+
+    public synchronized void stop() throws Exception {
+        ServiceMixComponent component = getServiceUnit().getComponent();
+        ComponentContext ctx = component.getComponentContext();
+        if (activated != null) {
+            ServiceEndpoint se = activated;
+            activated = null;
+            ctx.deregisterExternalEndpoint(se);
+        }
+    }
+
+    public abstract String getLocationURI();
+
+    /**
+     * @return the targetEndpoint
+     */
+    public String getTargetEndpoint() {
+        return targetEndpoint;
+    }
+
+    /**
+     * @param targetEndpoint the targetEndpoint to set
+     */
+    public void setTargetEndpoint(String targetEndpoint) {
+        this.targetEndpoint = targetEndpoint;
+    }
+
+    /**
+     * @return the targetInterface
+     */
+    public QName getTargetInterface() {
+        return targetInterface;
+    }
+
+    /**
+     * @param targetInterface the targetInterface to set
+     */
+    public void setTargetInterface(QName targetInterface) {
+        this.targetInterface = targetInterface;
+    }
+
+    /**
+     * @return the targetService
+     */
+    public QName getTargetService() {
+        return targetService;
+    }
+
+    /**
+     * @param targetService the targetService to set
+     */
+    public void setTargetService(QName targetService) {
+        this.targetService = targetService;
+    }
+
+    /**
+     * @return the targetUri
+     */
+    public String getTargetUri() {
+        return targetUri;
+    }
+
+    /**
+     * @param targetUri the targetUri to set
+     */
+    public void setTargetUri(String targetUri) {
+        this.targetUri = targetUri;
+    }
+    
+    protected void configureExchangeTarget(MessageExchange exchange) {
+        if (targetUri != null) {
+            URIResolver.configureExchange(exchange, getContext(), targetUri);
+        }
+        if (targetInterface != null) {
+            exchange.setInterfaceName(targetInterface);
+        }
+        if (targetService != null) {
+            exchange.setService(targetService);
+            if (targetEndpoint != null) {
+                ServiceEndpoint se = getContext().getEndpoint(targetService, targetEndpoint);
+                if (se != null) {
+                    exchange.setEndpoint(se);
+                } else {
+                    logger.warn("Target service (" + targetService + ") and endpoint (" + targetEndpoint + ")" + 
+                            " specified, but no matching endpoint found.  Only the service will be used for routing.");
+                }
+            }
+        }
+    }
+
+    public void validate() throws DeploymentException {
+        super.validate();
+        if (targetInterface == null && targetService == null && targetUri == null) {
+            throw new DeploymentException("targetInterface, targetService or targetUri should be specified");
+        }
+    }
+}

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java?view=auto&rev=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java Fri Oct 27 11:35:28 2006
@@ -0,0 +1,176 @@
+/*
+ * 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.servicemix.common.endpoints;
+
+import java.util.Date;
+
+import javax.jbi.JBIException;
+
+import org.apache.servicemix.components.varscheduler.ScheduleIterator;
+import org.apache.servicemix.components.varscheduler.Scheduler;
+import org.apache.servicemix.components.varscheduler.SchedulerTask;
+import org.apache.servicemix.executors.Executor;
+
+/**
+ * An implementation inheritence class for an endpoint which polls some resource at periodic intervals to decide if
+ * there is an event to process.
+ *
+ * @version $Revision: 464478 $
+ */
+public abstract class PollingEndpoint extends ConsumerEndpoint {
+    
+    private Executor executor;
+    private Scheduler scheduler;
+    private Date firstTime;
+    private long period = 5000;
+    private long delay;
+    private SchedulerTask schedulerTask;
+    private ScheduleIterator scheduleIterator;
+    private boolean started;
+    private boolean scheduleExecutedFlag;
+
+    /**
+     * Polls the underlying resource to see if some event is required
+     *
+     * @throws JBIException
+     */
+    public abstract void poll() throws Exception;
+
+
+    // Properties
+    // -------------------------------------------------------------------------
+    public Executor getExecutor() {
+        return executor;
+    }
+
+    public long getDelay() {
+        return delay;
+    }
+
+    public void setDelay(long delay) {
+        this.delay = delay;
+    }
+
+    public Date getFirstTime() {
+        return firstTime;
+    }
+
+    public void setFirstTime(Date firstTime) {
+        this.firstTime = firstTime;
+    }
+
+    public long getPeriod() {
+        return period;
+    }
+
+    public void setPeriod(long period) {
+        this.period = period;
+    }
+
+    public Scheduler getScheduler() {
+        return scheduler;
+    }
+
+    public void setScheduler(Scheduler scheduler) {
+        this.scheduler = scheduler;
+    }
+
+    public synchronized void start() throws Exception {
+        if (!started) {
+            started = true;
+
+            if (scheduler == null) {
+                scheduler = new Scheduler(true);
+            }
+            if (scheduleIterator == null) {
+                scheduleIterator = new PollingEndpoint.PollScheduleIterator();
+            }
+
+            if (executor == null) {
+                executor = getServiceUnit().getComponent().getExecutor();
+            }
+            if (schedulerTask != null) {
+                schedulerTask.cancel();
+            }
+            schedulerTask = new PollingEndpoint.PollSchedulerTask();
+            this.scheduler.schedule(schedulerTask, scheduleIterator);
+        }
+        super.start();
+    }
+
+    public synchronized void stop() throws Exception {
+        if (schedulerTask != null) {
+            schedulerTask.cancel();
+            schedulerTask = null;
+        }
+        scheduleExecutedFlag = false;
+        started = false;
+        scheduler.cancel();
+        executor.shutdown();
+        scheduler = null;
+        scheduleIterator = null;
+        executor = null;
+        super.stop();
+    }
+
+    // Implementation methods
+    // -------------------------------------------------------------------------
+
+    private class PollSchedulerTask extends SchedulerTask {
+        public void run() {
+            try {
+                // lets run the work inside the JCA worker pools to ensure
+                // the threads are setup correctly when we actually do stuff
+                getExecutor().execute(new Runnable() {
+                    public void run() {
+                        try {
+                            poll();
+                        }
+                        catch (Exception e) {
+                            handlePollException(e);
+                        }
+                    }
+                });
+            }
+            catch (Throwable e) {
+                logger.error("Failed to schedule work: " + e, e);
+            }
+        }
+    }
+
+    protected void handlePollException(Exception e) {
+        logger.error("Caught exception while polling: " + e, e);
+    }
+
+
+    private class PollScheduleIterator implements ScheduleIterator {
+        public Date nextExecution() {
+            long nextTime = System.currentTimeMillis();
+            if (scheduleExecutedFlag) {
+                nextTime += period;
+            }
+            else {
+                if (firstTime != null) {
+                    nextTime = firstTime.getTime();
+                }
+                nextTime += delay;
+                scheduleExecutedFlag = true;
+            }
+            return (started) ? new Date(nextTime) : null;
+        }
+    }
+}

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java?view=auto&rev=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java Fri Oct 27 11:35:28 2006
@@ -0,0 +1,131 @@
+/*
+ * 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.servicemix.common.endpoints;
+
+import javax.jbi.component.ComponentContext;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOnly;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.jbi.messaging.RobustInOnly;
+import javax.jbi.messaging.MessageExchange.Role;
+import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.ServiceUnit;
+
+public abstract class ProviderEndpoint extends SimpleEndpoint {
+
+    private ServiceEndpoint activated;
+
+
+    public ProviderEndpoint() {
+    }
+
+    public ProviderEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
+        super(serviceUnit, service, endpoint);
+    }
+
+    public ProviderEndpoint(DefaultComponent component, ServiceEndpoint endpoint) {
+        super(component.getServiceUnit(), endpoint.getServiceName(), endpoint.getEndpointName());
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.servicemix.common.Endpoint#getRole()
+     */
+    public Role getRole() {
+        return Role.PROVIDER;
+    }
+
+    public void start() throws Exception {
+        ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
+        activated = ctx.activateEndpoint(service, endpoint);
+    }
+
+    public void stop() throws Exception {
+        if (activated == null) {
+            throw new IllegalStateException("Endpoint not activated: " + this);
+        }
+        ServiceEndpoint ep = activated;
+        activated = null;
+        ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
+        ctx.deactivateEndpoint(ep);
+    }
+
+    /**
+     * A default implementation of the message processor which checks the status of the exchange
+     * and if its valid will dispatch to either {@link #processInOnly(MessageExchange,NormalizedMessage)} for
+     * an {@link InOnly} or {@link RobustInOnly} message exchange otherwise the
+     * {@link #processInOut(MessageExchange,NormalizedMessage,NormalizedMessage)}
+     * method will be invoked
+     *
+     * @param exchange the message exchange
+     * @throws Exception
+     */
+    public void process(MessageExchange exchange) throws Exception {
+        // The component acts as a provider, this means that another component has requested our service
+        // As this exchange is active, this is either an in or a fault (out are sent by this component)
+        if (exchange.getRole() == Role.PROVIDER) {
+            // Exchange is finished
+            if (exchange.getStatus() == ExchangeStatus.DONE) {
+                return;
+            // Exchange has been aborted with an exception
+            } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+                return;
+            // Exchange is active
+            } else {
+                NormalizedMessage in;
+                // Fault message
+                if (exchange.getFault() != null) {
+                    done(exchange);
+                // In message
+                } else if ((in = exchange.getMessage("in")) != null) {
+                    if (exchange instanceof InOnly || exchange instanceof RobustInOnly) {
+                        processInOnly(exchange, in);
+                        done(exchange);
+                    }
+                    else {
+                        NormalizedMessage out = exchange.getMessage("out");
+                        if (out == null) {
+                            out = exchange.createMessage();
+                            exchange.setMessage(out, "out");
+                        }
+                        processInOut(exchange, in, out);
+                        send(exchange);
+                    }
+                // This is not compliant with the default MEPs
+                } else {
+                    throw new IllegalStateException("Provider exchange is ACTIVE, but no in or fault is provided");
+                }
+            }
+        // Unsupported role: this should never happen has we never create exchanges
+        } else {
+            throw new IllegalStateException("Unsupported role: " + exchange.getRole());
+        }
+    }
+
+
+    protected void processInOnly(MessageExchange exchange, NormalizedMessage in) throws Exception {
+        throw new UnsupportedOperationException("Unsupported MEP: " + exchange.getPattern());
+    }
+
+    protected void processInOut(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws Exception {
+        throw new UnsupportedOperationException("Unsupported MEP: " + exchange.getPattern());
+    }
+    
+}

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/SimpleEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/SimpleEndpoint.java?view=auto&rev=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/SimpleEndpoint.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/SimpleEndpoint.java Fri Oct 27 11:35:28 2006
@@ -0,0 +1,105 @@
+/*
+ * 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.servicemix.common.endpoints;
+
+import javax.jbi.component.ComponentContext;
+import javax.jbi.messaging.DeliveryChannel;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessageExchangeFactory;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.Endpoint;
+import org.apache.servicemix.common.EndpointComponentContext;
+import org.apache.servicemix.common.ExchangeProcessor;
+import org.apache.servicemix.common.ServiceUnit;
+
+public abstract class SimpleEndpoint extends Endpoint implements ExchangeProcessor {
+
+    private DeliveryChannel channel;
+    private MessageExchangeFactory exchangeFactory;
+    private ComponentContext context;
+
+    public SimpleEndpoint() {
+    }
+
+    public SimpleEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
+        super(serviceUnit, service, endpoint);
+    }
+
+    public SimpleEndpoint(DefaultComponent component, ServiceEndpoint endpoint) {
+        super(component.getServiceUnit(), endpoint.getServiceName(), endpoint.getEndpointName());
+    }
+
+    public synchronized void activate() throws Exception {
+        context = new EndpointComponentContext(this);
+        channel = context.getDeliveryChannel();
+        exchangeFactory = channel.createExchangeFactory();
+        start();
+    }
+
+    public synchronized void deactivate() throws Exception {
+        stop();
+    }
+    
+    public ExchangeProcessor getProcessor() {
+        return this;
+    }
+
+    protected void send(MessageExchange me) throws MessagingException {
+        channel.send(me);
+    }
+    
+    protected void sendSync(MessageExchange me) throws MessagingException {
+        channel.sendSync(me);
+    }
+    
+    protected void done(MessageExchange me) throws MessagingException {
+        me.setStatus(ExchangeStatus.DONE);
+        send(me);
+    }
+    
+    protected void fail(MessageExchange me, Exception error) throws MessagingException {
+        me.setError(error);
+        send(me);
+    }
+    
+    /**
+     * @return the exchangeFactory
+     */
+    public MessageExchangeFactory getExchangeFactory() {
+        return exchangeFactory;
+    }
+
+    /**
+     * @return the channel
+     */
+    public DeliveryChannel getChannel() {
+        return channel;
+    }
+
+    /**
+     * @return the context
+     */
+    public ComponentContext getContext() {
+        return context;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/EPRTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/EPRTest.java?view=auto&rev=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/EPRTest.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/EPRTest.java Fri Oct 27 11:35:28 2006
@@ -0,0 +1,33 @@
+package org.apache.servicemix.common;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+public class EPRTest extends TestCase {
+
+
+    public void testEPR() {
+        DummyComponent component = new DummyComponent();
+        assertEquals("urn:servicemix:dummy", component.getEPRServiceName().getNamespaceURI());
+        assertEquals("DummyComponent", component.getEPRServiceName().getLocalPart());
+        assertEquals("urn:servicemix:dummy", component.getEPRElementName().getNamespaceURI());
+        assertEquals("epr", component.getEPRElementName().getLocalPart());
+        assertEquals(1, component.getEPRProtocols().length);
+        assertEquals("dummy:", component.getEPRProtocols()[0]);
+    }
+    
+    public static class DummyComponent extends DefaultComponent {
+
+        @Override
+        protected List getConfiguredEndpoints() {
+            return null;
+        }
+
+        @Override
+        protected Class[] getEndpointClasses() {
+            return null;
+        }
+
+    }
+}

Modified: incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileComponent.java Fri Oct 27 11:35:28 2006
@@ -16,33 +16,27 @@
  */
 package org.apache.servicemix.file;
 
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.servicemix.common.DefaultComponent;
-import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ResolvedEndpoint;
-import org.w3c.dom.DocumentFragment;
-
-import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
 import java.io.File;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import javax.jbi.servicedesc.ServiceEndpoint;
+
+import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.Endpoint;
+import org.apache.servicemix.jbi.util.IntrospectionSupport;
+import org.apache.servicemix.jbi.util.URISupport;
+
 /**
  * A file based component
  *
- * @version $Revision: $
+ * @version $Revision$
  * @org.apache.xbean.XBean element="component" description="File Component"
  */
 public class FileComponent extends DefaultComponent {
 
-    public final static String EPR_URI = "urn:servicemix:file";
-    public final static QName EPR_SERVICE = new QName(EPR_URI, "FileComponent");
-    public final static String EPR_NAME = "epr";
-
     private FileEndpoint[] endpoints;
     private FilePollingEndpoint[] pollingEndpoints;
 
@@ -63,10 +57,6 @@
         this.pollingEndpoints = pollingEndpoints;
     }
 
-    public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
-        return ResolvedEndpoint.resolveEndpoint(epr, EPR_URI, EPR_NAME, EPR_SERVICE, "file:");
-    }
-
     protected List getConfiguredEndpoints() {
         List answer = new ArrayList();
         answer.addAll(asList(getEndpoints()));
@@ -76,10 +66,6 @@
 
     protected Class[] getEndpointClasses() {
         return new Class[]{FileEndpoint.class, FilePollingEndpoint.class};
-    }
-
-    protected QName getEPRServiceName() {
-        return EPR_SERVICE;
     }
 
     protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {

Modified: incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FileEndpoint.java Fri Oct 27 11:35:28 2006
@@ -18,7 +18,7 @@
 
 import org.apache.servicemix.components.util.DefaultFileMarshaler;
 import org.apache.servicemix.components.util.FileMarshaler;
-import org.apache.servicemix.common.ProviderEndpoint;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 
 import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.MessageExchange;
@@ -50,7 +50,6 @@
 
     public void validate() throws DeploymentException {
         super.validate();
-
         if (directory == null) {
             throw new DeploymentException("You must specify the directory property");
         }

Modified: incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollingEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollingEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollingEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-file/src/main/java/org/apache/servicemix/file/FilePollingEndpoint.java Fri Oct 27 11:35:28 2006
@@ -27,9 +27,10 @@
 
 import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.InOnly;
+import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.NormalizedMessage;
 
-import org.apache.servicemix.common.PollingEndpoint;
+import org.apache.servicemix.common.endpoints.PollingEndpoint;
 import org.apache.servicemix.components.util.DefaultFileMarshaler;
 import org.apache.servicemix.components.util.FileMarshaler;
 
@@ -207,7 +208,16 @@
         NormalizedMessage message = exchange.createMessage();
         exchange.setInMessage(message);
         marshaler.readMessage(exchange, message, in, name);
-        getDeliveryChannel().sendSync(exchange);
+        sendSync(exchange);
         in.close();
+    }
+
+    public String getLocationURI() {
+        return file.toURI().toString();
+    }
+
+    public void process(MessageExchange exchange) throws Exception {
+        // Do nothing. In our case, this method should never be called
+        // as we only send synchronous InOnly exchange
     }
 }

Modified: incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/DynamicEndpointTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/DynamicEndpointTest.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/DynamicEndpointTest.java (original)
+++ incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/DynamicEndpointTest.java Fri Oct 27 11:35:28 2006
@@ -17,6 +17,13 @@
  */
 package org.apache.servicemix.file;
 
+import java.io.File;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOnly;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.servicedesc.ServiceEndpoint;
+
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.client.ServiceMixClient;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
@@ -24,12 +31,6 @@
 import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
-
-import javax.jbi.messaging.ExchangeStatus;
-import javax.jbi.messaging.InOnly;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.servicedesc.ServiceEndpoint;
-import java.io.File;
 
 public class DynamicEndpointTest extends SpringTestSupport {
     protected String dynamicURI = "file://target/dynamicEndpoint?file.tempFilePrefix=dynamicEp-";

Modified: incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java (original)
+++ incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java Fri Oct 27 11:35:28 2006
@@ -17,20 +17,18 @@
  */
 package org.apache.servicemix.file;
 
-import org.apache.servicemix.tck.SpringTestSupport;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOnly;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.namespace.QName;
+
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
-
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.ExchangeStatus;
-import javax.jbi.messaging.InOnly;
-import javax.jbi.messaging.NormalizedMessage;
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.io.FileWriter;
 
 public class PollDirectoryTest extends SpringTestSupport {
     protected String directoryName = "target/pollDirectory";

Modified: incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/SpringComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/SpringComponentTest.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/SpringComponentTest.java (original)
+++ incubator/servicemix/trunk/servicemix-file/src/test/java/org/apache/servicemix/file/SpringComponentTest.java Fri Oct 27 11:35:28 2006
@@ -17,21 +17,17 @@
 package org.apache.servicemix.file;
 
 import javax.jbi.messaging.ExchangeStatus;
-import javax.jbi.messaging.InOut;
 import javax.jbi.messaging.InOnly;
-import javax.jbi.messaging.NormalizedMessage;
 import javax.jbi.messaging.MessageExchange;
-import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.jbi.messaging.NormalizedMessage;
 import javax.xml.namespace.QName;
 
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
-import org.apache.servicemix.jbi.resolver.URIResolver;
 import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.w3c.dom.DocumentFragment;
 
 public class SpringComponentTest extends SpringTestSupport {
 

Modified: incubator/servicemix/trunk/servicemix-file/src/test/resources/spring-polling.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-file/src/test/resources/spring-polling.xml?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-file/src/test/resources/spring-polling.xml (original)
+++ incubator/servicemix/trunk/servicemix-file/src/test/resources/spring-polling.xml Fri Oct 27 11:35:28 2006
@@ -29,11 +29,16 @@
       	<sm:component>
             <file:component>
             	<file:endpoints>
-                <file:endpoint service="test:service" endpoint="endpoint" directory="file:target/componentOutput"/>
+                <file:endpoint service="test:service"
+                               endpoint="endpoint"
+                               directory="file:target/componentOutput" />
             	</file:endpoints>
               
               <file:pollingEndpoints>
-                <file:pollingEndpoint service="test:poller" endpoint="poller" file="file:target/pollerFiles"/>
+                <file:pollingEndpoint service="test:poller"
+                                      endpoint="poller"
+                                      targetService="test:service"
+                                      file="file:target/pollerFiles" />
               </file:pollingEndpoints>
             </file:component>
         </sm:component>

Propchange: incubator/servicemix/trunk/servicemix-ftp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 27 11:35:28 2006
@@ -0,0 +1,3 @@
+.classpath
+.project
+target

Modified: incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java Fri Oct 27 11:35:28 2006
@@ -16,16 +16,14 @@
  */
 package org.apache.servicemix.ftp;
 
-import org.apache.servicemix.common.DefaultComponent;
-import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ResolvedEndpoint;
-import org.w3c.dom.DocumentFragment;
-
-import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
 import java.net.URI;
 import java.util.List;
 
+import javax.jbi.servicedesc.ServiceEndpoint;
+
+import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.Endpoint;
+
 /**
  * An FTP based component
  *
@@ -34,10 +32,6 @@
  */
 public class FtpComponent extends DefaultComponent {
 
-    public final static String EPR_URI = "urn:servicemix:ftp";
-    public final static QName EPR_SERVICE = new QName(FtpComponent.EPR_URI, "FtpComponent");
-    public final static String EPR_NAME = "epr";
-
     private FtpEndpoint[] endpoints;
 
     public FtpEndpoint[] getEndpoints() {
@@ -48,20 +42,12 @@
         this.endpoints = endpoints;
     }
 
-    public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
-        return ResolvedEndpoint.resolveEndpoint(epr, FtpComponent.EPR_URI, FtpComponent.EPR_NAME, FtpComponent.EPR_SERVICE, "ftp:");
-    }
-
     protected List getConfiguredEndpoints() {
         return asList(getEndpoints());
     }
 
     protected Class[] getEndpointClasses() {
         return new Class[]{FtpEndpoint.class};
-    }
-
-    protected QName getEPRServiceName() {
-        return FtpComponent.EPR_SERVICE;
     }
 
     protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {

Modified: incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java Fri Oct 27 11:35:28 2006
@@ -18,7 +18,7 @@
 
 import org.apache.commons.net.SocketClient;
 import org.apache.commons.net.ftp.FTPClient;
-import org.apache.servicemix.common.ProviderEndpoint;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.components.util.DefaultFileMarshaler;
 import org.apache.servicemix.components.util.FileMarshaler;
 

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java Fri Oct 27 11:35:28 2006
@@ -22,10 +22,7 @@
 
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
 
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
@@ -33,7 +30,6 @@
 import org.apache.servicemix.common.DefaultComponent;
 import org.apache.servicemix.common.Deployer;
 import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ResolvedEndpoint;
 import org.apache.servicemix.common.ServiceUnit;
 import org.apache.servicemix.common.xbean.BaseXBeanDeployer;
 import org.apache.servicemix.http.jetty.JCLLogger;
@@ -41,7 +37,8 @@
 import org.apache.servicemix.jbi.security.auth.AuthenticationService;
 import org.apache.servicemix.jbi.security.auth.impl.JAASAuthenticationService;
 import org.apache.servicemix.jbi.security.keystore.KeystoreManager;
-import org.w3c.dom.DocumentFragment;
+import org.apache.servicemix.jbi.util.IntrospectionSupport;
+import org.apache.servicemix.jbi.util.URISupport;
 
 /**
  * 
@@ -51,9 +48,7 @@
  */
 public class HttpComponent extends DefaultComponent {
 
-    public final static String EPR_URI = "urn:servicemix:http";
-    public final static QName EPR_SERVICE = new QName(EPR_URI, "HttpComponent");
-    public final static String EPR_NAME = "epr";
+    public final static String[] EPR_PROTOCOLS = { "http:", "https" };
     
     static {
         JCLLogger.init();
@@ -243,8 +238,8 @@
         server.stop();
     }
 
-    protected QName getEPRServiceName() {
-        return EPR_SERVICE;
+    protected String[] getEPRProtocols() {
+        return EPR_PROTOCOLS;
     }
 
     protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
@@ -312,17 +307,6 @@
         Deployer[] deployers = new Deployer[] { new BaseXBeanDeployer(this, getEndpointClasses()), 
                                                 new HttpWsdl1Deployer(this) };
         return new BaseServiceUnitManager(this, deployers);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.jbi.component.Component#resolveEndpointReference(org.w3c.dom.DocumentFragment)
-     */
-    public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
-        ServiceEndpoint ep = ResolvedEndpoint.resolveEndpoint(epr, EPR_URI, EPR_NAME, EPR_SERVICE, "http:");
-        if (ep == null) {
-            ep = ResolvedEndpoint.resolveEndpoint(epr, EPR_URI, EPR_NAME, EPR_SERVICE, "https:");
-        }
-        return ep;
     }
 
     protected List getConfiguredEndpoints() {

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java Fri Oct 27 11:35:28 2006
@@ -286,11 +286,10 @@
     }
 
     protected ServiceEndpoint createExternalEndpoint() {
-        return new ExternalEndpoint(HttpComponent.EPR_URI, 
-                                    HttpComponent.EPR_NAME,
+        return new ExternalEndpoint(getServiceUnit().getComponent().getEPRElementName(),
                                     getLocationURI(),
-                                    getEndpoint(),
                                     getService(),
+                                    getEndpoint(),
                                     getInterfaceName());
     }
 

Modified: incubator/servicemix/trunk/servicemix-jms/src/main/java/org/apache/servicemix/jms/JmsLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-jms/src/main/java/org/apache/servicemix/jms/JmsLifeCycle.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-jms/src/main/java/org/apache/servicemix/jms/JmsLifeCycle.java (original)
+++ incubator/servicemix/trunk/servicemix-jms/src/main/java/org/apache/servicemix/jms/JmsLifeCycle.java Fri Oct 27 11:35:28 2006
@@ -91,7 +91,7 @@
         this.configuration = configuration;
     }
 
-    protected QName getEPRServiceName() {
+    public QName getEPRServiceName() {
         return JmsResolvedEndpoint.EPR_SERVICE;
     }
     

Modified: incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Component.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Component.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Component.java (original)
+++ incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Component.java Fri Oct 27 11:35:28 2006
@@ -16,8 +16,6 @@
  */
 package org.apache.servicemix.jsr181;
 
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 
 import javax.jbi.component.ComponentContext;

Modified: incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java Fri Oct 27 11:35:28 2006
@@ -16,10 +16,13 @@
  */
 package org.apache.servicemix.saxon;
 
-import org.apache.servicemix.common.DefaultComponent;
-
 import java.util.List;
 
+import javax.jbi.servicedesc.ServiceEndpoint;
+
+import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.Endpoint;
+
 /**
  * 
  * @org.apache.xbean.XBean element="component"
@@ -28,6 +31,8 @@
  */
 public class SaxonComponent extends DefaultComponent {
 
+    public final static String[] EPR_PROTOCOLS = { "xslt:", "xquery:" };
+
     private SaxonEndpoint[] endpoints;
 
     public SaxonEndpoint[] getEndpoints() {
@@ -44,5 +49,14 @@
 
     protected List getConfiguredEndpoints() {
         return asList(getEndpoints());
+    }
+
+    protected String[] getEPRProtocols() {
+        return EPR_PROTOCOLS;
+    }
+
+    protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
+        // TODO: handle EPR
+        return super.getResolvedEPR(ep);
     }
 }

Modified: incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java Fri Oct 27 11:35:28 2006
@@ -13,7 +13,7 @@
 
 import net.sf.saxon.Configuration;
 
-import org.apache.servicemix.common.ProviderEndpoint;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.expression.Expression;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.springframework.core.io.DefaultResourceLoader;

Modified: incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java Fri Oct 27 11:35:28 2006
@@ -72,6 +72,7 @@
     // -------------------------------------------------------------------------
     
     public void start() throws Exception {
+        super.start();
         Configuration config = getConfiguration();
         if (config == null) {
             config = new Configuration();

Propchange: incubator/servicemix/trunk/servicemix-xmpp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 27 11:35:28 2006
@@ -0,0 +1,3 @@
+.classpath
+.project
+target

Modified: incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPComponent.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPComponent.java Fri Oct 27 11:35:28 2006
@@ -16,22 +16,20 @@
  */
 package org.apache.servicemix.xmpp;
 
-import org.apache.activemq.util.URISupport;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.Map;
+
+import javax.jbi.servicedesc.ServiceEndpoint;
+
 import org.apache.servicemix.common.DefaultComponent;
 import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ResolvedEndpoint;
 import org.apache.servicemix.jbi.util.IntrospectionSupport;
+import org.apache.servicemix.jbi.util.URISupport;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.BeanFactoryAware;
-import org.w3c.dom.DocumentFragment;
-
-import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.Map;
 
 /**
  * A JBI component for binding POJOs to the JBI bus which work directly off of the JBI messages
@@ -43,10 +41,6 @@
  */
 public class XMPPComponent extends DefaultComponent implements BeanFactoryAware {
 
-    public final static String EPR_URI = "urn:servicemix:xmpp";
-    public final static QName EPR_SERVICE = new QName(EPR_URI, "XMPPComponent");
-    public final static String EPR_NAME = "epr";
-
     private XMPPEndpoint[] endpoints;
     private BeanFactory beanFactory;
     private String user;
@@ -85,20 +79,12 @@
         this.beanFactory = beanFactory;
     }
 
-    public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) {
-        return ResolvedEndpoint.resolveEndpoint(epr, EPR_URI, EPR_NAME, EPR_SERVICE, "xmpp:");
-    }
-
     protected List getConfiguredEndpoints() {
         return asList(getEndpoints());
     }
 
     protected Class[] getEndpointClasses() {
         return new Class[]{XMPPEndpoint.class};
-    }
-
-    protected QName getEPRServiceName() {
-        return EPR_SERVICE;
     }
 
     protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {

Modified: incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPEndpoint.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPEndpoint.java Fri Oct 27 11:35:28 2006
@@ -16,11 +16,9 @@
  */
 package org.apache.servicemix.xmpp;
 
-import org.apache.servicemix.common.ProviderEndpoint;
 import org.apache.servicemix.common.ServiceUnit;
-import org.jivesoftware.smack.AccountManager;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.jivesoftware.smack.*;
-import org.jivesoftware.smack.XMPPConnection;
 import org.jivesoftware.smack.filter.PacketFilter;
 import org.jivesoftware.smack.packet.Packet;
 import org.jivesoftware.smack.packet.Presence;

Modified: incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPMarshaler.java?view=diff&rev=468487&r1=468486&r2=468487
==============================================================================
--- incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPMarshaler.java (original)
+++ incubator/servicemix/trunk/servicemix-xmpp/src/main/java/org/apache/servicemix/xmpp/XMPPMarshaler.java Fri Oct 27 11:35:28 2006
@@ -85,19 +85,6 @@
 
     // Properties
     //-------------------------------------------------------------------------
-    /**
-     * @deprecated use getSourceMarshaler instead
-     */
-    public SourceMarshaler getSourceMarshaller() {
-        return sourceMarshaler;
-    }
-
-    /**
-     * @deprecated use setSourceMashaler instead
-     */
-    public void setSourceMarshaller(SourceMarshaler sourceMarshaler) {
-        this.sourceMarshaler = sourceMarshaler;
-    }
 
     /**
      * @return the sourceMarshaler



Mime
View raw message