http://code.google.com/p/guiceyfruit/wiki/Download
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/
2009/4/14 Aleksey Didik <alekse...@gmail.com>:
>
> Hello James,
> I'm glad to catch the new guceyfruit release)
>
> Some questions:
>
> 1) What about @PreDestroy? As I have read, Guice folks have no answer
> on your question "how to find the scope of an injectee in
> InjectionListener?"
> As I can see in beta-6 sources, tryCloseJitBindings trick is
> working yet.
Its working right now; I applied my patch to the guice jars included
in the GuiceyFruit distro for 2.0-beta-6
http://code.google.com/p/google-guice/issues/detail?id=354&can=5
still no word yet from the Guicers on the official way to support this though :(
> 2) GucieyFruitModule.bindMethodHandler use InjectableType.Listener but
> in last Guice trunk we already have another singnature of bindListener
> method.
> Do you know about it? In last guice changes we can register member
> injector which will work after native guice member injector. It means
> bindMethodHandler could be refactored :)
I just spotted this today; I've setup a git mirror of Guice (I found
the previous use of svn/svm/svk to be way too painful)...
http://github.com/jstrachan/guicey/tree/master
am just waiting for Jesse to finish changing the code & hoping he
applies some kind of patch for
http://code.google.com/p/google-guice/issues/detail?id=351&can=5
then I'll only need to apply a patch for 354 until hopefully at some
point there's some solution in Guice trunk
So 2.0-beta-7 will hopefully be using the latest trunk of guice.
2.0-beta-6 is about a week behind currently.
> 3) And what about @PostConstruct specific matcher instead of any() in
> 'bindMethodHandler'? Something like membersAnnotatedWith(Class<?
> extends Annotation> ann)? As I know, Guice calculate listeners on
> initialization step. Using matchers will be faster. If your want, I
> could create an issue in bag tracking.
That would be awesome! Do you fancy taking a stab? I've made you a
committer on the project so you can dive in on anything you like :)
We'll probably need to use the latest Guice snapshot for a little
while until the git mirror can be updated with issue 354 applied.
FWIW last time I looked the matcher stuff wasn't usable with the
injectable type stuff due to type clashes between Matchers and the
listener API - though maybe thats fixed in the new refactor?
> What's is your future plans?
Long term I'd love to remove as many custom patches from Guice as possible :).
There's a few open issues in the issue tracker such as this one which
would be handy..
http://code.google.com/p/guiceyfruit/issues/detail?id=13
I'd also like to be able to use other annotations to inject
constructors to remove the Guice limitation on mandatory @Inject on
constructors.
e.g. using code like this
public Cheese {
@Autowired
public Cheese(DataSource dataSource) {...}
}
public Cheese {
@Resource
public Cheese(DataSource dataSource) {...}
}
which would make it easier to use GuiceyFruit/Guice with code written
for J2EE or Spring without littering @Inject everywhere.
Also the spring XML converter could use some refactoring
http://code.google.com/p/guiceyfruit/issues/detail?id=16
Other than that its mostly a case of using it and figuring out what
could be improved over time. Is there anything missing from
GuiceyFruit today you'd really like to see - (other than the points
you've raised so far in this thread)?
BTW I've refactored the patch and applied it to the git mirror...
http://github.com/jstrachan/guicey/commits/master
and have switched trunk of GuiceyFruit to using this - which is based
on the latest trunk of google guice plus my patch for 354.