How to test Classloading Precedence in JBoss EAP 6

Solution Unverified - Updated -

Issue

  • In our application we are including a jar file which is also present in JBoss container. We are packaging different versions of some of the jars contained in JBoss, such as commons-collections-3.1, commons-io-1.4, and commons-lang-2.4

From what i understand , Class Loading Precedence in jboss is as follows [1]:
1. System Dependencies
2. User Dependencies
3. Local Resource
4. Inter deployment dependencies

  • Because of which the jar file in the container is picked instead of the one provided my us in our application. Is there a way we can make it such that the jar in our application gets priority?

[1] https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content