janb 2003/09/14 05:05:49
Modified: modules/core/src/java/org/apache/geronimo/core/service
AbstractComponent.java AbstractStateManageable.java
Log:
Removed unnecessary "name" field on AbstractComponent and made the
relationService and
dependencyService protected rather than private on AbstractStateManageable
Revision Changes Path
1.2 +10 -13
incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/AbstractComponent.java
Index: AbstractComponent.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/AbstractComponent.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractComponent.java 8 Sep 2003 04:25:19 -0000 1.1
+++ AbstractComponent.java 14 Sep 2003 12:05:49 -0000 1.2
@@ -68,13 +68,7 @@
/**
* the Container this Component belongs to
*/
- private Container container;
-
- /**
- * the identity of this Component
- */
- private String name;
-
+ protected Container container;
/**
* The Container that this Component belongs to
@@ -123,15 +117,18 @@
}
- /**
+ /**
* Get the unique identity of this Component
*
* @return the name (formatted according to JSR 77)
*/
public String getObjectName() {
- return name;
+ return super.toString();
}
+
+
+
/**
* Two Components are equal if they have the same name;
*
@@ -141,7 +138,7 @@
public boolean equals(Object o) {
if (o instanceof Component) {
Component component = (Component)o;
- return component.getObjectName().equals(name);
+ return component.getObjectName().equals(objectName);
}
return false;
}
@@ -155,9 +152,9 @@
* @return hash of Component name
*/
public int hashCode() {
- if (name == null) {
+ if (objectName == null) {
return 0;
}
- return name.hashCode();
+ return objectName.toString().hashCode();
}
}
1.2 +3 -3
incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/AbstractStateManageable.java
Index: AbstractStateManageable.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/AbstractStateManageable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractStateManageable.java 8 Sep 2003 04:25:19 -0000 1.1
+++ AbstractStateManageable.java 14 Sep 2003 12:05:49 -0000 1.2
@@ -105,8 +105,8 @@
protected MBeanServer server;
protected ObjectName objectName;
- private DependencyServiceMBean dependencyService;
- private RelationServiceMBean relationService;
+ protected DependencyServiceMBean dependencyService;
+ protected RelationServiceMBean relationService;
private long sequenceNumber;
private long startTime;