Link Details

Link 912933 thumbnail
User 313878 avatar

By sonica
via giallone.blogspot.com
Published: Jan 26 2013 / 09:58

A technique to implement classloading isolation without the help of a container.
  • 16
  • 2
  • 1772
  • 1783

Comments

Add your comment
User 388907 avatar

MCII replied ago:

0 votes Vote down Vote up Reply

A solution looking for a problem.

User 226303 avatar

devdanke replied ago:

0 votes Vote down Vote up Reply

This is a bad idea that'll lead to unmaintainable, undebbugable code. If the need for this arrises, it's better to rebuild one version of the class or lib (using something like Maven's Shade pluggin) to put the target class(es) in their own non-conflicting namespace. No normal corporate developer should ever need to delve very deep into classloader black magic.

User 313878 avatar

Paolo Antinori replied ago:

0 votes Vote down Vote up Reply

Hi Devdanke, thanks for your comment. I do agree that is not something a developer should use often for the same reasons you remember and the Shade seems to be interesting other option. But since you were citing corporate developers, well, the described technique(technique, not best practice) is what allowed us to not violate the SLA with the provider of the 2 third party libraries since we couldn't obviously alter their code. This is the reason I wanted to describe it as a technique, an option available when do not have better. Anyway the next time I'll try to see if working with something similar to the Shade plugin, could keep us within a supported scenario. And just to add, another option that we considered was JarJar: https://code.google.com/p/jarjar/

User 236075 avatar

henk replied ago:

1 votes Vote down Vote up Reply

Not very practical, but an interesting read nevertheless ;)

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Debugging JavaScript
Written by: Ashutosh Sharma
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. Java EE7
  5. HTML5 Mobile
  1. Java EE7
  2. Spring Annotations
  3. Git
  4. Java
  5. REST