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 able to use :exclusions in your project.clj to
make sure only the newest version of any dependency is used (assuming the
new version doesn't break backwards compatibility).

If you're brave, you could download an early-release of JDK8 and see how
Project Jigsaw works for you.

It is possible to spin your own solution using Classloaders, but probably a
lot of work.


On Mon, Feb 18, 2013 at 1:47 PM, Adam Clements <adam.cleme...@gmail.com>wrote:

> 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 classloader, with its own dependencies, ideally downloaded at
> runtime. That way none of them will interfere with one another and I can
> add new API endpoints without restarting the entire api server process.
>
> Is this possible? I have come across pomegranate for dependency resolution
> and classlojure for evaling in other classloaders, but I can't find any
> examples of doing both at once, and my experiments have so far been
> unsuccessful.
>
> Any hints would be much appreciated,
>
> Thanks,
> Adam
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to