JBoss classloading when 2 WARs have the same class

Posted by Pacman on Stack Overflow See other posts from Stack Overflow or by Pacman
Published on 2012-11-16T19:27:14Z Indexed on 2012/11/17 11:04 UTC
Read the original article Hit count: 231

Filed under:
|
|
|

I have a web applications A.war which has two servlets AServlet and BServlet. Both instantiate a helper class com.mycompany.Foo.class (this is my own class, not a third party library).

Now I want to split the two servlets into two separate WARs: A.war will have only AServlet and a new B.war will have BServlet. AServlet will invoke BServlet via HTTP GET. Both WARs will have com.mycompany.Foo.class. I want to deploy both WARs on the same JBoss instance.

The question is, will there be any classloading issues due to the same class being present in both WARs, and the WARs being deployed on the same JBoss instance?

© Stack Overflow or respective owner

Related posts about java-ee

Related posts about jboss