I have an application deployed to jboss (e.g ear) which uses external jars placed in lib and lib\ext directories (configured throug classpath element in the jboss-service.xml). I would like to apply a patch jar. This jar contains modified version of some of the classes from the application ear or from the jars the application is using.
I would like to configure jboss to use classes from the patch jar in precedence to same classes in the ear or external jar files.
Is there a way to do this? How can I control the classpath order for jars used by the application.