Link Details

Link 912933 thumbnail
User 313878 avatar

By sonica
Published: Jan 26 2013 / 09:58

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


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:

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.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java