Facilities Guide

CHAPTER 5

SilverJ2EEClient

This chapter describes SilverJ2EEClient, the facility provided with the Novell exteNd Application Server to host Java-based clients for J2EE applications. Topics include:

 
Top of page

About SilverJ2EEClient

If your production environment includes J2EE application clients, the user machines running them will need to install and use SilverJ2EEClient. SilverJ2EEClient is a low-administration J2EE application client container that hosts your clients with a robust set of supporting J2EE services (including deployment, JNDI namespace access, and security authentication).

For more information    For information on developing J2EE application clients, see the exteNd Director help.

 
Top of section

SilverJ2EEClient features

Users invoke SilverJ2EEClient to run J2EE application clients you've deployed to the application server. The features SilverJ2EEClient provides to support these clients include:

Feature

Description

Container installation

SilverJ2EEClient is easy to download from the server and install on user machines.

Client deployment

When the user starts a particular client, SilverJ2EEClient checks whether the user machine already has the appropriate versions of that client's deployed JAR files. If not, it automatically downloads them from the server.

Communication protocols

When downloading JARs from the server to a user machine, SilverJ2EEClient uses HTTP (or HTTPS) as the communication protocol. In all other cases (such as access to EJBs and other resources), it uses RMI-IIOP or RMI-IIOP over SSL (for secured EJBs). Beyond that, you're free to code your client classes to use any communication protocols necessary for particular tasks.

User authentication

When SilverJ2EEClient connects to the server to download client JARs, it automatically handles any user authentication required (such as by prompting for user name and password). Alternatively, it lets you pass user name and password command-line options (to support authentication during RMI-IIOP communication).

Server access

When accessing the server, SilverJ2EEClient automatically takes care of establishing an RMI session. You don't need to write any code for this in your client classes.

Namespace access

SilverJ2EEClient automatically provides a JNDI namespace for your client. This gives your client classes access to environment entries, EJB references, and resource references.

Client portability

Because SilverJ2EEClient handles the housekeeping, you are insulated from having to write vendor-specific code in your client classes.

 
Top of page

Installing SilverJ2EEClient

To minimize administration effort, the Novell exteNd Application Server can host installers that users then download to set up the current version of SilverJ2EEClient. The server also offers an install page that users can browse to for easy selection of the appropriate installer flavor (Windows, UNIX, or Linux).

 
Top of section

Hosting the SilverJ2EEClient installers on your server

The SilverJ2EEClient installers are not included when you install the Novell exteNd Application Server from the product CD. If you want to host these installers on your application server, you must obtain them from the Novell developer Web site and store them in the appropriate server directory.

Procedure To host the installers:

  1. Download the SilverJ2EEClient installer files from developer.novell.com/ndk/j2eeclient.htm

  2. Copy the downloaded installer files to the following Novell exteNd directory on your application server machine:

      AppServer\Resources\SilverJ2EEClientInstall
    

When you complete these steps, the SilverJ2EEClient installers will be ready for users to access from your server.

 
Top of section

Going to the SilverJ2EEClient install page

By default, the SilverJ2EEClient install page is available from your server at the following URL:

  http://servername/SilverStream/Pages/SilverJ2EEClient.html

You can instruct users to type this URL directly in their browsers, or you can supply a page that links to it for easier access.

Using the install page   Once displayed, the SilverJ2EEClient install page provides links that users can click to download:

This page also includes instructions for using the installers and for starting SilverJ2EEClient once installed.

Providing direct access to the installers   You may want to let users download a SilverJ2EEClient installer directly, without going to the SilverJ2EEClient install page first. In that case you can instruct them to type one of the following URLs, or you can link to it from your own pages:

To link directly to this version of the SilverJ2EEClient installer

Use this URL

Windows

SilverJ2EEClientInstall.exe

UNIX (Solaris)

SilverJ2EEClientInstallSolaris.sh

Linux

SilverJ2EEClientInstallLinux.sh

These URLs all begin with:

  http://servername/SilverStream/SilverJ2EEClientInstall/

NetWare support for the installers   On Novell NetWare, the application server can host the SilverJ2EEClient installers for Windows, UNIX, and Linux clients. To download these installers, users can access the SilverJ2EEClient install page from the application server. Because NetWare is a server platform, there isn't a NetWare version of the SilverJ2EEClient installer for users to download.

