Hi,

Provided that the beans you would like to see implemented via clojure
must conform to a preexisting interface, I guess there would be no
need at all to leverage to dynamic-language part of spring.

Here is a recipe (out of my head, not tested) for how this would work:

 1. identify the interface you want to implement
 2. create a namespace for this interface, with the correct :gen-class
magic incantation on the (ns) form
 3. create the corresponding "classical" bean declaration in your
spring xml file (no possibility to generate classes with annotations
yet)
 4. make sure that your build process compiles the clojure namespace via AOT

Then, all the real clojure code implementing the interface methods
will be in regular clojure functions, that you can redefine at will
from a REPL (so there's also intrinsically no need for an explicit
"refresh bean" functionality.

At least, it is as I understand that currently.

Of course, being also able in clojure to implement interfaces at
runtime via the 'proxy form, it could be interesting to have a better
integration via a specific dynamic language extension, getting rid of
step 4 in the above described process.

HTH,

-- 
Laurent

2009/6/3 Dmitriy Kopylenko <dmitriy.kopyle...@gmail.com>:
>
> Hello.
>
> I'm just wondering is there a way to create Clojure beans and inject
> them into other Spring beans (given that Clojure code implements Java
> interface) inside Spring ApplicationContext, similar to other dynamic
> langs support:
>
> http://static.springframework.org/spring/docs/2.5.x/reference/dynamic-language.html
>
> ?
>
> Thanks,
> Dmitriy.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to