# Installing WebLogic RFID Edge Server

# Post-Installation Information

The following sections provide post-installation information:

- Running the Configuration Wizard
- Understanding the Windows Shortcuts
- Understanding the Product Directory Structure
- Testing the Installation
- Starting and Stopping WebLogic RFID Edge Server
- Maintaining the WebLogic RFID Edge Server System
- What's Next: Configuring the RFID Edge Server

## Running the Configuration Wizard

Always run the Configuration Wizard after the product installer has completed. The Configuration Wizard replaces tokens in the product configuration files (`etc/edge.props` and `etc/admin-console.props`) with the values you specify configuring the RFID Edge Server.

Table 9-1 describes these Edge Server configuration properties.

Table 9-1 Edge Server Configuration Properties
Property | Description
--- | ---
Site ID | The name of the location where the Edge Server and readers reside.
Edge Server ID | The name of the Edge Server instance.
Edge Server ALE Service Port | The TCP port on the Edge Server machine that your applications use to access the ALE API. Choose any port that is not being used by another application.
Monitoring Rate (ms) | Specifies how frequently the Edge Server sends telemetry information to the Administration Console. Expressed in milliseconds. Default: 1000

The following section describes how to invoke the Configuration Wizard in graphical mode.

### Starting in Graphical Mode

When run in graphical mode, the Configuration Wizard is executed in a graphical environment. The console for the machine on which the product installation resides must support a Java-based GUI. All Windows-based consoles support Java-based GUIs; only a subset of UNIX-based consoles support Java-based GUIs.

You can start the Configuration Wizard in graphical mode from either the Windows Start menu or from the command line.

- To start the Configuration Wizard in graphical mode on a Windows platform, choose the Configuration Wizard option from the BEA program group in the Windows Start Menu:

Start Programs BEA WebLogic RFID Edge Server <version> Run Configuration Wizard

- To start the Configuration Wizard in graphical mode from a Windows command prompt or on a UNIX platform:

1. Log in to the target system on which the product installation resides.
2. Open an MS-DOS command prompt window (on Windows) or a command shell (on UNIX).
3. Go to the \common\bin subdirectory of the product installation directory. For example:

    cd c:\bea\rfid_edge20\common\bin

4. Invoke one of the following scripts to start the Configuration Wizard in graphical mode:

Windows: `config.cmd`

UNIX: `config.sh`

## Understanding the Windows Shortcuts

When you install your BEA WebLogic RFID Edge Server software on a Windows system, the installation program automatically creates shortcut entries on the Start Menu.

Note: | If the user performing the installation has Administrator privileges, the shortcut entries can be created in the All Users Start menu folder or in the user's local Start menu folder. For more information, see Administrator Privileges (Windows).

Options on the Start Menu vary, according to the components you choose to install.

The BEA WebLogic RFID Edge Server folder (Start Programs BEA WebLogic RFID Edge Server <version>) contains the shortcuts shown in the following list:

- Run Quick Test — Tests the success of the installation. See Testing the Installation.
- Run Reader Simulator — Starts the reader simulator. See Reader Simulator Configuration and Using the Reader Simulator.
- Start Edge Server — Starts an instance of the RFID Edge Server. See Starting and Stopping WebLogic RFID Edge Server.
- Uninstall RFID Edge Server — launches the uninstallation program. See Uninstalling the Software.
- Run Administration Console — Starts the RFID Edge Server Administration Console. See Using the Administration Console.
- Run Configuration Wizard — Configures basic properties such as Site ID and Edge Server ID. See Running the Configuration Wizard.

## Understanding the Product Directory Structure

During the product installation, you are asked to select or create a BEA Home directory and a product installation directory. For information about the BEA Home directory, see Choosing a BEA Home Directory. For a complete installation, the installation program creates a dedicated directory structure for the BEA Products software. It may or may not reside in the BEA Home directory. Table 9-2 describes the contents of each directory.

Note: | The installation program does not create directories for components that are not installed.

