geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject cvs commit: incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering Tier.java Node.java MBeanImpl.java
Date Wed, 21 Jan 2004 14:12:13 GMT
jules       2004/01/21 06:12:13

  Modified:    modules/clustering/src/java/org/apache/geronimo/clustering/web
                        HttpSessionManager.java
               modules/clustering/src/java/org/apache/geronimo/clustering
                        Tier.java Node.java MBeanImpl.java
  Log:
  add accessors for MBean ObjectNames so (when web-console displays them
  as links) it will be possible to navigate clustering hierarchy easily.
  
  Revision  Changes    Path
  1.8       +12 -8     incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/web/HttpSessionManager.java
  
  Index: HttpSessionManager.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/web/HttpSessionManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HttpSessionManager.java	7 Jan 2004 22:09:47 -0000	1.7
  +++ HttpSessionManager.java	21 Jan 2004 14:12:12 -0000	1.8
  @@ -82,7 +82,6 @@
     extends MBeanImpl
   {
     protected Log _log=LogFactory.getLog(HttpSessionManager.class);
  -
     //----------------------------------------
     // HttpSessionManager
     //----------------------------------------
  @@ -94,6 +93,8 @@
     protected Tier _tier;
     public Tier getTier(){return _tier;}
   
  +  public ObjectName getTierObjectName() {return _tier==null?null:_tier.getObjectName();}
  +
     protected String _clusterName;
     public String getClusterName(){return _clusterName;}
     public void setClusterName(String clusterName){_clusterName=clusterName;}
  @@ -166,13 +167,16 @@
     {
       GeronimoMBeanInfo mbeanInfo=MBeanImpl.getGeronimoMBeanInfo();
       mbeanInfo.setTargetClass(HttpSessionManager.class);
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("Size",        true, false, "number
of extant HttpSessions within this webapp"));
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("UID",         true, false, "unique
identity for this webapp within this vm"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("Size",           true, false,
"number of extant HttpSessions within this webapp"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("UID",            true, false,
"unique identity for this webapp within this vm"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("TierObjectName", true, false,
"ObjectName of Tier to which this webapp is attached"));
  +
       // TODO - these should probably become RO...
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterName", true, true, "name
of Cluster upon which this webapp is deployed"));
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("NodeName",    true, true, "name
of Cluster Node upon which this webapp is deployed"));
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("TierName",    true, true, "name
of Tier to which this webapp is attached"));
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ContextPath", true, true, "context
path at which this webapp is deployed"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterName",    true, true,
"name of Cluster upon which this webapp is deployed"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("NodeName",       true, true,
"name of Cluster Node upon which this webapp is deployed"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("TierName",       true, true,
"name of Tier to which this webapp is attached"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ContextPath",    true, true,
"context path at which this webapp is deployed"));
  +
       return mbeanInfo;
     }
   }
  
  
  
  1.7       +10 -4     incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/Tier.java
  
  Index: Tier.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/Tier.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Tier.java	7 Jan 2004 00:15:38 -0000	1.6
  +++ Tier.java	21 Jan 2004 14:12:12 -0000	1.7
  @@ -81,11 +81,11 @@
     extends NamedMBeanImpl
   {
     protected Log    _log=LogFactory.getLog(Tier.class);
  -  protected Node   _node;
     protected Data   _data;
     protected Map    _tiers;
     protected Object _tier;
   
  +
     /**
      * Makes an ObjectName for a Tier MBean with the given parameters.
      *
  @@ -106,6 +106,11 @@
     // Tier
     //----------------------------------------
   
  +  protected Node   _node;
  +  public Node getNode(){return _node;}
  +
  +  public ObjectName getNodeObjectName(){return _node==null?null:_node.getObjectName();}
  +
     public String getClusterName(){return _objectName.getKeyProperty("cluster");}
     public String getNodeName(){return _objectName.getKeyProperty("node");}
   
  @@ -182,8 +187,9 @@
     {
       GeronimoMBeanInfo mbeanInfo=MBeanImpl.getGeronimoMBeanInfo();
       //set target class in concrete subclass
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterName", true, false, "Name
of this Tier's Node's Cluster"));
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("NodeName",    true, false, "Name
of this Tier's Node"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterName",    true, false,
"Name of this Tier's Node's Cluster"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("NodeName",       true, false,
"Name of this Tier's Node"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("NodeObjectName", true, false,
"ObjectName of this Tier's Node"));
       return mbeanInfo;
     }
   }
  
  
  
  1.7       +8 -4      incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/Node.java
  
  Index: Node.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/Node.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Node.java	7 Jan 2004 00:15:38 -0000	1.6
  +++ Node.java	21 Jan 2004 14:12:12 -0000	1.7
  @@ -79,7 +79,6 @@
     implements MetaDataListener, DataListener, DataDeltaListener
   {
     protected Log     _log=LogFactory.getLog(Node.class);
  -  protected Cluster _cluster;
   
     /**
      * Makes an ObjectName for a Node MBean with the given parameters.
  @@ -100,6 +99,7 @@
     // Node
     //----------------------------------------
   
  +  protected Cluster _cluster;
     /**
      * Returns the Node's Cluster's MBean's unique identifier.
      *
  @@ -109,6 +109,8 @@
   
     public Cluster getCluster(){return _cluster;}
   
  +  public ObjectName getClusterObjectName(){return _cluster==null?null:_cluster.getObjectName();}
  +
     //----------------------------------------
     // MetaDataListener
     //----------------------------------------
  @@ -224,8 +226,10 @@
     {
       GeronimoMBeanInfo mbeanInfo=MBeanImpl.getGeronimoMBeanInfo();
       mbeanInfo.setTargetClass(Node.class);
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterName", true, false, "Node's
Cluster's Name"));
  -    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("Data",        true, false, "Node's
state"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterName",       true, false,
"Node's Cluster's Name"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ClusterObjectName", true, false,
"Node's Cluster's ObjectName"));
  +    mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("Data",              true, false,
"Node's state"));
  +
       return mbeanInfo;
     }
   }
  
  
  
  1.2       +3 -1      incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/MBeanImpl.java
  
  Index: MBeanImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/clustering/src/java/org/apache/geronimo/clustering/MBeanImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MBeanImpl.java	4 Jan 2004 14:35:06 -0000	1.1
  +++ MBeanImpl.java	21 Jan 2004 14:12:12 -0000	1.2
  @@ -104,6 +104,8 @@
       _server    =(context==null)?null:context.getServer();
     }
   
  +  public ObjectName getObjectName() {return _objectName;}
  +
     public static GeronimoMBeanInfo
       getGeronimoMBeanInfo()
     {
  
  
  

Mime
View raw message