1 6 package org.jfox.examples.ejb.timer; 7 8 import javax.naming.Context ; 9 import javax.naming.InitialContext ; 10 11 import junit.framework.TestCase; 12 13 16 17 public class TestMain extends TestCase { 18 private TestTimerHome home; 19 private TestTimer bean; 20 21 protected void setUp() throws Exception { 22 Context ctx = new InitialContext (); 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 { 28 super.tearDown(); 29 } 30 31 public void testShedule() throws Exception { 32 bean.shedule(10000); 33 } 34 35 public static void main(String [] args) { 36 37 } 38 } 39 40 | Popular Tags |