OpMath

com.opmath.test.j2ee.client
Class ContactClient

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

public class ContactClient
extends Object

Title: Example: DMLDoc with J2SDKEE 1.3.1 Description: Demonstrates the use of DMLDoc (as contained within Open Math utilities v010) with the Sun Java 2 Software Development Kit Enterprise Edition (J2SDKEE) version 1.3.1. Copyright: Copyright (c) 2002 Company: The Open Math Company Limited

Version:
1.0
Author:
Bruno Beloff

Field Summary
static String EJB_CODED_NAME
          The name used to refer to the remote Contact EJB.
 
Constructor Summary
ContactClient()
          Constructs a new UniqueIdClient instance.
 
Method Summary
 Contact findContact(long id)
           
static void main(String[] args)
          Runs the UniqueIdClient test.
 Contact newContact(long id)
           
 
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 Contact EJB. Set to "ejb/Contact"

Constructor Detail

ContactClient

public ContactClient()
              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 Contact EJB.

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

newContact

public Contact newContact(long id)
                   throws CreateException,
                          RemoteException

findContact

public Contact findContact(long id)
                    throws FinderException,
                           RemoteException

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 Contact EJB.

OpMath

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