[jboss-cvs] JBossAS SVN: r86136 - in trunk/cluster/src/main/org/jboss/ha: jmx and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 19 18:34:37 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-03-19 18:34:37 -0400 (Thu, 19 Mar 2009)
New Revision: 86136
Modified:
trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
trunk/cluster/src/main/org/jboss/ha/jmx/AbstractHAServiceMBeanSupport.java
trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonController.java
trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileActivator.java
trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileManager.java
trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java
Log:
[JBAS-6094] Add some more management annotations
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java 2009-03-19 22:10:58 UTC (rev 86135)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java 2009-03-19 22:34:37 UTC (rev 86136)
@@ -38,6 +38,13 @@
import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.logging.Logger;
+import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementOperation;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.system.ServiceMBean;
import org.jboss.util.loading.ContextClassLoaderSwitcher;
import org.jgroups.Channel;
@@ -84,6 +91,8 @@
*
* @version $Revision$
*/
+ at ManagementObject(componentType=@ManagementComponent(type="MCBean", subtype="JChannelFactory"),
+ properties=ManagementProperties.CLASS_AND_EXPLICIT)
public class JChannelFactory extends org.jgroups.JChannelFactory
implements JChannelFactoryMBean, MBeanRegistration
{
@@ -309,6 +318,7 @@
return createMultiplexerChannel(stack_name, id);
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The domain portion of the JMX ObjectName to use when registering channels and protocols")
@Override
public void setDomain(String domain)
{
@@ -324,6 +334,7 @@
*
* @return the logical name for this server, or <code>null</code>.
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The cluster-unique logical name of this node")
public String getNodeName()
{
return nodeName;
@@ -405,6 +416,7 @@
*
* @see #setAssignLogicalAddresses(boolean)
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this factory should assign a logical address for this node to all channels")
public boolean getAssignLogicalAddresses()
{
return assignLogicalAddresses;
@@ -438,6 +450,7 @@
* @return <code>true</code> if the factories should be updated.
* Default is <code>true</code>.
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this factory should update the standard JGroups thread factories to ensure classloader leaks do not occur")
public boolean getManageNewThreadClassLoader()
{
return manageNewThreadClassLoader;
@@ -464,6 +477,7 @@
* @return <code>true</code> if the pools should be updated.
* Default is <code>false</code>.
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this factory should update the standard JGroups thread pools to ensure classloader leaks do not occur")
public boolean getManageReleasedThreadClassLoader()
{
return manageReleasedThreadClassLoader;
@@ -498,6 +512,7 @@
* @return <code>true</code> if synthetic singleton names should be created.
* Default is <code>true</code>.
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this factory should create a synthetic singleton name attribute for a channel's transport protocol if one isn't configured")
public boolean getAddMissingSingletonName()
{
return addMissingSingletonName;
Modified: trunk/cluster/src/main/org/jboss/ha/jmx/AbstractHAServiceMBeanSupport.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jmx/AbstractHAServiceMBeanSupport.java 2009-03-19 22:10:58 UTC (rev 86135)
+++ trunk/cluster/src/main/org/jboss/ha/jmx/AbstractHAServiceMBeanSupport.java 2009-03-19 22:34:37 UTC (rev 86136)
@@ -36,6 +36,8 @@
import org.jboss.ha.framework.server.ClusterPartitionMBean;
import org.jboss.ha.framework.server.EventFacility;
import org.jboss.ha.framework.server.EventFactory;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.system.ServiceMBeanSupport;
/**
@@ -88,11 +90,13 @@
}
}
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="The name of the HAPartition this service is associated with")
public String getPartitionName()
{
return this.service.getHAPartition().getPartitionName();
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this service should register its classloader with the HAPartition for use in deserializing group RPC parameters and responses")
public boolean isRegisterThreadContextClassLoader()
{
return this.service.isRegisterThreadContextClassLoader();
@@ -103,6 +107,7 @@
this.service.setRegisterThreadContextClassLoader(register);
}
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="The name under which this service registers itself with the HAPartition")
public String getHAServiceKey()
{
return this.service.getHAServiceKey();
@@ -247,6 +252,7 @@
* </p>
* @see #sendNotification(Notification)
*/
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="Whether JMX Notifications should be sent to local (same JVM) listeners if the notification is for an attribute change to attribute \"State\"")
public boolean getSendLocalLifecycleNotifications()
{
return this.sendLocalLifecycleNotifications;
@@ -278,6 +284,7 @@
*
* @see #sendNotification(Notification)
*/
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="Whether JMX Notifications should be sent to remote listeners if the notification is for an attribute change to attribute \"State\"")
public boolean getSendRemoteLifecycleNotifications()
{
return this.sendRemoteLifecycleNotifications;
Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonController.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonController.java 2009-03-19 22:10:58 UTC (rev 86135)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonController.java 2009-03-19 22:34:37 UTC (rev 86136)
@@ -30,6 +30,9 @@
import javax.management.ObjectName;
import javax.management.ReflectionException;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+
/**
* A clustered singleton service that calls a configurable
* method on a target (m)bean, whenever the current node becomes
@@ -75,6 +78,7 @@
this.mSingleton = target;
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="JMX ObjectName of the service controlled by this controller")
public ObjectName getTargetName()
{
return this.mSingletonMBean;
@@ -85,6 +89,7 @@
this.mSingletonMBean = targetObjectName;
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Name of the method to invoke on the target when this node becomes the singleton master")
public String getTargetStartMethod()
{
return this.mSingletonStartMethod;
@@ -100,6 +105,7 @@
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Name of the method to invoke on the target when this node stops being the singleton master")
public String getTargetStopMethod()
{
return this.mSingletonStopMethod;
@@ -114,6 +120,7 @@
}
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Single string parameter to pass to the target's start method when this node becomes the singleton master")
public String getTargetStartMethodArgument()
{
return this.mSingletonStartMethodArgument ;
@@ -124,6 +131,7 @@
this.mSingletonStartMethodArgument = targetStartMethodArgument;
}
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Single string parameter to pass to the target's stop method when this node stops being the singleton master")
public String getTargetStopMethodArgument()
{
return this.mSingletonStopMethodArgument ;
Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileActivator.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileActivator.java 2009-03-19 22:10:58 UTC (rev 86135)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileActivator.java 2009-03-19 22:34:37 UTC (rev 86136)
@@ -22,6 +22,12 @@
package org.jboss.ha.singleton;
import org.jboss.logging.Logger;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementObjectID;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.Profile;
import org.jboss.profileservice.spi.ProfileKey;
@@ -38,6 +44,8 @@
* @author Brian Stansberry
* @version $Revision$
*/
+ at ManagementObject(componentType=@ManagementComponent(type="MCBean", subtype="HASingletonProfileActivator"),
+ properties=ManagementProperties.EXPLICIT)
public class HASingletonProfileActivator implements HASingletonProfileActivatorMBean
{
/** Default value for {@link #getProfileName()} */
@@ -105,6 +113,7 @@
/**
* {@inheritDoc}
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Domain portion of the ProfileKey for the Profile we activate")
public String getProfileDomain()
{
return profileDomain;
@@ -125,6 +134,7 @@
/**
* {@inheritDoc}
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Server portion of the ProfileKey for the Profile we activate")
public String getProfileServer()
{
return profileServer;
@@ -145,6 +155,7 @@
/**
* {@inheritDoc}
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Name portion of the ProfileKey for the Profile we activate")
public String getProfileName()
{
return profileName == null ? DEFAULT_PROFILE_NAME : profileName;
@@ -226,6 +237,8 @@
* @see HASingletonProfileActivator#getProfileServer()
* @see HASingletonProfileActivator#getProfileName()
*/
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="ProfileKey for the Profile we activate")
+ @ManagementObjectID(type="HASingletonProfileActivator")
public ProfileKey getProfileKey()
{
if (this.profileKey == null)
Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileManager.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileManager.java 2009-03-19 22:10:58 UTC (rev 86135)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonProfileManager.java 2009-03-19 22:34:37 UTC (rev 86136)
@@ -27,6 +27,12 @@
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementObjectID;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.Profile;
import org.jboss.profileservice.spi.ProfileKey;
@@ -49,6 +55,8 @@
* @author Brian Stansberry
* @version $Revision$
*/
+ at ManagementObject(componentType=@ManagementComponent(type="MCBean", subtype="HASingletonProfileManager"),
+ properties=ManagementProperties.EXPLICIT)
public class HASingletonProfileManager extends HASingletonProfileActivator implements HASingletonProfileManagerMBean
{
private AbstractProfileFactory profileFactory;
@@ -114,11 +122,21 @@
*
* @return the list
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="List of URIs from which the Profile content is obtained")
public List<URI> getURIList()
{
return new ArrayList<URI>(uriList);
}
+
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="ProfileKey for the Profile we activate")
+ @ManagementObjectID(type="HASingletonProfileManager")
+ @Override
+ public ProfileKey getProfileKey()
+ {
+ return super.getProfileKey();
+ }
+
// ----------------------------------------------------------------- Public
Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java 2009-03-19 22:10:58 UTC (rev 86135)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java 2009-03-19 22:34:37 UTC (rev 86136)
@@ -28,6 +28,8 @@
import org.jboss.ha.framework.interfaces.HASingletonLifecycle;
import org.jboss.ha.framework.server.HASingletonImpl;
import org.jboss.ha.jmx.AbstractHAServiceMBeanSupport;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
/**
@@ -47,6 +49,7 @@
/**
* @see org.jboss.ha.framework.interfaces.HASingletonMBean#isMasterNode()
*/
+ @ManagementProperty(use={ViewUse.STATISTIC}, description="Whether this node is currently the singleton master")
public boolean isMasterNode()
{
return this.getHAService().isMasterNode();
@@ -71,6 +74,7 @@
/**
* @see org.jboss.ha.framework.interfaces.HASingleton#getRestartOnMerge()
*/
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this singleton will stop and restart itself if it is the master and a cluster merge occurs")
public boolean getRestartOnMerge()
{
return this.getHAService().getRestartOnMerge();
More information about the jboss-cvs-commits
mailing list