]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/OsgiExecutionModulesManager.java
Introduce relative resource sets
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.osgi / src / main / java / org / argeo / slc / osgi / OsgiExecutionModulesManager.java
index b2038b928b859083531119973b9b57bf9485dbbc..6c442c71defc6883e61a87f637bc6147dff4bcbe 100644 (file)
@@ -7,6 +7,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 
 import org.apache.commons.logging.Log;
@@ -34,6 +35,27 @@ import org.springframework.osgi.service.importer.OsgiServiceLifecycleListener;
 public class OsgiExecutionModulesManager extends
                AbstractExecutionModulesManager implements InitializingBean,
                DisposableBean, OsgiServiceLifecycleListener {
+
+       static {
+               // Force usage of vanilla Xalan when in OSGi
+               // We would like to do it in a cleaner way
+               // but the integration of Xalan and Xerces in the JRE
+               // makes it very difficult
+               // Suggestions welcome!
+               Properties systemProperties = System.getProperties();
+//             if (!systemProperties
+//                             .containsKey("javax.xml.parsers.DocumentBuilderFactory"))
+//                     System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
+//                                     "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
+//             if (!systemProperties.containsKey("javax.xml.parsers.SAXParserFactory"))
+//                     System.setProperty("javax.xml.parsers.SAXParserFactory",
+//                                     "org.apache.xerces.jaxp.SAXParserFactoryImpl");
+               if (!systemProperties
+                               .containsKey("javax.xml.transform.TransformerFactory"))
+                       System.setProperty("javax.xml.transform.TransformerFactory",
+                                       "org.apache.xalan.processor.TransformerFactoryImpl");
+       }
+
        private final static String PROPERTY_CACHE_SERVICES = "slc.osgi.execution.cacheServices";
 
        private final static Log log = LogFactory