# Plain Agent Use Case Example

# Establish the WLOC Runtime Environment

Now that we have installed and configured the Plain Agent and the Controller to establish the resource environment for this example, we need to start each of them and the Administration Console. This will establish the runtime environment needed to define the service to be managed.

The tasks in this topic include:

- Step 1: Start the Plain Agent
- Step 2: Start the Controller
- Step 3: Start the WLOC Administration Console

## Step 1: Start the Plain Agent

To start the Plain Agent:

1. Open a Command Prompt window.
2. Navigate to `\bin` of the directory in which we created the Plain Agent:

    C:\WLOC_UseCase\user_projects\PlainAgent\bin

3. Enter `startAgent` at the prompt.

As the Plain Agent starts, status messages are displayed in the Command Prompt window. After the start sequence is complete, the following information message is displayed in the window:

    <Aug 4, 2008 3:05:27 PM> <Info> <ServiceInspector> <All internal systems are now RUNNING.>

The Command Prompt window remains open while the Agent is running.

## Step 2: Start the Controller

To start the Controller:

1. Open a new Command Prompt window.
2. Navigate to `\bin` of the directory in which we created the Controller:

    C:\WLOC_UseCase\user_projects\controller\bin

3. Enter `startController` at the prompt.

As the Controller starts, status messages are displayed in the Command Prompt window. After the start sequence is complete and the Controller establishes the connection with the Plain Agent, information messages similar to the following are displayed in the window:

    <Aug 4, 2008 3:07:04 PM EDT> <Info> <ResourceBrokerCommon> <BEA-2012151> <Established connection with WLOC Agent running at http://localhost:8001.>
    <Aug 4, 2008 3:07:04 PM EDT> <Info> <ResourceBrokerPool> <BEA-2012203> <ResourceBroker agent with id plain-resource-pool - Registered>
    [AGENTS-HANDLING] : Getting the Observer service for : http://localhost:8001/AgentLumperObserver/Default
    [AGENTS-HANDLING] : ObserverService URL = http://localhost:8001/AgentLumperObserver/Default
    <Aug 4, 2008 3:07:07 PM> <Info> <ServiceInspector> <All internal systems are now RUNNING.>

The Command Prompt window remains open while the Controller is running.

## Step 3: Start the WLOC Administration Console

To start the WLOC Administration Console:

1. Open a Web Browser.
2. Enter the following URL:

    http://localhost:9001/wloc-console

Note: | Because we are running the Controller on the local machine, we can use `localhost`. If the Controller was installed on a remote machine, you need to specify the host name for the machine hosting the Controller.

3. In the Console Welcome window, enter the user name and password required to access the Controller. Because we accepted the defaults when we created the Controller, we enter the following values in this example:

In this field | Enter the following
--- | ---
Username | WLOCBootUser
Password | changeit

After logging in successfully, the Home page of the WLOC Administration Console is displayed.

Note that the Task and Event Viewer at the bottom of the Console indicates that the resource pool, named plain-resource-pool, that we defined when we created the Plain Agent was discovered.

## What’s Next?

After establishing the runtime environment, we need to define the service to be managed. For the steps in this process, go to Define the Service Under Management.