Re: Loading in jars with dependencies at runtime into separate classloaders with independent classpaths

2013-02-19 Thread Adam Clements
Thanks, I've had a look at Immutant. I don't really want to migrate my whole app to immutant's framework right now though (plus I'm just interested in how one might employ this pattern for things other than web apps too) so I've been looking through to see if I can work out how to do just the

Re: Loading in jars with dependencies at runtime into separate classloaders with independent classpaths

2013-02-19 Thread Aaron Cohen
This is the problem that OSGI tries to address and that the long-delayed module system hopefully coming in JDK8 should handle (Project Jigsaw). I think currently OSGI might be your best bet if you truly need it, though there is quite a bit of work to get spun up on that. You may get lucky and be

Re: Loading in jars with dependencies at runtime into separate classloaders with independent classpaths

2013-02-19 Thread Toby Crawley
Adam Clements writes: I don't really want to migrate my whole app to immutant's framework right now though (plus I'm just interested in how one might employ this pattern for things other than web apps too) so I've been looking through to see if I can work out how to do just the

Re: Loading in jars with dependencies at runtime into separate classloaders with independent classpaths

2013-02-19 Thread Phil Hagelberg
Adam Clements writes: I'm working on a web api wrapper around a number of java/clojure libraries. One problem that I have run into is transitive dependency conflicts, especially when some of the projects are older than others. If you are dealing solely with conflicts in Clojure code and

Loading in jars with dependencies at runtime into separate classloaders with independent classpaths

2013-02-18 Thread Adam Clements
I'm working on a web api wrapper around a number of java/clojure libraries. One problem that I have run into is transitive dependency conflicts, especially when some of the projects are older than others. What I want to do is have each API endpoint's final handler function in its own

Re: Loading in jars with dependencies at runtime into separate classloaders with independent classpaths

2013-02-18 Thread Toby Crawley
Adam: You can do this exact thing in Immutant[1]. It can handle multiple applications at the same time, with each application getting an isolated ClassLoader. Each application can optionally have its dependencies resolved at deploy time via pomegranate, and can be (re)deployed independently of