Sun GlassFish Enterprise Server v3 Prelude Add-On Component Development Guide

Ensuring That an AdminCommand Implementation Is Stateless

To enable multiple clients to run a command simultaneously, ensure that the implementation of the AdminCommand interface for the command is stateless. To ensure that the implementation of the AdminCommand interface is stateless, annotate the declaration of your implementation with the org.jvnet.hk2.annotations.Scoped annotation. In the @Scoped annotation, set the scope as follows: