users@hk2.java.net

a few questions about hk2

From: Renaud Bruyeron <bruyeron_at_fullsix.com>
Date: Tue, 05 Feb 2008 09:56:10 +0100

Hi there,

I read Sahoo's blog entries about HK2, and decided to give it a try last
night. I like it a lot, it's very guicy ;-)

I have a few of questions regarding the system and the tools. I used
0.2-SNAPSHOT and a SVN checkout to look at the code (the API
documentation on the site is obsolete it seems...)
* the javadoc implies that LifecyclePolicy implementations with the
@Service annotation are auto-discovered by the maven plugin, however I
did not see any such thing in the resulting MANIFEST, and my
implementation is not called back - do I really need to explicitly set
the implementation through the pom.xml ?
* does HK2 handle cyclic dependencies ( class A { @Inject B b; } and
class B { @Inject A a; }) ?
* the hk2:* goals are very slow - it seems that maven tries to update
the plugins on every run. Is there a simple way to make it run offline
after the initial run? I tried mvn -o but it fails trying to resolve
dependencies even though it downloaded them all on the previous run...
* Are modules hot-reloadable? i.e. can one programmatically stop a
module through the Module API? What happens to the dependencies? I am
looking to use HK2 as a hotswappable plugin system.

cheers,

 - Renaud