KickJava   Java API By Example, From Geeks To Geeks.

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


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.StatefulRemote;
10
11 import javax.naming.InitialContext JavaDoc;
12
13 public class StatefulRun
14 {
15    public static void main(String JavaDoc[] args) throws Exception JavaDoc
16    {
17       InitialContext JavaDoc ctx = new InitialContext JavaDoc();
18       StatefulRemote remote = (StatefulRemote) ctx.lookup(StatefulRemote.class.getName());
19       while (true)
20       {
21          remote.increment();
22          Thread.sleep(10000);
23       }
24    }
25 }
26
Popular Tags