[jboss-svn-commits] JBL Code SVN: r30554 - in labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta: aop/java/org/jboss/internal/soa/esb/services/registry/aspect and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 8 14:29:11 EST 2009


Author: kevin.conner at jboss.com
Date: 2009-12-08 14:29:11 -0500 (Tue, 08 Dec 2009)
New Revision: 30554

Added:
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java
Modified:
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/build.xml
Log:
Handle encoding for juddi: JBESB-3042

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java	2009-12-08 19:29:11 UTC (rev 30554)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.services.registry.aspect;
+
+import java.net.URL;
+
+import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
+
+/**
+ * Aspect used to override URL getResource handling within Install
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JUDDIInstallAspect
+{
+    public Object getPath(final MethodCalledByMethodInvocation invocation)
+        throws Throwable
+    {
+        final URL url = (URL) invocation.getTargetObject() ;
+        final String protocol = url.getProtocol() ; 
+        final String path ;
+        if ("vfsfile".equals(protocol))
+        {
+            path = url.toURI().getPath() ;
+        }
+        else
+        {
+            path = url.getPath() ;
+        }
+        return path ;
+    }
+}


Property changes on: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-12-08 18:58:56 UTC (rev 30553)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-12-08 19:29:11 UTC (rev 30554)
@@ -5,6 +5,7 @@
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientPublicationAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientSecurityAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientConfigAspect" scope="PER_VM"/>
+   <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIInstallAspect" scope="PER_VM"/>  
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDINotificationListAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIServerConfigAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIScoutAspect" scope="PER_VM"/>
@@ -29,6 +30,10 @@
         <advice name="getConfiguration" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientConfigAspect"/>
    </bind>
 
+   <bind pointcut="withincode(* org.apache.juddi.config.Install->getPublishers(org.apache.commons.configuration.Configuration)) AND call(* java.net.URL->getPath())">
+        <advice name="getPath" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIInstallAspect"/>  
+   </bind>
+
    <bind pointcut="withincode(* org.apache.juddi.subscription.NotificationList->getInstance(..)) AND call(java.util.Vector->new(..))">
         <advice name="getVector" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDINotificationListAspect"/>
    </bind>

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/build.xml	2009-12-08 18:58:56 UTC (rev 30553)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/build.xml	2009-12-08 19:29:11 UTC (rev 30554)
@@ -275,6 +275,7 @@
             <include name="org/apache/juddi/config/AppConfig.class"/>
             <include name="org/apache/juddi/subscription/NotificationList.class"/>
             <include name="org/apache/juddi/v3/auth/AuthenticatorFactory.class"/>
+            <include name="org/apache/juddi/config/Install.class"/>
             <aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
             <aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
         </aopc>



More information about the jboss-svn-commits mailing list