Ok. I have solved this. I have replaced eval with eval-data which is (defmacro eval-data[ & body ] (defonce this-current-context (get-thread-bindings) ) `(do (push-thread-bindings this-current-context) (try (eval ~@body) (finally (pop-thread-bindings)))))
On Nov 17, 10:08 am, Michael Jaaka <michael.ja...@googlemail.com> wrote: > Well, I have checked different possibilites and the problem is not > about facade but lies in Clojure "eval" which is called on Clojure > structure done from transforming XML to Clojure structures. This eval > doesn't see context defined during loading time only if thread binding > is not restored. Any help? > > On Nov 17, 9:55 am, Michael Jaaka <michael.ja...@googlemail.com> > wrote: > > > > > > > > > Hi! > > > I'm using Clojure from Java via RT.loadResourceScript(...) and then > > RT.var(...) > > However this only works when I do > > > Var.pushThreadBindings(THREAD_BINDING) > > and > > Var.popThreadBindings() > > > around RT.var().invoke(), where THREAD_BINDING is a thread binding got > > during script loading via (def ^:dynamic *current-context* > > (get-thread-bindings)) > > and then getting it via RT.var(namespace, *current-context*) > > > Without restoring thread binding from script load time, I got errors about > > functions which are defined by script but not found during invocation time. > > It is probably caused by fact, that I'm using Proxy.newProxyInstance to > > facade RT.var().invoce() around Java Interfaces, so maybe accessing to > > Clojure ClassLoader and passing it to newProxyInstance would help? Now I'm > > just putting there ClassLoader.getSystemClassLoader(). -- 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