Author: gnodet
Date: Wed Oct  4 03:05:52 2006
New Revision: 452816

URL: http://svn.apache.org/viewvc?view=rev&rev=452816
Log:
Remove unused imports, add some javadocs and
fix ProviderEndpoint MEP handling

Modified:
    
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/BasicWorkManager.java
    
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultBootstrap.java
    
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ProviderEndpoint.java
    
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java

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=452816&r1=452815&r2=452816
==============================================================================
--- 
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
 Wed Oct  4 03:05:52 2006
@@ -22,7 +22,6 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
 
-import javax.jbi.component.Component;
 import javax.jbi.component.ComponentContext;
 import javax.jbi.component.ComponentLifeCycle;
 import javax.jbi.component.ServiceUnitManager;

Modified: 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BasicWorkManager.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BasicWorkManager.java?view=diff&rev=452816&r1=452815&r2=452816
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BasicWorkManager.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BasicWorkManager.java
 Wed Oct  4 03:05:52 2006
@@ -26,6 +26,12 @@
 import javax.resource.spi.work.WorkListener;
 import javax.resource.spi.work.WorkManager;
 
+/**
+ * A simple WorkManager implementation on top of java.util.concurrent thread 
pool.
+ * 
+ * @deprecated Components should use the executor on the ServiceMixComponent
+ *      for thread pools
+ */
 public class BasicWorkManager implements WorkManager {
 
     private final ExecutorService executor;

Modified: 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultBootstrap.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultBootstrap.java?view=diff&rev=452816&r1=452815&r2=452816
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultBootstrap.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultBootstrap.java
 Wed Oct  4 03:05:52 2006
@@ -29,6 +29,9 @@
  * Maven JBI plugin to provide a standard implementation of a Bootstrap

  * when a component does not provide one

  * 

+ * @deprecated Due to JBI classloader mechanism, component should not

+ *    use this class directly, but copy it, or rely on the maven-jbi-plugin

+ *    to provide a default implementation.

  */

 public class DefaultBootstrap implements Bootstrap

 {


Modified: 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ProviderEndpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ProviderEndpoint.java?view=diff&rev=452816&r1=452815&r2=452816
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ProviderEndpoint.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ProviderEndpoint.java
 Wed Oct  4 03:05:52 2006
@@ -1,20 +1,32 @@
+/*

+ * 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;

 

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

 import javax.jbi.component.ComponentContext;

 import javax.jbi.messaging.DeliveryChannel;

 import javax.jbi.messaging.ExchangeStatus;

+import javax.jbi.messaging.InOnly;

 import javax.jbi.messaging.MessageExchange;

 import javax.jbi.messaging.MessageExchangeFactory;

 import javax.jbi.messaging.MessagingException;

 import javax.jbi.messaging.NormalizedMessage;

-import javax.jbi.messaging.InOnly;

 import javax.jbi.messaging.RobustInOnly;

 import javax.jbi.messaging.MessageExchange.Role;

 import javax.jbi.servicedesc.ServiceEndpoint;

-import javax.jbi.JBIException;

 import javax.xml.namespace.QName;

 

 public abstract class ProviderEndpoint extends Endpoint implements 
ExchangeProcessor {

@@ -122,11 +134,15 @@
                 return;

             // Exchange is active

             } else {

+                NormalizedMessage in;

+                // Fault message

+                if (exchange.getFault() != null) {

+                    done(exchange);

                 // In message

-                NormalizedMessage in = exchange.getMessage("in");

-                if (in != null) {

+                } 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");

@@ -135,12 +151,8 @@
                             exchange.setMessage(out, "out");

                         }

                         processInOut(exchange, in, out);

+                        send(exchange);

                     }

-                    send(exchange);

-

-                // Fault message

-                } else if (exchange.getFault() != null) {

-                    done(exchange);

                 // This is not compliant with the default MEPs

                 } else {

                     throw new IllegalStateException("Provider exchange is 
ACTIVE, but no in or fault is provided");


Modified: 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java?view=diff&rev=452816&r1=452815&r2=452816
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java
 Wed Oct  4 03:05:52 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.servicemix.common;
 
-import javax.jbi.component.Component;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;


Reply via email to