Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing application classloaders on weblogic

My project has several deployed artifacts as ear files. My understanding is that each of the ears will have it's own classloader. Is it possible to tell weblogic to use the same classloader for each of these deployables.

What factors do i need to consider when making this change?

like image 335
mR_fr0g Avatar asked Nov 23 '25 00:11

mR_fr0g


1 Answers

The reason each Application (EAR) has it's own classloader is for application isolation and independence. Assume you want some common module available for all the EARs ?

If each App is to have common classloader (and common shared libraries) there are 3 ways to do this:

  1. Add the common JARs to the system classloader (BAD idea) as noted here. http://download.oracle.com/docs/cd/E11035_01/wls100/programming/classloading.html#wp1096756

  2. Create common JAR/EAR and deploy it as a shared library as described here. http://download.oracle.com/docs/cd/E11035_01/wls100/programming/libraries.html#wp1071514

  3. If the multiple apps have stuff in common and are not meant to be independent modules, bundle them into a single EAR

like image 148
JoseK Avatar answered Nov 25 '25 17:11

JoseK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!