Jboss配置为xerces和xalan加载EAR jar

时间:2015-08-06 15:16:50

标签: deployment jboss packages

我的耳塞里面有罐子,需要比应用服务器更喜欢像xalan,xerces等类似的罐子.Weblogic允许这样做如下所示,应用程序现在在weblogic中工作正常 - 配置如下

<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.oracle.com/technology/weblogic/920/weblogic-application.xsd"> 
    <xml> 
    <parser-factory> 
    <saxparser-factory> org.apache.xerces.jaxp.SAXParserFactoryImpl </saxparser-factory> 
    <document-builder-factory> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl </document-builder-factory> 
    <transformer-factory> org.apache.xalan.processor.TransformerFactoryImpl </transformer-factory> 
    </parser-factory> 
    </xml> 
    <prefer-application-packages> 
    <package-name>org.opensaml.*</package-name> 
    <package-name>org.apache.xerces.*</package-name> 
    <package-name>org.apache.xalan.*</package-name> 
    </prefer-application-packages> 
    </weblogic-application>

我需要对jboss做同样的事情,以便排除其自己的库中存在的类似jar。我试过下面的

<?xml version="1.0" encoding="UTF-8"?>      
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">      
    <ear-subdeployments-isolated>true</ear-subdeployments-isolated>      
    <deployment>  
        <dependencies>  
            <module name="deployment.javaee.api" />  
        </dependencies>    
        <exclusions>  
            <module name="javaee.api" />  
        </exclusions>  
    </deployment>     
    <module name="deployment.javaee.api">  
        <dependencies>  
            <module name="javaee.api" export="true">  
                <imports>  
                    <exclude path="org/opensaml/**" />  
                    <exclude path="org/apache/xerces/**" />
                    <exclude path="org/apache/xalan/**" />
                </imports>  
            </module>  
        </dependencies>  
    </module>      
</jboss-deployment-structure>

似乎还是为xerces,xalan和opensaml挑选了jboss jars。如果您之前在JBOSS中做过这样的事情,那么您的建议将非常受欢迎。

0 个答案:

没有答案