0

I have two applications(say App1 & App2) deployed in Weblogic, and have a situation to access App1/.../abc.jar from App2/app2.war/xyz.jar

Package Structure of App1

/a1/app1.ear/app1.war/WEB-INF/abc.jar

Package Structure of App2

/a2/app2.ear/app2.war/WEB-INF/xyz.jar

I have complete ownership of app2.war, and due to other restriction I can't make any changes to configuraiton of app1 ( like enabling a shared library)

Attempts I made

  • Added a Class-Path entry in MANIFEST.MF file ( in /a2/app2.ear/app2.war/WEB-INF/xyz.jar/META-INF &/ /a2/app2.ear/app2.war/META-INF)

       Manifest-Version: 1.0 Class-Path: /u01/a1/app1.ear/app1.war/WEB-INF/abc.jar
    

    Note : I tried with absolute path (not relative path)

  • Added required abc.jar (from app1) directly inside my app2.war

    This approach actually works, but last preferred option if nothing else works. [Update 1,to answer @Smile] The reason is both application's libraries are generated by different build process, different combination of apps can co-exist at same time. eg: App1 (10.06),App2(10.03) or App1(09.03), App2(10.03) or any other build combo . At the time of building App2 I may not be aware what version of App1 will be used by end-user, and is the reason I can't include specific version App1/abc.jar in to App2/xyz.jar. Also customer can alone update either App1 or App2. Only reliable option is to make use of location of the jar file at 'RunTime' . I agree its more of design concern, unfortunately too late :(

Any thoughts would be highly appreciated

Satheesh Cheveri
  • 3,621
  • 3
  • 27
  • 46
  • Adding the required jar directly in app2.war should be the first option and not last preferred. Though, I would really like to know why this is not your first preferred option? – Smile Dec 12 '19 at 05:30
  • Updated my question with reasoning , thanks – Satheesh Cheveri Dec 12 '19 at 05:59

0 Answers0