You can set MBean attribute values that are not read-only in the following ways:
In the MBean code itself, which does not affect the Enterprise Server configuration
During deployment using the asadmin create-mbean command
During deployment using the Custom MBeans component in the Admin Console
Using the asadmin set command
Using a JMX connector such as JConsole, which does not affect the Enterprise Server configuration
In the Enterprise Server configuration, MBean attributes are stored as properties. Therefore, using the asadmin set command means editing properties. For example:
asadmin set --user adminuser server1.applications.mbean.TextPatterns.property.color=blue |
If the MBean name is different from the implementation class, you must use the MBean name in the asadmin set command. In this example, the name is TextPatterns.
For full details on the asadmin set command, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.