/* JFox, the OpenSource J2EE Application Server
 *
 * Copyright (C) 2002 huihoo.com
 * Distributable under GNU LGPL license
 * See the GNU Lesser General Public License for more details.
 */

package org.huihoo.jfox.persistent;

import javax.management.MBeanServer;
import javax.management.MBeanRegistration;
import javax.management.ObjectName;

/**
 * 
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public abstract class Persistenter implements PersistenterMBean, MBeanRegistration {
  protected MBeanServer server = null;

  public ObjectName preRegister(MBeanServer mbeanserver, ObjectName objectname) throws Exception {
    server = mbeanserver;
    if(objectname == null) objectname = new ObjectName(server.getDefaultDomain(),"Service",this.toString());
    return objectname;
  }

  public void postRegister(Boolean value) {

  }

  public void preDeregister() throws Exception {

  }

  public void postDeregister() {

  }

}
