I'm trying to make a sign operation with a XML file. In this process, I use the xmlSec 1.5 library. If I run the code in a local test the process finishes successfully. However, if I deploy the code in a war in a Jboss 7.1, my dependency with xmlSec 1.5 is override by Jboss by its module dependency "xmlsec-2.0.8.redhat-1", and the sign process fails. For client's petition, I can exclude the xmlsec Jboss module, but I cannot use it to sign. So, the problem is: how could I specify a given library version to be used only in a part of the code?.
In this case, the path of both dependencies are the same: org.apache.santuario, so, I cannot use it in order to specify the library.
I'm trying to use a provider for signing, but, again, Jboss override my xmlsec-1.5 security provider for its xmlsec-2.0.8 security provider. There exists some way to instanciate a provider and adds it to the set of java providers in order to replace the Jboss one?