dev@glassfish.java.net

Handle to Container from within AdminCommand

From: Lee Chuk Munn <chuk-munn.lee_at_oracle.com>
Date: Tue, 04 Jan 2011 10:48:28 +0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I'm trying to get a reference to my container (implements
org.glassfish.api.container.Container) from with my asadmin subcommand.
Is there a way to get this? I was looking through the source for
list-commands and in particular ListComponentsCommand.java. I saw the
annotation @TargetType but I could not find the javadoc for this. Is
this the annotation that I should use?

A second related question is that if I have my own Java object, is there
a way to get HK2/GF to programatically inject objects like ConfigParser,
Habitat, etc into it?

Thanks

Regards
Chuk

- --
If we're supposed to work in Hex, why have we only got A fingers?
        -- johnwm

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNIop8AAoJEAnxPH9ZReNja5QIAKNL6M/vK93AgQo4TAmuNdFY
Z0nv+x1j18CCbgRip9ATkO9ScBMzc2Wl0Ck8ZPtmukgKZjdbBoO3KUKCH8FCGf59
F/U0AIhp7AKhMRJcHo/nxmGGrq9oWFNj+gYaemuk8vxlL59kp13cSnUQtdJy1AJO
JdV12r6RANntqM+GME06xjX6Skyp27LBQdRbxL3CR1zOhcA6NrvjYH1Ch1jyKkUa
PVo3I0NpHO/+m113B3lI0+K7uZ5whDLWtYqHf+/g8RyXImZPAHKRp1Vz6qDuHUze
M+utTTimKJcugXxeugcqmXhOlK86KVMZwx5Owdlb1U2pnYiFM9eUUy79rJ/BdCE=
=Jkd/
-----END PGP SIGNATURE-----