/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */
package org.jfox.framework.deploy;

import org.jfox.framework.ComponentMeta;
import org.jfox.framework.ImplemetationRefParameter;
import org.jfox.framework.Parameter;
import org.jfox.framework.Registry;
import org.jfox.framework.management.http.HttpManagementServerComponent;

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

public class DeployMonitorTestStandalone {

    public static void main(String[] args) throws Exception {
        Registry registry = Registry.getInstance();
        registry.registerComponent(HttpManagementServerComponent.class);
        registry.registerComponent(ComponentDeployer.class);
        ComponentMeta meta = registry.registerComponent(DeployMonitor.class,
                new Parameter[]{
                    new ImplemetationRefParameter(ComponentDeployer.class)
                });
        registry.getComponentInstance(meta.getComponentName());
//    System.out.println(meta);
        registry.start();

//    System.out.println("count components: " + registry.countComponents());
//    Thread.sleep(5000);
//    System.out.println("count components after sleep: " + registry.countComponents());
//    registry.getComponentInstance(ComponentName.parseString("org.jfox.framework.sample.AComponent@default",registry.getClassLoaderRepository()));
//    System.out.println("count components after instantiate AComponent: " + registry.countComponents());

    }
}