Table 9-2 Product Installation Directory Structure
This directory . . . | Contains . . .
`/bin` | Scripts that start the Administration Console, Edge Server, Reader Simulator, and Quick Test utility: `RunAdminConsole` `RunEdgeServer` `RunQuickTest` `RunReaderSim`
`/etc` | Properties and logging files for the Administration Console, Edge Server, and JMS Notification Driver: `admin-console.props` `edge.props` `jms.options` `logging.props.admin-console` `logging.props.edge`
`/lib` | Java libraries used by RFID Edge Server components.
`/samples` | Sample Java source code and class files that illustrate use of the ALE and ALEPC APIs, Edge Flow samples, and customer driver samples.
`/share/schemas` | Schema used to represent RFID Edge Server data types in XML and WSDL files and describing the data types used by the Edge Flow modules.
`/uninstall` | Code required to uninstall the BEA software.
`/var/edgestate` | The `edgestate` directory contains state data about `ECSpec`, `PCSpec`, and `EPCCacheSpec` instances and their subscribers, and reader configuration data for readers configured using the Administration Console, as well as other persistent data that you create.

## Testing the Installation

Make sure that WebLogic RFID Edge Server is correctly installed and running as soon as your installation is complete by:

- Starting the Reader Simulator (`bin\RunReaderSim.bat` or `bin/RunReaderSim.sh`).
- Starting the Edge Server (`bin\RunEdgeServer.bat` or `bin/RunEdgeServer.sh`).
- Running the QuickTest utility (`bin\RunQuickTest.bat` or `bin/RunQuickTest.sh`).

The simulator is preconfigured to see seven GID-64-I tags in each of two antennas, and the QuickTest application will report that it sees these tags. The simulator's properties definitions in `edge.props` are examples of the properties definitions required to configure WebLogic RFID Edge Server to communicate with any reader.

1. First, set up your desktop so you can see both the Reader Simulator and a new console window at the same time.
2. In the new console window, start the QuickTest utility.

In the console window, you can see that QuickTest first connects to the Edge Server, then starts testing a logical reader called `ConnecTerra1`, followed by testing a logical reader called `Connecterra2` (these are the two default logical readers defined in the Reader Simulator)`:`

    BEA WebLogic RFID Edge Server 3.0.0 Quick Test
    Copyright (C) 2003-2007 by BEA Systems, Inc.
    All Rights Reserved; use is subject to license terms.
    US and International Patents Pending

    Connecting to edge server...
    Finished connecting to edge server.

    Testing logical reader ConnecTerra1...
      Logical reader ConnecTerra1 read the following 7 EPCs:
        urn:epc:tag:gid-64-i:10.70.7
        urn:epc:tag:gid-64-i:10.50.5
        urn:epc:tag:gid-64-i:10.20.2
        urn:epc:tag:gid-64-i:10.60.6
        urn:epc:tag:gid-64-i:10.10.1
        urn:epc:tag:gid-64-i:10.40.4
        urn:epc:tag:gid-64-i:10.30.3
    Finished testing logical reader ConnecTerra1.

    Testing logical reader ConnecTerra2...
      Logical reader ConnecTerra2 read the following 7 EPCs:
        urn:epc:tag:gid-64-i:38000.1571.4
        urn:epc:tag:gid-64-i:38000.171.1
        urn:epc:tag:gid-64-i:38000.4971.7
        urn:epc:tag:gid-64-i:38000.1771.5
        urn:epc:tag:gid-64-i:38000.2971.6
        urn:epc:tag:gid-64-i:38000.571.2
        urn:epc:tag:gid-64-i:38000.871.3
    Finished testing logical reader ConnecTerra2.

## Starting and Stopping WebLogic RFID Edge Server

You start WebLogic RFID Edge Server with individual scripts in the `RFID_EDGE_HOME/bin` directory, where `RFID_EDGE_HOME` is the directory where you installed the WebLogic RFID Edge Server software.

Note that in a custom installation, not all files may be on the same machine.

### Starting WebLogic RFID Edge Server in a Windows Environment

From the `RFID_EDGE_HOME\bin` directory, run the following commands in the order shown:

- `RunAdminConsole.bat`

Starts the Administration Console GUI.

