clojure/tools.namespace — pull request #5 by jcrossley3 (2013-07-10 23:41:28+00:00)
Title: Use dynapath library to determine effective classpath

Hi Stuart! Your opinions on libraries, dependencies, pull requests, and open source in general are well documented, but `tools.namespace` is too handy for me not to give this a shot. :-)

We've had a few Immutant users ask why ctn doesn't work in REPL's connected to their apps deployed on a running Immutant. The short answer is that the `java.class.path` system property used by ctn won't be correct in a JVM with multiple isolated classloaders deployed.

Not sure if you're familiar with Toby's [dynapath](http://github.com/tobias/dynapath) library, but it's meant to do what `clojure/java.classpath` does with *any* classloader, not just `URLClassLoader` derivatives. As you know, many app servers use special classloaders that don't necessarily extend the `URLClassLoader` Java class, but can easily implement dynapath's `DynamicClasspath` Clojure protocol to join in the fun.

This PR uses dynapath to expand the utility of ctn, enabling it to work everywhere it currently does as well as "app server" environments like Immutant. Thanks!