KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfox > examples > ejb > timer > TestMain


1 /* JFox, the OpenSource J2EE Application Server
2  *
3  * Distributable under GNU LGPL license by gun.org
4  * more details please visit http://www.huihoo.org/jfox
5  */

6 package org.jfox.examples.ejb.timer;
7
8 import javax.naming.Context JavaDoc;
9 import javax.naming.InitialContext JavaDoc;
10
11 import junit.framework.TestCase;
12
13 /**
14  * @author <a HREF="mailto:yy.young@gmail.com">Young Yang</a>
15  */

16
17 public class TestMain extends TestCase {
18     private TestTimerHome home;
19     private TestTimer bean;
20
21     protected void setUp() throws Exception JavaDoc {
22         Context JavaDoc ctx = new InitialContext JavaDoc();
23         home = (TestTimerHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("ejb/TestTimerEJB"), TestTimerHome.class);
24         bean = home.create();
25     }
26
27     protected void tearDown() throws Exception JavaDoc {
28         super.tearDown();
29     }
30
31     public void testShedule() throws Exception JavaDoc {
32         bean.shedule(10000);
33     }
34
35     public static void main(String JavaDoc[] args) {
36
37     }
38 }
39
40
Popular Tags