servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r641719 - in /servicemix/smx3/branches/servicemix-3.2.2/deployables: bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/ serviceen...
Date Thu, 27 Mar 2008 07:06:48 GMT
Author: ffang
Date: Thu Mar 27 00:06:46 2008
New Revision: 641719

URL: http://svn.apache.org/viewvc?rev=641719&view=rev
Log:
sync up changes from 3.2 branch to 3.2.2 release branch

Added:
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
  (with props)
Modified:
    servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-drools/src/main/java/org/apache/servicemix/drools/support/NamespaceContextImpl.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
    servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java
Thu Mar 27 00:06:46 2008
@@ -22,11 +22,11 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
 
 import org.mortbay.jetty.MimeTypes;
 import org.mortbay.util.ByteArrayISO8859Writer;

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
Thu Mar 27 00:06:46 2008
@@ -241,7 +241,6 @@
                     }
                     request.removeAttribute(MessageExchange.class.getName());
                 }
-                return;
             } else {
                 String id = (String) request.getAttribute(MessageExchange.class.getName());
                 locks.remove(id);

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
Thu Mar 27 00:06:46 2008
@@ -405,7 +405,10 @@
 
     protected void checkEndOfRequest(Request request, Object corId) {
         if (request.getExchange().getStatus() != ExchangeStatus.ACTIVE) {
-            ReflectionUtils.callLifecycleMethod(request.getBean(), PreDestroy.class);
+            Object beanFromRequest = request.getBean();
+            if (beanFromRequest != bean) {
+                ReflectionUtils.callLifecycleMethod(beanFromRequest, PreDestroy.class);
+            }
             //request.setBean(null);
             //request.setExchange(null);
             requests.remove(corId);

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/XPath.java
Thu Mar 27 00:06:46 2008
@@ -31,5 +31,7 @@
 public @interface XPath {
 
     String xpath() default "";
+    String prefix() default "";
+    String uri() default "";
 
 }

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanInfo.java
Thu Mar 27 00:06:46 2008
@@ -34,6 +34,7 @@
 import org.apache.servicemix.bean.Operation;
 import org.apache.servicemix.bean.Property;
 import org.apache.servicemix.bean.XPath;
+import org.apache.servicemix.client.DefaultNamespaceContext;
 import org.apache.servicemix.components.util.MessageHelper;
 import org.apache.servicemix.expression.Expression;
 import org.apache.servicemix.expression.JAXPStringXPathExpression;
@@ -174,7 +175,13 @@
             return createContentExpression(marshaller);
         } else if (annotation instanceof XPath) {
             XPath xpathAnnotation = (XPath) annotation;
-            return new JAXPStringXPathExpression(xpathAnnotation.xpath());
+            JAXPStringXPathExpression expr = new JAXPStringXPathExpression(xpathAnnotation.xpath());
+            if (!xpathAnnotation.prefix().equals("") && !xpathAnnotation.uri().equals(""))
{
+                DefaultNamespaceContext ctx = new DefaultNamespaceContext();
+                ctx.add(xpathAnnotation.prefix(), xpathAnnotation.uri());
+                expr.setNamespaceContext(ctx);
+            }
+            return expr; 
         }
         return null;
     }

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-drools/src/main/java/org/apache/servicemix/drools/support/NamespaceContextImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-drools/src/main/java/org/apache/servicemix/drools/support/NamespaceContextImpl.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-drools/src/main/java/org/apache/servicemix/drools/support/NamespaceContextImpl.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-drools/src/main/java/org/apache/servicemix/drools/support/NamespaceContextImpl.java
Thu Mar 27 00:06:46 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.servicemix.drools.support;
 
+import java.util.Map;
 
 /**
  * A simple namespace context with a clean xbean configuration.
@@ -27,6 +28,22 @@
  */
 public class NamespaceContextImpl extends org.apache.servicemix.jbi.jaxp.NamespaceContextImpl
{
 
-    
+    /**
+     * Keep the getter/setter to keep xbean annotation
+     * @org.apache.xbean.Map entryName="namespace" keyName="prefix"
+     * @return Returns the namespaces.
+     */
+    public Map<String, String> getNamespaces() {
+        return super.getNamespaces();
+    }
+
+    /**
+     * Keep the getter/setter to keep xbean annotation
+     * @param namespaces The namespaces to set.
+     */
+    public void setNamespaces(Map<String, String> namespaces) {
+        super.setNamespaces(namespaces);
+    }
+
 }
 

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java
Thu Mar 27 00:06:46 2008
@@ -30,6 +30,7 @@
 public class NamespaceContextImpl extends org.apache.servicemix.jbi.jaxp.NamespaceContextImpl
{
     
     /**
+     * Keep the getter/setter to keep xbean annotation
      * @org.apache.xbean.Map entryName="namespace" keyName="prefix"
      * @return Returns the namespaces.
      */
@@ -38,6 +39,7 @@
     }
 
     /**
+     * Keep the getter/setter to keep xbean annotation
      * @param namespaces The namespaces to set.
      */
     public void setNamespaces(Map<String, String> namespaces) {

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
Thu Mar 27 00:06:46 2008
@@ -129,16 +129,16 @@
     }
 
     protected Source createXsltSource(Resource res) throws Exception {
+        String url = null;
+        try {
+            url = res.getURL().toURI().toString();
+        } catch (Exception e) {
+            // Ignore
+        }
         if (useDomSourceForXslt) {
-            String url = null;
-            try {
-                url = res.getURL().toURI().toString();
-            } catch (Exception e) {
-                // Ignore
-            }
             return new DOMSource(parse(res), url);
         } else {
-            return new StreamSource(res.getInputStream());
+            return new StreamSource(res.getInputStream(), url);
         }
     }
 

Added: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl?rev=641719&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
(added)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
Thu Mar 27 00:06:46 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+    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.
+
+-->
+<xsl:stylesheet
+  xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+  version='1.0'>
+
+  <xsl:template match="/">
+    <transformed>
+      <xsl:copy>
+        <xsl:copy-of select="attribute::*"/>
+        <xsl:apply-templates/>
+      </xsl:copy>
+    </transformed>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl?rev=641719&r1=641718&r2=641719&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl
(original)
+++ servicemix/smx3/branches/servicemix-3.2.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl
Thu Mar 27 00:06:46 2008
@@ -21,6 +21,8 @@
   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
   version='1.0'>
 
+  <xsl:import href="default.xsl" />
+
   <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>
 
   <xsl:template match="/">



Mime
View raw message