KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > clustering > client > StatelessRun


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.clustering.client;
8
9 import org.jboss.tutorial.clustering.bean.Session;
10
11 import javax.naming.InitialContext JavaDoc;
12
13 public class StatelessRun
14 {
15    public static void main(String JavaDoc[] args) throws Exception JavaDoc
16    {
17       InitialContext JavaDoc ctx = new InitialContext JavaDoc();
18       Session remote = (Session) ctx.lookup(Session.class.getName());
19       while (true)
20       {
21          remote.test();
22          Thread.sleep(1000);
23       }
24    }
25 }
26
Popular Tags