Re: Multiple Clojure contexts in the same JVM

2013-08-21 Thread David Pollak
Sweet. Thanks! On Tue, Aug 20, 2013 at 3:51 PM, Toby Crawley wrote: > > David Pollak writes: > > > I have an application where I need multiple independent Clojure contexts > > running in the same JVM. > > You can use ShimDandy[1] to load multiple Clojure runtimes in the same > JVM, and call int

Re: Multiple Clojure contexts in the same JVM

2013-08-20 Thread Toby Crawley
David Pollak writes: > I have an application where I need multiple independent Clojure contexts > running in the same JVM. You can use ShimDandy[1] to load multiple Clojure runtimes in the same JVM, and call into those runtimes from Java. That's what Immutant[2] and the Clojure language module f

Re: Multiple Clojure contexts in the same JVM

2013-08-20 Thread Hugo Duncan
David Pollak writes: > I have an application where I need multiple independent Clojure contexts > running in the same JVM. Classlojure [1] can do this for you, taking care of correct initialisation, and evaluation. [1] https://github.com/flatland/classlojure pgpjGCdyjK4nh.pgp Description: PGP

Re: Multiple Clojure contexts in the same JVM

2013-08-20 Thread David Pollak
flection), I wind up with: > > > > java.lang.ClassCastException: clojure.core$eval1 cannot be cast to > > clojure.lang.IFn > > > > > > It seems that someplace the clojure.lang.IFn interface is being loaded > > around my classloader. > > > > C

Re: Multiple Clojure contexts in the same JVM

2013-08-20 Thread Sean Corfield
d around with a custom classloader, but when I try to eval code > (calling RT.eval.invoke via reflection), I wind up with: > > java.lang.ClassCastException: clojure.core$eval1 cannot be cast to > clojure.lang.IFn > > > It seems that someplace the clojure.lang.IFn interface is being

Multiple Clojure contexts in the same JVM

2013-08-20 Thread David Pollak
ot be cast to clojure.lang.IFn It seems that someplace the clojure.lang.IFn interface is being loaded around my classloader. Can someone point me to a way to run multiple Clojure contexts in the same JVM? Thanks, David PS -- Interestingly, invoking RT.loadResourceScript via reflection works