- `RunReaderSim.bat`

Optional - Run only if you are using the reader simulator software, rather than actual readers.

- `RunEdgeServer.bat`

Starts the Edge Server. Displays a console window on the machine where you started the Edge Server.

Because it is installed as a Windows service, you can also start the Edge Server through the Control Panel:

Start Settings Control Panel Administrative Tools Services, then right click BEA WebLogic RFID Edge Server and select Start.

- `RunQuickTest.bat`

Optional - Provides a quick test to see that your Edge Server and readers are operating correctly. See Testing the Installation for details. Note that in either a standard or custom installation, the QuickTest utility is automatically installed in the same location as the Edge Server.

### Running the RFID Edge Server as a Windows Service

In a Windows environment, the RFID Edge Server is installed as a Windows service. By default it is installed in manual, stopped mode. To alter the default, open the Component Services control panel: Start Settings Control Panel Administrative Tools Component Services. Choose the Services (Local) window in the left pane, and double-click the WebLogic RFID Edge Server service to access the service's properties.

You can start the RFID Edge Server either by starting the Windows service, or by running the batch file, `RunEdgeServer.bat`. The batch file runs the Edge Server as a stand-alone process. It does not start the service in place. If you try to run the batch file stand-alone while the service is running, or if you try to start the Edge Server as a service while the batch file is running, the attempt will fail.

When running the Edge Server as a Windows service, the `edge.wrapper.conf` file must be updated with `wrapper.java.classpath` properties set to the JMS implementation jar files (specified in `jms.options`).

The `RFID_EDGE_HOME/lib/install` directory contains two `.bat` files which provide a method for you to manually installing or uninstall WebLogic RFID Edge Server as a Windows service:

- `InstallEdgeService.bat`
- `UninstallEdgeService.bat`

### Starting WebLogic RFID Edge Server in a UNIX Environment

From the `RFID_EDGE_HOME/bin` directory, run the following scripts in the order shown:

- `RunAdminConsole.sh`

Starts the Administration Console GUI. For example, to start the Administration Console when the installation directory for the RFID Edge Server is `/opt/bea/rfid_edge20`:

    # /opt/bea/rfid_edge20/bin/RunAdminConsole.sh

- `RunReaderSim.sh`

Optional - Run only if you are using the reader simulator software, rather than actual readers.

- `RunEdgeServer.sh`

Starts the Edge Server. Displays a console window on the machine where you started the Edge Server.

- `RunQuickTest.sh`

Optional - Provides a quick test to see that your Edge Server and readers are operating correctly. See Testing the Installation for details. Note that in either a standard or custom installation, the QuickTest utility is automatically installed in the same location as the Edge Server.

### Starting the Edge Server at System Boot

In a UNIX environment, the WebLogic RFID Edge Server installation includes an initialization script for the Edge Server: `RFID_EDGE_HOME/bin`/`rfidedgeserver`. You can use the `rfidedgeserver` script to ensure that the system starts the RFID Edge Server at system boot, and restarts the RFID Edge Server automatically in the case of an unexpected exit.

The `rfidedgeserver` script takes one argument: start,stop, or restart. Table 9-3 describes possible failure conditions for each argument.

Table 9-3 Edge Server Startup Arguments
This Argument... | Fails If...
--- | ---
`start` | The Edge Server fails to start three times in a row. The Edge Server is already running.
`stop` | The Edge Server process cannot be killed. (Warn only) If the Edge Server is not running.
`restart` | Stop or start fails.

The `rfidedgeserver` script can be run as needed from within the WebLogic RFID Edge Server install directory, or invoked on system startup. If it will be a startup script, you will need to copy it to the `/etc/init.d` directory and create a symbolic link to it in one of the system run-level directories (`/etc/rc[0-6].d`) before it will run automatically.

### Stopping WebLogic RFID Edge Server

To shut down the software, either terminate or kill each of the three processes you started in Starting WebLogic RFID Edge Server in a Windows Environment or Starting WebLogic RFID Edge Server in a UNIX Environment.

## Maintaining the WebLogic RFID Edge Server System

The following sections provide maintenance information.