SilverJ2EEClient itself is automatically installed on the NetWare machine when you install the application server. Also, you can use the Novell Clients Software CD that accompanies NetWare to install Novell exteNd Application Server Clients (which includes SilverJ2EEClient) on Microsoft Windows machines.

For more information    For more information on NetWare install issues, see Installing Novell exteNd.

 
Top of section

Installing on Windows

Once you download the Windows version of the SilverJ2EEClient installer, you'll have the following file on your local machine:

  SilverJ2EEClientInstall.exe

Run this file to install SilverJ2EEClient and the supporting components it requires.

What gets installed   When the installer is done, you'll have a directory for SilverJ2EEClient on your local machine that contains:

SilverJ2EEClient should now be ready to use on this machine.

 
Top of section

Installing on UNIX or Linux

Once you download a UNIX or Linux version of the SilverJ2EEClient installer, you'll have the following file on your local machine: SilverJ2EEClientInstallPlatform.sh. Run this file to install SilverJ2EEClient and the supporting components it requires.

For example:

What gets installed   When the installer is done, you'll have a directory for SilverJ2EEClient on your local machine that contains:

SilverJ2EEClient should now be ready to use on this machine.

For more information    For detailed information about UNIX or Linux platform support, see the Release Notes.

 
Top of section

Installing from the product CD

Another way to install SilverJ2EEClient is to use the Novell exteNd installation program from your product CD. This program enables you to install SilverJ2EEClient (and supporting files) alone or along with other application server components.

Installing SilverJ2EEClient this way is primarily for developers. The result is the same as accessing the SilverJ2EEClient install page (SilverJ2EEClient.html) from the server to do the installation.

For more information    For more information on using the Novell exteNd installation program, see Installing Novell exteNd.

If you're using Novell NetWare, see NetWare support for the installers.

 
Top of page

Starting SilverJ2EEClient

You can start SilverJ2EEClient in several different ways, depending on the platform you're using (Windows, NetWare, UNIX, or Linux).

 
Top of section

Running on Windows

In Windows, you can start SilverJ2EEClient by doing either of the following:

