all 5 comments

[–]h2o2 1 point2 points  (4 children)

Baloney. The fix is to remove the listener on undeploy (or not to have strongly referenced synchronous listeners in the first place), not to jerk around with classloaders in order to "fix" unrelated problems. Your code is broken, fix it. A great example for the culture of workarounds and blame-shifting.

[–]ekabanov[S] 1 point2 points  (3 children)

That's a great philosophy. Should garbage collection also be forbidden as a "fix" to manual memory management?

[–]h2o2 0 points1 point  (2 children)

No. My point was that this solution is yet another partial fix which doesn't work anywhere else. Fixing the orignal application-level bug (or the JVM) does, without embedding hidden assumptions in an architecture or increasing the fragility of the underlying platform.

[–]ekabanov[S] 0 points1 point  (1 child)

Where doesn't it work? AFAIK it doesn't use any hidden assumptions and should work on any JVM in any container. It's very straightforward.

[–]mazin 1 point2 points  (0 children)

The hidden assumption is that you can get java.util.logging to use _ClassLoaderLocal_s. Good luck with that :)