Annotation Type Singleton

public @interface Singleton

  • Beanlets without any scope annotation and beanlets marked with this annotation are called vanilla beanlets. Vanilla beanlets do not have a stub that controls access to the beanlet instance. Clients have access to the actual object. In short, they can invoke methods directly on the beanlet instance.
    The container guarantees that only a single instance of this beanlet exists at the same time. This particular instance is always returned upon request.

    XML Representation

    The following xml-fragment shows how to express this annotation in xml. The 'singleton' tag does not specify any element attribute, which means that this tag is applied to the beanlet's class.
    <beanlets xmlns=""
      <beanlet name="foo" type="com.acme.Foo">

    Copyright © 2006-2012. All Rights Reserved.