dev@glassfish.java.net

Re: Injecting AdminCommand into Container

From: Lee Chuk Munn <chuk-munn.lee_at_oracle.com>
Date: Thu, 07 Apr 2011 16:28:41 +0800

Tom

yes my commands are returned by asadmin list-commands. I'm running on GF
3.1.

TIA

Regards
Chuk


On 07/04/11 00:09, Tom Mueller wrote:
> Chuk,
> Is your class packaged in an OSGi bundle in glassfish/modules?
> Is the command being returned by the asadmin list-commands command?
>
> Tom
>
> On 4/6/2011 1:35 AM, Lee Chuk Munn wrote:
> Hi I have the following admin command
>
> @Service(name = "create-xmpp-domain")
> @Scoped(PerLookup.class)
> public class CreateXMPPDomain implements AdminCommand {
>
> that I would like to reuse in my container. I tried injecting it in my
> container like so
>
> @Inject (name="create-xmpp-domain") CreateXMPPDomain createDomain;
>
> But I'm getting a null. Any ideas?
>
> Thanks
>
> Regards
> Chuk
>
> -- If two people write exactly the same program, each should be put
> into
> microcode and then they certainly won't be the same.
>
-- 
Programming is an unnatural act.