admin@glassfish.java.net

Re: admin commands _at_Scoped(PerLookup.class)

From: Paul M Davies (Oracle) <"Paul>
Date: Thu, 03 Jun 2010 14:40:17 -0700

Hi,

The official product documentation offers essentially the same advice as
Bill. See Ensuring That an AdminCommand Implementation Is Stateless
<http://docs.sun.com/app/docs/doc/820-7727/ghrng?l=en&a=view> in the
/Add-On Component Development Guide/.

Regards,
-Paul

On 06/03/10 14:36, Bill Shannon wrote:
> I just fixed a bug in my admin command that caused it to fail when
> multiple clients were using the same command. I forgot to add
> @Scoped(PerLookup.class). Without that, a second client executing
> the same command that a first client is executing will overwrite
> the parameters from the first client.
>
> Seems to me *all* admin commands should have @Scoped(PerLookup.class),
> yet I see many others that are missing it as well. (I suppose an
> exception could be made for commands with no parameters and no
> writable fields, but is that an important use case? I doubt it.)
>
> Anybody disagree?
>
> Isn't this a bug just waiting to happen?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>


-- 
Paul Davies, Principal Technical Writer, Oracle Corporation.
http://blogs.sun.com/techscribe/