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开发者_如何学JAVA consider when making this change?
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:
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
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
If the multiple apps have stuff in common and are not meant to be independent modules, bundle them into a single EAR
精彩评论