aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1738535 - in /aries/trunk/blueprint/blueprint-cm/src/main: java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java resources/OSGI-INF/blueprint/blueprint-cm.xml
Date Mon, 11 Apr 2016 07:38:03 GMT
Author: jbonofre
Date: Mon Apr 11 07:38:03 2016
New Revision: 1738535

URL: http://svn.apache.org/viewvc?rev=1738535&view=rev
Log:
Merge branch 'namespace-handler-fixes-cm' of https://github.com/grgrzybek/aries into trunk

Conflicts:
	blueprint/blueprint-cm/pom.xml
	blueprint/blueprint-core/pom.xml

Modified:
    aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
    aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml

Modified: aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java?rev=1738535&r1=1738534&r2=1738535&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
(original)
+++ aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
Mon Apr 11 07:38:03 2016
@@ -175,8 +175,14 @@ public class CmNamespaceHandler implemen
             return getClass().getResource("blueprint-cm-1.0.0.xsd");
         } else if (namespace.startsWith("http://aries.apache.org/blueprint/xmlns/blueprint-ext"))
{
             try {
+                Class<?> extNsHandlerClazz;
                 Bundle extBundle = FrameworkUtil.getBundle(PlaceholdersUtils.class);
-                Class<?> extNsHandlerClazz = extBundle.loadClass("org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler");
+                if (extBundle == null) {
+                    // we may not be in OSGi environment
+                    extNsHandlerClazz = getClass().getClassLoader().loadClass("org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler");
+                } else {
+                    extNsHandlerClazz = extBundle.loadClass("org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler");
+                }
                 return ((NamespaceHandler) extNsHandlerClazz.newInstance()).getSchemaLocation(namespace);
             } catch (Throwable t) {
                 LOGGER.warn("Could not locate ext namespace schema", t);

Modified: aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml?rev=1738535&r1=1738534&r2=1738535&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml
(original)
+++ aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml
Mon Apr 11 07:38:03 2016
@@ -21,22 +21,38 @@
 
     <bean id="CmNamespaceHandler" class="org.apache.aries.blueprint.compendium.cm.CmNamespaceHandler"/>
 
-    <service ref="CmNamespaceHandler" interface="org.apache.aries.blueprint.NamespaceHandler">
+    <service ref="CmNamespaceHandler">
+        <interfaces>
+            <value>org.apache.aries.blueprint.NamespaceHandler</value>
+            <value>org.apache.aries.blueprint.NamespaceHandler2</value>
+        </interfaces>
         <service-properties>
             <entry key="osgi.service.blueprint.namespace" value="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"/>
         </service-properties>
     </service>
-    <service ref="CmNamespaceHandler" interface="org.apache.aries.blueprint.NamespaceHandler">
+    <service ref="CmNamespaceHandler">
+        <interfaces>
+            <value>org.apache.aries.blueprint.NamespaceHandler</value>
+            <value>org.apache.aries.blueprint.NamespaceHandler2</value>
+        </interfaces>
         <service-properties>
             <entry key="osgi.service.blueprint.namespace" value="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"/>
         </service-properties>
     </service>
-    <service ref="CmNamespaceHandler" interface="org.apache.aries.blueprint.NamespaceHandler">
+    <service ref="CmNamespaceHandler">
+        <interfaces>
+            <value>org.apache.aries.blueprint.NamespaceHandler</value>
+            <value>org.apache.aries.blueprint.NamespaceHandler2</value>
+        </interfaces>
         <service-properties>
             <entry key="osgi.service.blueprint.namespace" value="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"/>
         </service-properties>
     </service>
-    <service ref="CmNamespaceHandler" interface="org.apache.aries.blueprint.NamespaceHandler">
+    <service ref="CmNamespaceHandler">
+        <interfaces>
+            <value>org.apache.aries.blueprint.NamespaceHandler</value>
+            <value>org.apache.aries.blueprint.NamespaceHandler2</value>
+        </interfaces>
         <service-properties>
             <entry key="osgi.service.blueprint.namespace" value="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.3.0"/>
         </service-properties>



Mime
View raw message