1 Reply Latest reply on May 23, 2006 11:55 AM by Bill Burke

    EJB3 JBoss extensions API state

    Dann Martens Newbie

      Are there any provisions already to add description text to @Service POJOs and their methods?

      Currently, @Service POJOs descriptions, as seen through the JMX console, are all default or missing:
      "Information on the management interface of the MBean"
      "Attribute exposed for management"
      "(no description)"

      Perhaps something along the lines of

      --- SNIP ---
      @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
      @Retention(RetentionPolicy.RUNTIME)
      public @interface Description {
      String[] value();
      }
      --- SNIP ---

      In case of methods, multiple descriptions should be matched with the arguments in sequence.

      Another nice-to-have would be a Logger annotation, which helps avoid redundant code (class name replication)

      --- SNIP ---
      public class SomeService implements SomeServiceIF {
      @Logger private static Logger log;
      ...
      --- SNIP ---

      instead of

      --- SNIP ---
      public class SomeService implements SomeServiceIF {
      private static Logger log = Logger.getLogger(SomeService.class);
      ...
      --- SNIP ---

      Feedback would be appreciated.