X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=runtime%2Forg.argeo.slc.support.osgi%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fosgi%2FOsgiExecutionModulesManager.java;h=6c442c71defc6883e61a87f637bc6147dff4bcbe;hb=c3079df154cefc630d0f4a398ab1ce97b61d3ba7;hp=b2038b928b859083531119973b9b57bf9485dbbc;hpb=c37222d3fdb7f7d3e6d620321ec509f9e9abd94c;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/OsgiExecutionModulesManager.java b/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/OsgiExecutionModulesManager.java index b2038b928..6c442c71d 100644 --- a/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/OsgiExecutionModulesManager.java +++ b/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/OsgiExecutionModulesManager.java @@ -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