Using the executable   You can start SilverJ2EEClient from the command prompt by invoking the executable program SilverJ2EEClient.exe. Enter:

  installdirectory\bin\SilverJ2EEClient [options] 
     [protocol://]hostname[:port] databasename clientname [appargs]

where:

Parameter

What to specify

installdirectory

The root directory where SilverJ2EEClient is installed on the user machine. For example:

  c:\SilverJ2EEClient

options

(Optional) Startup options for controlling the execution of SilverJ2EEClient. Specify zero or more of these. For example:

  -as_username=sam -as_password=icecream

For more information    See Using startup options.

protocol

(Optional) One of the following HTTP protocols:

  • http:// (default)

  • https:// (for SSL connections)

hostname

The host name (or Internet address) of the Novell exteNd Application Server to access. For example:

  corporate

port

(Optional) The TCP/IP port number that server uses. For example:

  8080

The default is 80.

databasename

The name of the deployment database containing the client deployment to run. For example:

  sales

clientname

The name of the J2EE application client deployment to run. For example:

  quotaclient

appargs

(Optional) Application-specific arguments that you want to pass through to your client for processing. Specify zero or more of these. For example:

  myarg -myswitch -y 2003

For more information    See Passing application arguments.

For example:

  c:\SilverJ2EEClient\bin\SilverJ2EEClient 
     -as_username=sam -as_password=icecream 
     http://corporate:8080 sales quotaclient 
     myarg -myswitch -y 2003

If you don't want to type the command every time, you can create a batch (BAT) file to issue it.

Using SJC files   Another alternative to starting SilverJ2EEClient from the command prompt is to use SJC files. SJCs are SilverJ2EEClient application files in which you store all the arguments you'd otherwise type. Opening an SJC file automatically invokes the SilverJ2EEClient executable SilverJ2EEClient.exe and uses those arguments.

The association between the SJC file extension and SilverJ2EEClient.exe is automatically set up in Windows when you install SilverJ2EEClient.

Procedure To create an SJC file:

  1. Open a new text file in an editor of your choice.

  2. Type the following on a single line:

      [options] [protocol://]hostname[:port] databasename clientname 
         [appargs]
    

    For example:

      -as_username=sam -as_password=icecream 
         http://corporate:8080 sales quotaclient 
         myarg -myswitch -y 2003
    
  3. Save this text file with the extension SJC. For example:

      quota.sjc
    

Once you have an SJC file, you can:

 
Top of section

Running on NetWare

In NetWare, you can start SilverJ2EEClient from the system console by invoking the executable program SilverJ2EEClient.nlm (installed in SYS:\exteNd\AppServer\bin). Enter:

  SilverJ2EEClient [options] [protocol://]hostname[:port] 
     databasename clientname [appargs]

where:

Parameter

What to specify

options

(Optional) Startup options for controlling the execution of SilverJ2EEClient. Specify zero or more of these. For example:

  -as_username=sam -as_password=icecream

For more information    See Using startup options.

protocol

(Optional) One of the following HTTP protocols:

  • http:// (default)

  • https:// (for SSL connections)

hostname

The host name (or Internet address) of the Novell exteNd Application Server to access. For example:

  corporate

port

(Optional) The TCP/IP port number that server uses. For example:

  83

The default is 80.

databasename

The name of the deployment database containing the client deployment to run. For example:

  sales

clientname

The name of the J2EE application client deployment to run. For example:

  quotaclient

appargs

(Optional) Application-specific arguments that you want to pass through to your client for processing. Specify zero or more of these. For example:

  myarg -myswitch -y 2003

For more information    See Passing application arguments.

For example:

  SilverJ2EEClient -as_username=sam -as_password=icecream 
     http://corporate:83 sales quotaclient 
     myarg -myswitch -y 2003

If you don't want to type the command every time, you can create an NCF file to issue it.

 
Top of section

Running on UNIX or Linux

In UNIX or Linux, you can start SilverJ2EEClient from the command prompt by invoking the executable program SilverJ2EEClient. Enter:

  installdirectory/bin/SilverJ2EEClient [options] 
     [protocol://]hostname[:port] databasename clientname [appargs]

where:

Parameter

What to specify

installdirectory

The root directory where SilverJ2EEClient is installed on the user machine. For example:

  /export/home/sam/SilverJ2EEClient

options

(Optional) Startup options for controlling the execution of SilverJ2EEClient. Specify zero or more of these. For example:

  -as_username=sam -as_password=icecream

For more information    See Using startup options.

protocol

(Optional) One of the following HTTP protocols:

  • http:// (default)

  • https:// (for SSL connections)

hostname

The host name (or Internet address) of the Novell exteNd Application Server to access. For example:

  corporate

port

(Optional) The TCP/IP port number that server uses. For example:

  8888

The default is 8080.

databasename

The name of the deployment database containing the client deployment to run. For example:

  sales

clientname

The name of the J2EE application client deployment to run. For example:

  quotaclient

appargs

(Optional) Application-specific arguments that you want to pass through to your client for processing. Specify zero or more of these. For example:

  myarg -myswitch -y 2003

For more information    See Passing application arguments.

For example:

  /export/home/sam/SilverJ2EEClient/bin/SilverJ2EEClient 
     -as_username=sam -as_password=icecream 
     http://corporate:8888 sales quotaclient 
     myarg -myswitch -y 2003

If you prefer to work in the desktop environment, you can set up an icon to issue the command or run from your file manager.

 
Top of section

Displaying a console window

This section describes how developers can display console information on the screen when running SilverJ2EEClient in Windows.

Using the console version of SilverJ2EEClient   The Novell exteNd Application Server development environment on Windows provides a way to display standard output and error messages from SilverJ2EEClient. SilverJ2EEClient_c.exe (in the server's \bin directory) is a console version of SilverJ2EEClient that you can invoke instead of the usual end-user executable (SilverJ2EEClient.exe). You can start it from the command prompt by typing:

  serverdirectory\bin\SilverJ2EEClient_c [options] 
     [protocol://]hostname[:port] databasename clientname [appargs]

For example:

  c:\Program Files\Novell\exteNdn\AppServer\bin\SilverJ2EEClient_c 
     -as_username=sam -as_password=icecream 
     http://corporate:8080 sales quotaclient 
     myarg -myswitch -y 2003

Any standard output and error messages from SilverJ2EEClient then display in the command prompt window you're running from. That includes messages related to startup issues.

 
Top of section

Displaying your own splash screen

SilverJ2EEClient enables you to specify a JPG file of your choice as the splash screen to display whenever it starts up.

Procedure To specify the splash screen image:

  1. Install your JPG file on the user machine in one of the following ways:

  2. Set the AGCLASSPATH environment variable to specify either:

 
Top of section

SilverJ2EEClient in the development environment

When you invoke SilverJ2EEClient (or SilverJ2EEClient_c) in your development environment to test a client deployment, make sure the current directory is not the one containing your local development version of that client (compiled classes, JARs, and so on). Doing so causes classpath confusion that may prevent the client from running properly.

 
Top of page

Using startup options

There are two kinds of options you can provide when starting SilverJ2EEClient:

 
Top of section

Using - options

The following tables describe the - options you can provide when starting SilverJ2EEClient:

Option

Description

-as_username=username

Specifies the user name to use when logging in to a Novell exteNd Application Server. For example:

  -as_username=sam

If you don't supply this option and user authentication is required, you'll get a dialog prompting for user name and password.

-as_password=password

Specifies the password to use when logging in to a Novell exteNd Application Server. For example:

  -as_password=icecream

If you don't supply this option and user authentication is required, you'll get a dialog prompting for user name and password.

-as_proxy=proxyserver

Specifies a proxy server that you want to use. Include the proxy server name and (optionally) its port number (the default is 80). Examples:

  -as_proxy=corpproxy
  -as_proxy=corpproxy:8080

Using SSL    To use SSL with a proxy server, simply specify the HTTPS protocol for your Novell exteNd Application Server:

  SilverJ2EEClient -as_proxy=corpproxy
     https://finance payroll salaryclient

For more information    To learn about configuring a Novell exteNd Application Server for SSL, see the chapter on setting up security in the Administrator's Guide.

-as_use_ssl

Enables protection for ORB communication.

-?

-h

-help

Displays usage information about SilverJ2EEClient and how to start it.

Client certificate options   You can specify one of the following sets of options for client certificate support:

Set

Option

Description

1

-as_clientcertprompt

Displays a dialog for specifying the PKCS12 DER file and password.

2

-as_pkcs12file=file

Specifies the PKCS12 DER file containing the certificate and private key.

-as_pkcs12password=password

Specifies the PKCS12 password.

3

-as_x509file=file1

Specifies the X509 certificate file (supporting both DER and PEM formats).

-as_pkcs8file=file2

Specifies the PKCS8 DER file containing the private key.

-as_pkcs8password=password

Specifies the PKCS8 password.

 
Top of section

Using + options

The following table describes + options you can provide when starting SilverJ2EEClient in Windows:

Option

Description

+client or +server

Specifies the VM to use.

For more information    For more information, see the section on specifying the JVM to use in the chapter on running the server in the Administrator's Guide.

+profile

Turns on profiling for the session.

+verbose:vmopts

(For SilverJ2EEClient_c) Specifies that you want to output only startup options to the screen, without all the other information generated in verbose mode.

You can also pass standard VM options directly to the Java interpreter by specifying them as + options. The + character is automatically converted to - as the option is passed.

For example, specifying:

  +verbose

passes this option to the Java interpreter as:

  -verbose

 
Top of page

Passing application arguments

When developing a J2EE application client, you can code it to look for one or more application-specific arguments at runtime and then perform some processing based on those arguments. To help you do that, this section describes how to:

  1. Pass application arguments to a client when starting SilverJ2EEClient

  2. Enable the client to access and use those arguments

 
Top of section

Specifying the arguments to pass

When starting SilverJ2EEClient, add any application arguments to the end of the command (after the name of the client to run). For instance, to pass the arguments -dollars and 2 to the client named rateclient (in the service database on the custserv server), you specify:

  SilverJ2EEClient custserv service rateclient -dollars 2

Here are some additional rules to keep in mind:

For more information    For more information on the command syntax, see Starting SilverJ2EEClient.

 
Top of section

Accessing the arguments from a client

When SilverJ2EEClient starts a client, it invokes the main() method of the client's main class and passes any application arguments to that method as a String array. You can then read them just as you would in any Java application.

 
Top of page

Supporting access to secured EJBs

An Enterprise JavaBean (EJB) deployed on the Novell exteNd Application Server may be secured so that an IIOP over SSL connection is automatically used when someone tries to access it. To support this kind of connection, SilverJ2EEClient includes the following JAR file of CA (Certificate Authority) certificates: agrootca.jar (located in the SilverJ2EEClient \Common\lib directory).

If you need to use a CA certificate that isn't in this file, you must add it. Use the JAR editing tool of your choice (such as the Sun JAR utility or WinZip).

For more information    For more information on secured connections to EJBs, see the chapter on setting up security in the Administrator's Guide.



Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...