KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > timer > client > Client


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.tutorial.timer.client;
8
9 import org.jboss.tutorial.timer.bean.ExampleTimer;
10
11 import javax.naming.InitialContext JavaDoc;
12
13
14 public class Client
15 {
16    public static void main(String JavaDoc[] args) throws Exception JavaDoc
17    {
18       InitialContext JavaDoc ctx = new InitialContext JavaDoc();
19       ExampleTimer timer = (ExampleTimer) ctx.lookup(ExampleTimer.class.getName());
20       timer.scheduleTimer(5000);
21    }
22 }
23
Popular Tags