JAR boot order inside EAR APP-INF / lib

Will the MANIFEST.MF file with the Class-Path attribute be added to the META-INF directory inside the EAR, affect the loading order of the JARs located in APP-INF / lib in WebLogic 8.1?

+3
source share
3 answers

I do not believe that you can control the APP-INF / lib application through the ClassPath attribute MANIFEST.MF.

I did this in several different ways, depending on the client.

  • Add the patch jar to the class system path for WLS. If you study domain / bin / setDomainEnv.sh (or .cmd), then the environment variables pre, post, patch classpath should. You can try adding your patch jar to the class path. This makes it accessible to all applications, which may not be what your client wants.
  • Fix somejar.jar and name it somejar-patched.jar. Replace the jar in APP-INF / lib with the "-package" version.
+1
source

I thought the class loader reads the JAR as your application requires it.

I have two questions for you:

  • WebLogic 8.1? , - 10.x. . , ? , JDK 5 6 -server. .
  • ? , beans.

UPDATE:

-, JAR. , prefer-web-inf-classes . , ?

0

duffymo

, , Jars, Maven .

For example, this is a very simple example of adding a jersey-spring4 jar, but I exclude its dependencies, so I can use a different version of the spring frame library.

<dependency>
  <groupId>org.glassfish.jersey.ext</groupId>
  <artifactId>jersey-spring4</artifactId>
  <exclusions>
    <exclusion>
      <artifactId>spring-web</artifactId>
      <groupId>org.springframework</groupId>
    </exclusion>
    <exclusion>
      <artifactId>spring-aop</artifactId>
      <groupId>org.springframework</groupId>
    </exclusion>
    <exclusion>
      <artifactId>spring-context</artifactId>
      <groupId>org.springframework</groupId>
    </exclusion>
    <exclusion>
      <artifactId>spring-beans</artifactId>
      <groupId>org.springframework</groupId>
    </exclusion>
  </exclusions>
</dependency>
0
source

Source: https://habr.com/ru/post/1718448/


All Articles