1 Reply Latest reply on Jul 22, 2007 1:26 PM by heiko.braun

    Force a library to use a jar

    mpulse

      Hello

      We have some session beans that rely on an external library which in turn relies on Apache Axis. It cannot use ConnectionImplementations or MessageImplementations from org.jboss.ws because of some explicit casts.
      We use jboss-4.2.0.GA with jbossWs 2.0 so we have three reference to javax.xml.soap.*, one in rt.jar in the jvm6, one in jboss-saaj.jar in JBOSS/lib/endorsed/ and the last in Axis' saaj.jar.

      We would like this one single deployment unit to use the axis libraries without interferring with the SOAP libraries in jboss-saaj.jar.
      How do we force this and only this library to use Axis' saaj.jar? It seems that libraries in JBOSS_HOME/lib/endorsed supercede anything in the deployment unit classpath like app.ear/lib, webapp.war/WEB-INF/lib, myejb.jar/lib with or without adding the required libraries to the manifest classpath.

      Any ideas?
      Thanks

        • 1. Re: Force a library to use a jar
          heiko.braun

          IMO it's not possible with JDK 6, because the JDK itself ships with SAAJ and JAX-WS amongst others. The only way to get hold of this, is the endorsed directory mechanism. However this doesn't have the notion of 'scoping'.

          If this was JDK 5, it might be possible to isolate the Axis stuff in a scoped webapp deployment...