Package br.gov.frameworkdemoiselle.jmx.configuration

Examples of br.gov.frameworkdemoiselle.jmx.configuration.JMXConfig


public class JMXManagementExtension implements ManagementExtension {
 
  public void registerNotificationMBean(){
    MBeanManager mbeanManager = Beans.getReference(MBeanManager.class);
    JMXConfig configuration = Beans.getReference(JMXConfig.class);

    StringBuffer notificationMBeanName = new StringBuffer()
      .append( configuration.getNotificationDomain()!=null ? configuration.getNotificationDomain() : "br.gov.frameworkdemoiselle.jmx" )
      .append(":name=")
      .append(configuration.getNotificationMBeanName());
   
    if (mbeanManager.findMBeanInstance(notificationMBeanName.toString()) == null){
      NotificationEventListener listener = Beans.getReference(NotificationEventListener.class);

      ObjectInstance instance = MBeanHelper.register(listener.createNotificationBroadcaster(), notificationMBeanName.toString());
View Full Code Here


  }
 
  @Override
  public void initialize(List<ManagedType> managedTypes) {
    MBeanManager manager = Beans.getReference(MBeanManager.class);
    JMXConfig configuration = Beans.getReference(JMXConfig.class);

    for (ManagedType type : managedTypes) {
      DynamicMBeanProxy beanProxy = new DynamicMBeanProxy(type);
     
      Name nameAnnotation = type.getType().getAnnotation(Name.class);
      String mbeanName = nameAnnotation != null ? nameAnnotation.value() : type.getType().getSimpleName();

      StringBuffer name = new StringBuffer()
        .append( configuration.getMbeanDomain()!=null ? configuration.getMbeanDomain() : type.getType().getPackage().getName() )
        .append(":name=")
        .append( mbeanName );
     

      if (manager.findMBeanInstance(name.toString()) == null){
View Full Code Here

TOP

Related Classes of br.gov.frameworkdemoiselle.jmx.configuration.JMXConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.