Modular services with OpenJDK Jigsaw and Guice

Jaroslav Tulach jaroslav.tulach at oracle.com
Mon Jul 9 04:49:33 PDT 2012


Dne Pá 6. července 2012 18:43:08, Paul Sandoz napsal(a):
> Something for the weekend:
> 
> http://earthly-powers.blogspot.fr/2012/07/modular-services-with-openjdk-jigs
> aw.html

Interesting. I was playing with something similar, but with Spring:
http://wiki.apidesign.org/wiki/LookupAndSpring
Translation notes:
- Lookup.getDefault() means something like ServiceLoader.load(all_types)
- @ServiceProvider is "provides service"

I was trying to do this with Guice as well, but it does not work well. Guice 
would like to know all registered services before its "module" is constructed 
and we were seeking for a lazy binding. However we have not managed to 
convince Guice to call us back, when a particular type is needed. We gave up.

-jt




More information about the jigsaw-dev mailing list