Top Description Fields Constructors Methods
org.hibernate.jmx.internal

public Class JmxServiceImpl

extends Object
implements JmxService, Stoppable
Class Inheritance
All Implemented Interfaces
org.hibernate.service.spi.Stoppable, org.hibernate.jmx.spi.JmxService, org.hibernate.service.Service, java.io.Serializable
Imports
java.lang.management.ManagementFactory, java.util.ArrayList, .Map, javax.management.MBeanServer, .MBeanServerFactory, .MalformedObjectNameException, .ObjectName, org.hibernate.HibernateException, org.hibernate.cfg.AvailableSettings, .Environment, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.log.DeprecationLogger, org.hibernate.internal.util.config.ConfigurationHelper, org.hibernate.jmx.spi.JmxService, org.hibernate.service.Service, org.hibernate.service.spi.Manageable, .OptionallyManageable, .Stoppable

Deprecated

as a consequence of JmxService being deprecated. See corresponding docs for further information.

Standard implementation of JMX services
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final String
private final String
private static final CoreMessageLogger
public static final String
private ArrayList<ObjectName>
private final String
private boolean
private final boolean

Constructor Summary

AccessConstructor and Description
public
JmxServiceImpl(Map<K, V> configValues)

Method Summary

Modifier and TypeMethod and Description
private MBeanServer

Returns:

The MBean server to use.
findServer
()

Locate the MBean server to use based on user input from startup.

public void
registerMBean(ObjectName
The name under which to register the MBean
objectName
,
Object
The MBean to register
mBean
)

Implements org.hibernate.jmx.spi.JmxService.registerMBean.

Registers the given mBean under the given objectName
public void
registerService(Manageable
The manageable service
service
,
Class<? extends Service>
The service's role.
serviceRole
)

Implements org.hibernate.jmx.spi.JmxService.registerService.

Deprecated as a consequence of Manageable being deprecated.
Handles registration of a manageable service.
private MBeanServer
public void
stop()

Implements org.hibernate.service.spi.Stoppable.stop.

Stop phase notification
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

agentIdback to summary
private final String agentId
defaultDomainback to summary
private final String defaultDomain
LOGback to summary
private static final CoreMessageLogger LOG
OBJ_NAME_TEMPLATEback to summary
public static final String OBJ_NAME_TEMPLATE
registeredMBeansback to summary
private ArrayList<ObjectName> registeredMBeans
sessionFactoryNameback to summary
private final String sessionFactoryName
startedServerback to summary
private boolean startedServer
usePlatformServerback to summary
private final boolean usePlatformServer

Constructor Detail

JmxServiceImplback to summary
public JmxServiceImpl(Map<K, V> configValues)

Method Detail

findServerback to summary
private MBeanServer findServer()

Locate the MBean server to use based on user input from startup.

Returns:MBeanServer

The MBean server to use.

registerMBeanback to summary
public void registerMBean(ObjectName objectName, Object mBean)

Implements org.hibernate.jmx.spi.JmxService.registerMBean.

Doc from org.hibernate.jmx.spi.JmxService.registerMBean.

Registers the given mBean under the given objectName

Parameters
objectName:ObjectName

The name under which to register the MBean

mBean:Object

The MBean to register

Annotations
@Override
registerServiceback to summary
public void registerService(Manageable service, Class<? extends Service> serviceRole)

Implements org.hibernate.jmx.spi.JmxService.registerService.

Doc from org.hibernate.jmx.spi.JmxService.registerService.

Deprecated

as a consequence of Manageable being deprecated. See corresponding docs for further information.

Handles registration of a manageable service.

Parameters
service:Manageable

The manageable service

serviceRole:Class<? extends Service>

The service's role.

Annotations
@Override
startMBeanServerback to summary
private MBeanServer startMBeanServer()
stopback to summary
public void stop()

Implements org.hibernate.service.spi.Stoppable.stop.

Doc from org.hibernate.service.spi.Stoppable.stop.

Stop phase notification

Annotations
@Override