OpMath

com.opmath.test.j2ee.client
Class UniqueIdClient

java.lang.Object
  |
  +--com.opmath.test.j2ee.client.UniqueIdClient

public class UniqueIdClient
extends Object

Tests the UniqueIdGenerator EJB. See the file 'runclient.sh' (included with this distribution) for JVM configuration for this client app.

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SDK 1.3.1, J2SDKEE 1.3.1, EJB 2.0
Version:
OpMath J2EE Example v1.0
Author:
Bruno Beloff bruno.beloff@opmath.com

Field Summary
static String EJB_CODED_NAME
          The name used to refer to the remote UniqueIdGenerator EJB.
 
Constructor Summary
UniqueIdClient(String name)
          Constructs a new UniqueIdClient instance.
 
Method Summary
 UniqueIdGenerator getUniqueIdGenerator()
          Returns the UniqueIdGenerator EJB known to this UniqueIdClient.
static void main(String[] args)
          Runs the UniqueIdClient test.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EJB_CODED_NAME

public static final String EJB_CODED_NAME

The name used to refer to the remote UniqueIdGenerator EJB. Set to "ejb/UniqueIdGenerator"

Constructor Detail

UniqueIdClient

public UniqueIdClient(String name)
               throws Exception

Constructs a new UniqueIdClient instance. If no unique ID generator matching the client's key exists, then one is created. Note that multiple UniqueIdClient instances can share the same UniqueIdGenerator EJB.

Parameters:
name - a String specifying the key for the UniqueIdGenerator EJB.
Throws:
Exception - if problems were encountered in communicating with the application server or UniqueIdGenerator EJB.
Method Detail

getUniqueIdGenerator

public UniqueIdGenerator getUniqueIdGenerator()

Returns the UniqueIdGenerator EJB known to this UniqueIdClient. (Specifically, it returns the remote interface of the EJB.)


main

public static void main(String[] args)

Runs the UniqueIdClient test. The test can be run any number of times in the same environment (and should be run multiple times, inorder to functionally test the EJB).

Parameters:
Exception - a String[] of command line arguments. Argument 0 is used as the key of the UniqueIdGenerator EJB.

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK