weblogic ear external jar dependency

放肆的年华 提交于 2020-01-17 12:52:48

问题


We have a weblogic ear which has dependency with a third party jar. We don't want to keep this jar inside of the ear. Is there any other better way or better place to keep this jar and load it only at the ear class loader.


回答1:


I personally would package the third party jar into the ear. You have a couple of other options...

Add the jar file into your weblogic domain lib directory, this will put it on the classpath for every server:

<domain folder> -> lib

A better way would be to edit your server classpath to also include the third party jar. Login to your admin console and edit:

Servers -> server_name -> Server Start tab -> Classpath 

Keep in mind this will put the jar on the classpath for all apps running on that particular server. If that is not desirable you can look into preferring the jar(s) in your ear file over those on the classpath like:

<wls:container-descriptor>
  <wls:prefer-application-packages>
     <wls:package-name>org.xml.sax.*</wls:package-name>
  </wls:prefer-application-packages>
</wls:container-descriptor>


来源:https://stackoverflow.com/questions/30485120/weblogic-ear-external-jar-dependency

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!