1 Reply Latest reply on Oct 15, 2002 9:53 PM by Adrian Brock

    Run template from different node?

    Siegfried Heintze Newbie

      How do I modify the client in the template directory of the quickstart to run from something other than local host? Where can I specify an IP node? As I recal, the lookup method's parameter is vendor specific.


      Here is the source code:

      * JBoss, the OpenSource J2EE webOS
      * Distributable under LGPL license.
      * See terms of license at gnu.org.
      package test.client;

      import javax.naming.InitialContext;
      import javax.rmi.PortableRemoteObject;

      import test.interfaces.TestSession;
      import test.interfaces.TestSessionHome;

      public class TestClient {

      public static void main(String[] args){
      try {
      InitialContext lContext = new InitialContext();

      TestSessionHome lHome = (TestSessionHome) lContext.lookup( "ejb/test/TestSession" );
      TestSession lSession = lHome.create();
      // Get a new Id of the Test Entity
      int lId = lSession.getNewEntityId();
      System.out.println( "New Entity Id is: " + lId );

      } catch( Exception e ){