dev@glassfish.java.net

_at_Scoped for CLI commands

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Fri, 02 Jul 2010 17:18:50 -0700

I've checked in a fix for this issue:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=12398

This will make sure every CLI command, local or remote, has a
@Scoped annotation. Normally commands should have @Scoped(PerLookup.class).
If the command has no per-execution state it might have
@Scoped(Singleton.class). In this case it will check that the command has
no options and no operands. (Necessary, but not sufficient.)

You'll get an error message if these constraints are violated.
(Even better would be an annotation processor that checked that
at compile time, but I'll leave that for someone else.)

I fixed the few commands that were missing the @Scoped annotation.

Let me know if you see any problems related to this.