User: user57 Date: 02/01/02 20:00:52 Modified: src/main/org/jboss/ha/framework/server ClusterPartitionMBean.java DistributedStateImpl.java FarmMemberService.java FarmMemberServiceMBean.java HARMIServerImpl.java Log: o migrated all components to a new JMX domain name model. jboss.system is now where to core/spine components live. moved all components that were in JBOSS-SYSTEM that did not move into a jboss.* domain into jboss (where the server is now registered). The point was to limit the members of jboss.system to core bits only. o Created org.jboss.system.Server, which does the work of initialization that org.jboss.Main used to do. Main now only parses the command line, sets up basic legecy properties and creates a Server instance. o Moved functionality of Shutdown (component not cl tool) into Server ( which is bound as jboss.system:service=Server) o Moved more Runtime access from Info into Server. Exposed memory info as attributes. o Logging a WARN everywhere that uses System.getProperty("jboss.system.home") as that should go away soon/eventually. o Initialized the invokerMap in the harmi impl to avoid NPE o Made getopt.jar a member of the lib/* dir instead of adding it to the run.jar and shutdown.jars each time. o Minor cosmetic changes along the way. Revision Changes Path 1.6 +2 -2 jbossmx/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java Index: ClusterPartitionMBean.java =================================================================== RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ClusterPartitionMBean.java 2001/12/31 20:41:17 1.5 +++ ClusterPartitionMBean.java 2002/01/03 04:00:52 1.6 @@ -18,7 +18,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Bill Burke</a>. * @author <a href="mailto:[EMAIL PROTECTED]">Sacha Labourey</a>. - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * * <p><b>Revisions:</b><br> */ @@ -29,7 +29,7 @@ // Constants ----------------------------------------------------- - static final String OBJECT_NAME = ":service=ClusterPartition"; + static final String OBJECT_NAME = "jboss:service=ClusterPartition"; /** * Name of the partition being built. All nodes/services belonging to 1.7 +3 -3 jbossmx/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java Index: DistributedStateImpl.java =================================================================== RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- DistributedStateImpl.java 2001/12/31 15:15:11 1.6 +++ DistributedStateImpl.java 2002/01/03 04:00:52 1.7 @@ -29,7 +29,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Sacha Labourey</a>. * @author <a href="mailto:[EMAIL PROTECTED]">Bill Burke</a>. - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * * <p><b>Revisions:</b><br> * <p><b>2001/11/26: Sacha Labourey</b> @@ -83,7 +83,7 @@ // we will need to redesign the way HAPartitions and its sub-protocols are // registered with JMX. They will most probably be independant JMX services. // - String name = "JBOSS-SYSTEM:service=" + SERVICE_NAME + + String name = "jboss:service=" + SERVICE_NAME + ",partitionName=" + this.partition.getPartitionName(); ObjectName jmxName = new ObjectName(name); mbeanServer.registerMBean(this, jmxName); @@ -96,7 +96,7 @@ public void stop () throws Exception { - String name = "JBOSS-SYSTEM:service=" + SERVICE_NAME + + String name = "jboss:service=" + SERVICE_NAME + ",partitionName=" + this.partition.getPartitionName(); org.jboss.system.Registry.unbind (name); } 1.4 +4 -4 jbossmx/src/main/org/jboss/ha/framework/server/FarmMemberService.java Index: FarmMemberService.java =================================================================== RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/FarmMemberService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FarmMemberService.java 2001/11/26 16:26:43 1.3 +++ FarmMemberService.java 2002/01/03 04:00:52 1.4 @@ -4,8 +4,8 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ -package org.jboss.ha.framework.server; +package org.jboss.ha.framework.server; import java.io.InputStream; import java.io.FileInputStream; @@ -42,7 +42,7 @@ * </ul> * * @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a> - * @version $Revision: 1.3 $ <p> + * @version $Revision: 1.4 $ <p> * * <b>Revisions:</b> <p> * @@ -357,8 +357,8 @@ static { try { sFarmMemberService = new ObjectName( OBJECT_NAME ); - sDeployerService = new ObjectName( "JBOSS-SYSTEM:service=ServiceDeployer" ); - sClusterPartitionService = new ObjectName( "JBOSS-SYSTEM:service=DefaultPartition" ); + sDeployerService = new ObjectName( "jboss.system:service=ServiceDeployer" ); + sClusterPartitionService = new ObjectName( "jboss:service=DefaultPartition" ); } catch( JMException jme ) { } 1.3 +3 -4 jbossmx/src/main/org/jboss/ha/framework/server/FarmMemberServiceMBean.java Index: FarmMemberServiceMBean.java =================================================================== RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/FarmMemberServiceMBean.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FarmMemberServiceMBean.java 2001/11/26 16:26:43 1.2 +++ FarmMemberServiceMBean.java 2002/01/03 04:00:52 1.3 @@ -7,7 +7,6 @@ package org.jboss.ha.framework.server; - import java.io.File; import java.io.Serializable; import java.net.URL; @@ -21,7 +20,7 @@ /** * This is the main Service Controller API. * - * <p>A controller can deploy a service to a JBOSS-SYSTEM + * <p>A controller can deploy a service to a jboss.system * It installs by delegating, it configures by delegating * <b>Attention:</b><br> * JNDI-Server Name must be the same used on ALL members of @@ -35,7 +34,7 @@ * @see Service * * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a> - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * * <p><b>20011015 andreas schaefer:</b> * <ul> @@ -46,7 +45,7 @@ extends DeployerMBean, Service { /** The default object name. */ - String OBJECT_NAME = "JBOSS-SYSTEM:spine=FarmMember"; + String OBJECT_NAME = "jboss:service=FarmMember"; /** * Deploys a service on all members of a farm 1.11 +14 -8 jbossmx/src/main/org/jboss/ha/framework/server/HARMIServerImpl.java Index: HARMIServerImpl.java =================================================================== RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HARMIServerImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- HARMIServerImpl.java 2001/12/31 20:40:42 1.10 +++ HARMIServerImpl.java 2002/01/03 04:00:52 1.11 @@ -7,7 +7,6 @@ package org.jboss.ha.framework.server; - import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.ArrayList; @@ -34,7 +33,7 @@ * * @author [EMAIL PROTECTED] * @author [EMAIL PROTECTED] - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ * * <p><b>Revisions:</b><br> * <p><b>2001/11/09: Sacha Labourey</b> @@ -53,7 +52,7 @@ protected String replicantName; protected ArrayList replicants = new ArrayList(); protected Object handler; - protected Map invokerMap; + protected Map invokerMap = new HashMap(); protected HAPartition partition = null; protected org.jboss.logging.Logger log; protected RemoteStub rmistub; @@ -66,8 +65,14 @@ // Constructors -------------------------------------------------- - public HARMIServerImpl(HAPartition partition, String replicantName, Class intf, Object handler, - int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws Exception + public HARMIServerImpl(HAPartition partition, + String replicantName, + Class intf, + Object handler, + int port, + RMIClientSocketFactory csf, + RMIServerSocketFactory ssf) + throws Exception { this.replicantName = replicantName; this.handler = handler; @@ -75,15 +80,16 @@ this.intf = intf; Method[] methods = handler.getClass().getMethods(); - for (int i = 0; i < methods.length; i++) - invokerMap.put(new Long(MarshalledInvocation.calculateHash(methods[i])), methods[i]); + for (int i = 0; i < methods.length; i++) { + Long key = new Long(MarshalledInvocation.calculateHash(methods[i])); + invokerMap.put(key, methods[i]); + } this.rmistub = (RemoteStub)UnicastRemoteObject.exportObject(this, port, csf, ssf);// casting is necessary because interface has changed in JDK>=1.2 updateHAPartition(partition); HARMIServer.rmiServers.put(key, this); - } /**
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development