Exemplo n.º 1
0
 private void initJmx() {
   try {
     MBeanServer mbs = con.getMBeanServer();
     ObjectName monitorName =
         new ObjectName("com.cubeia.firebase.service:type=ServerConfigProvider");
     mbs.registerMBean(new ConfigurationDetails(this), monitorName);
   } catch (Exception e) {
     log.error("failed to start mbean", e);
   }
 }
Exemplo n.º 2
0
 private void destroyJmx() {
   try {
     MBeanServer mbs = con.getMBeanServer();
     ObjectName monitorName =
         new ObjectName("com.cubeia.firebase.service:type=ServerConfigProvider");
     if (mbs.isRegistered(monitorName)) {
       mbs.unregisterMBean(monitorName);
     }
   } catch (Exception e) {
     log.error("failed to stop mbean", e);
   }
 }
Exemplo n.º 3
0
  /**
   * Init service
   *
   * @param context
   * @throws SystemException
   */
  public void init(ServiceContext context) throws SystemException {

    configDirectory = context.getServerConfigDirectory();
    System.out.println("ServerConfigFirectory:" + configDirectory.getAbsolutePath());
  }
Exemplo n.º 4
0
 public void init(ServiceContext con) throws SystemException {
   this.con = con;
   this.configDir = con.getServerConfigDirectory();
   setupServerConf();
   initJmx();
 }