Class AMXGlassfish


  • public final class AMXGlassfish
    extends Object
    AMX behavior specific to Glassfish V3.
    • Constructor Detail

      • AMXGlassfish

        public AMXGlassfish​(String jmxDomain)
        Anything other than DEFAULT is not supported in Glassfish V3
    • Method Detail

      • getGlassfishVersion

        public static String getGlassfishVersion()
        Return a version string, or null if not running in Glassfish
      • amxJMXDomain

        public String amxJMXDomain()
        JMX domain used by AMX MBeans.

        All MBeans in this domain must be AMX-compliant, see http://tinyurl.com/nryoqp = https://glassfish.dev.java.net/nonav/v3/admin/planning/V3Changes/V3_AMX_SPI.html

      • amxSupportDomain

        public String amxSupportDomain()
        JMX domain used by AMX support MBeans. Private use only
      • dasName

        public String dasName()
        name of the Domain Admin Server (DAS) as found in an ObjectName
      • dasConfig

        public String dasConfig()
        name of the Domain Admin Server (DAS) <config>
      • domainRoot

        public ObjectName domainRoot()
        return the ObjectName of the AMX DomainRoot MBean
      • monitoringRoot

        public ObjectName monitoringRoot()
        ObjectName for top-level monitoring MBean (parent of those for each server)
      • serverMon

        public ObjectName serverMon​(String serverName)
        ObjectName for top-level monitoring MBean for specified server
      • serverMonForDAS

        public ObjectName serverMonForDAS()
        ObjectName for top-level monitoring MBean for the DAS.
      • newObjectName

        public ObjectName newObjectName​(String pp,
                                        String type,
                                        String name)
        Make a new AMX ObjectName with unchecked exception. name must be null to create a singleton ObjectName. Note that the arguments must not contain the characters
        Parameters:
        pp - The parent part
        type - The ObjectName type
        name - The ObjectName name
        Returns:
        The objectname with pp, type, and (optionally) name.
      • newObjectName

        public ObjectName newObjectName​(String s)
        Make a new ObjectName for AMX domain with unchecked exception
      • waitAMXReady

        public ObjectName waitAMXReady​(MBeanServerConnection server)
        Wait until AMX has loaded and is ready for use.

        This will not cause AMX to load; it will block forever until AMX is ready. In other words, don't call this method unless it's a convenient thread that can wait forever.

      • bootAMX

        public ObjectName bootAMX​(MBeanServerConnection conn)
                           throws IOException
        Ensure that AMX is loaded and ready to use. This method returns only when all AMX subsystems have been loaded. It can be called more than once without ill effect, subsequent calls are ignored.
        Parameters:
        conn - connection to the MBeanServer
        Returns:
        the ObjectName of the domain-root MBean
        Throws:
        IOException