如何防止JBoss Web应用程序间的类路径? [英] How to prevent JBoss inter web application classpath?

查看:76
本文介绍了如何防止JBoss Web应用程序间的类路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在同一服务器的JBoss中部署了两个Web应用程序.我观察到在这两个Web应用程序之间共享类路径.

I have two web application deployed in JBoss within same server. I have observed classpath is shared between this two web applications.

因此,如何防止应用程序之间的类路径共享.我的意思是,一个应用程序中可用的任何类和jar文件都不应该在jboss中同一服务器的另一个应用程序中可见.

So how do I prevent classpath saring between applications. I mean whatever classes and jar files available in one application should not be visible in another application in same server in jboss.

推荐答案

对于大多数版本的jBoss AS,您需要更新jboss-web.xml文件:

For most versions of jBoss AS you need to update your jboss-web.xml file:

<jboss-web>
   <class-loading> 
      <loader-repository>com.example:archive=unique-archive-name</loader-repository> 
   </class-loading>
</jboss-web>

有关更多信息,请参见以下参考资料:

See the following reference for more info:

  • jBoss class loading configuration
  • jBoss class loading background & use cases

这篇关于如何防止JBoss Web应用程序间的类路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