geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service GeronimoMBeanInfo.java
Date Fri, 14 Nov 2003 16:15:37 GMT
djencks     2003/11/14 08:15:37

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/service
                        GeronimoMBeanInfo.java
  Log:
  add autostart attribute for bootstrapping GeronimoMBeans
  
  Revision  Changes    Path
  1.7       +19 -3     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBeanInfo.java
  
  Index: GeronimoMBeanInfo.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBeanInfo.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- GeronimoMBeanInfo.java	13 Nov 2003 02:49:26 -0000	1.6
  +++ GeronimoMBeanInfo.java	14 Nov 2003 16:15:37 -0000	1.7
  @@ -86,6 +86,9 @@
    * @version $Revision$ $Date$
    */
   public final class GeronimoMBeanInfo extends MBeanInfo {
  +
  +    public static final String ALWAYS = "always";
  +    public static final String NEVER = "never";
       /**
        * The key for the default target
        */
  @@ -97,6 +100,8 @@
       final static String GERONIMO_MBEAN_TARGET_NAME = "___Geronimo___MBean___";
   
       private static final MBeanConstructorInfo[] NO_CONSTRUCTORS = new MBeanConstructorInfo[0];
  +
  +    private boolean autostart = false;
       private final boolean immutable;
       private final int hashCode = System.identityHashCode(this);
       private String name;
  @@ -108,8 +113,6 @@
       private final Set endpoints = new HashSet();
       final Map targets = new HashMap();
       final Map targetFastClasses = new HashMap();
  -    public static final String ALWAYS = "always";
  -    public static final String NEVER = "never";
   
       public GeronimoMBeanInfo() {
           // first aregument must be non-nul until MX4J snapshot is updated
  @@ -120,6 +123,7 @@
       GeronimoMBeanInfo(GeronimoMBeanInfo source) throws Exception {
           super("Ignore", null, null, null, null, null);
           immutable = true;
  +        autostart = source.autostart;
   
           //
           // Required
  @@ -331,6 +335,18 @@
           }
           endpoints.add(endpoint);
       }
  +
  +    public boolean isAutostart() {
  +        return autostart;
  +    }
  +
  +    public void setAutostart(boolean autostart) {
  +        if (immutable) {
  +            throw new IllegalStateException("Data is no longer mutable");
  +        }
  +        this.autostart = autostart;
  +    }
  +
   
       private GeronimoMBeanTarget createTarget(Class superClass) {
           Enhancer enhancer = new Enhancer();
  
  
  

Mime
View raw message