### Backing Up the System

System backups should be planned in the initial architectural design phases of your site's WebLogic RFID Edge Server-based implementation. Frequent backups and offsite storage are two key components of a successful system administration strategy.

At a minimum, backups should include the following directories under `RFID_EDGE_HOME`, where `RFID_EDGE_HOME` is the directory where you installed the WebLogic RFID Edge Server software:

- `etc/` - This directory contains configuration information that can be used to configure a new Edge Server in the event of a machine failure.
- `var/` - This directory contains state and log information stored by the Edge Server.

Caution: If your backup plan requires backing up a running Edge Server, make certain beforehand that your solution supports backing up open files.

- `edgestate/` - This persistence store maintains the Edge Server state data about `ECSpec`, `PCSpec`, and `EPCCacheSpec` instances and their subscribers, and reader configuration data for readers configured using the Administration Console. The type and number of files in this directory, and the frequency of file updates, depend on how your Edge Server is deployed, and for what purposes. The location of this directory is configurable.

The persistence store is configured in `edge.props`. The settings in this file specify the location of the persistence store, whether or not you are keeping state data each time you stop and restart the Edge Server, and other configuration details. For more information, see Editing edge.props to Configure State Data.

Optionally, consider adding the `bin` or `lib` directories as backup targets, if either directory contains files that cannot be fully recreated by the WebLogic RFID Edge Server installer.

### Restoring the System

The procedures for restoring your Edge Server vary based on the condition of the hardware and availability of the persistence store. The general steps for restoring a failed system are:

1. Obtain and reinstall the proper version of WebLogic RFID Edge Server.
2. Restore data from the backup server to the new WebLogic RFID Edge Server host.
3. If the persistence store (typically `var/edgestate/`) on the failed system is not available, applications will need to define new `ECSpec` or `PCSpec` and `EPCCacheSpec` instances and subscribe to them.

In the following instructions, assume the failed Edge Server hardware is E1 and the replacement Edge Server hardware is E2:

1. Assign E2 the same hostname and IP address as E1.
2. Install WebLogic RFID Edge Server on E2. This must be the same version that previously was installed on E1.
3. Copy the backed-up configuration (`etc/*`) data and persistence store (`var/edgestate/*`) data (if available) to the same location on E2 relative to the WebLogic RFID Edge Server install directory.
4. Start WebLogic RFID Edge Server on E2.
5. If persistence store data was not available:

- For applications that read tags, define new `ECSpec` instance(s).
- For applications that write tags, define new `PCSpec` instance(s) and `EPCCacheSpec` instance(s).
- Application(s) subscribe to `ECSpec`, `PCSpec`, or `EPCCacheSpec` instances on E2.
- Reconfigure readers previously configured via the Administration Console on E2.

## Deploying the Edge Server from a WAR File

The installation program provides a WAR file in the EDGE_SERVER_HOME/war/rfidedge xx.war directory. To deploy the Edge Server WAR file, you need to perform the following procedure:

1. Install WebLogic Server
2. Run the WebLogic Server Configuration Wizard, choosing all of the defaults and JRockit
3. Create the folder applications/EdgeserverRoot under the /user_projects folder
4. Copy the WAR file (EDGE_SERVER_HOME/war/rfidedge xx.war) to the /user_projects/applications/EdgeserverRoot directory.
5. Unpack the WAR file: jar -xvf rfidedge xx.war
6. Rename and copy the license.bea file to the BEA_HOME directory
7. Run the UpdateLicense.cmd file to append the Edge Server license to the existing WebLogic Server license.
8. Start WebLogic Server (the default instance in the user_projects/domain that you created)
9. Start the WebLogic Server Administration Console
10. Select Deployments
11. Select the drive and directory that the WAR file was extracted. (wrfidinstalls/WLSbea/user_projects/applications/EdgeserverRoot)
12. Install this deployment as an application.
13. Start the EDGESERVER deployment, selecting Servicing All Requests.

## What's Next: Configuring the RFID Edge Server

You can now configure your RFID Edge Server; see Configuring WebLogic RFID Edge Server.