How can a utility class in a JBoss Module load an application class in JBoss EAP 6 and 7?

Solution In Progress - Updated -

Issue

  • We have a shared lib jars that are utility jars, that we want to put in a custom JBoss Module and have it be able to load classes from an application. Our applications depend on these utility jars, but the utility jars also need to access the application classes. There is no static reference from shared lib to application jars. These jars are small in size but copying it in all the application's web-inf/lib will create maintenance issue. The utility jars use Class.forName to try to load the application classes. How can we load the application classes from the shared utility jar that is in a custom JBoss Module?

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 7.x
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