KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfox > test > kernel > component > TestComponentMain


1 /*
2  * JFox - The most lightweight Java EE Application Server!
3  * more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
4  *
5  * JFox is licenced and re-distributable under GNU LGPL.
6  */

7 package jfox.test.kernel.component;
8
9 import org.jfox.framework.Framework;
10 import org.jfox.framework.component.Module;
11 import org.jfox.framework.component.ComponentMeta;
12
13 /**
14  * @author <a HREF="mailto:jfox.young@gmail.com">Young Yang</a>
15  */

16 public class TestComponentMain {
17
18     public static void main(String JavaDoc[] args) throws Exception JavaDoc {
19         Framework framework = new Framework();
20         Module module = framework.getSystemModule();
21         ComponentMeta meta = module.loadComponent(TestComponentImpl.class);
22 // ComponentMeta meta = new ComponentMeta(module,TestComponentImpl.class);
23
// module.registerComponent(meta);
24
TestComponent testComponent = (TestComponent)meta.getComponentInstance();
25         testComponent.sayHello();
26     }
27 }
28
Popular Tags