org.openpermis.examples.ejb.client
Class HelloEjbGuiClient

java.lang.Object
  extended by org.openpermis.examples.ejb.client.HelloEjbGuiClient
All Implemented Interfaces:
Runnable

public class HelloEjbGuiClient
extends Object
implements Runnable

Java client that prompts the user for a name and executes the hello world service.

The client uses the configured naming context and tries to access the hello world service from the EJB name passed on the command line. (The name at which the EJB is registered at the naming context usually corresponds to the EAR name when deploying to a EJB3 container.)

The intresting part of this example, namely the call to the EJB is perfomed in method execute(String). The rest of this client deals with a simple user interface.

See Also:
execute(String)
Since:
0.3.0

Constructor Summary
HelloEjbGuiClient(String serviceName)
          Creates a new hello world client that connects to the specified service.
 
Method Summary
static void main(String[] args)
          Starts the hello world EJB client.
 void run()
          Starts the hello world EJB client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelloEjbGuiClient

public HelloEjbGuiClient(String serviceName)
Creates a new hello world client that connects to the specified service.

Parameters:
serviceName - the context location of the HelloEjbServiceRemote.
Since:
0.3.0
Method Detail

main

public static void main(String[] args)
Starts the hello world EJB client.

Pass the name of the EJB as the first argument to the client.

Parameters:
args - the application arguments containing the EJB name as the first argument.
See Also:
run()
Since:
0.3.0

run

public void run()
Starts the hello world EJB client.

Prompts for a user name and executes the hello world service.

Specified by:
run in interface Runnable
Since:
0.3.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:18:14
Copyright (c) 2002-2007 Ergon Informatik AG