Running the HelloWorld Sample

You can begin to explore TIBCO Enterprise Administrator SDK by running the Hello world sample.

Prerequisites

Ensure that
  • JRE 1.7 (or later) and Apache Ant 1.7 (or later) are installed
  • The jar files that implement the TEA agent library are installed
  • TIBCO Enterprise Administrator server is running, and your browser can connect to it

Procedure

  1. In a command shell, navigate to <TIBCO_HOME>/tea/tea_version/samples/helloworld.
  2. Run ant.
    The default ant target compiles and runs the sample program.
  3. Register the HelloWorld agent with the TIBCO Enterprise Administrator server.
    1. In a web browser, navigate to the server home page.
    2. In the Settings pane, click the Agents icon.
    3. Click the Register new button.
    4. Enter a name for the agent; for example, HelloWorld Agent.
    5. Enter the URL where the agent accepts requests from the TIBCO Enterprise Administrator server: http://localhost:1234/helloworldagent
    6. Enter a description string for the sample agent; for example, My sample HelloWorld agent.
    7. Click the Register button to complete registration.
  4. Test the HelloWorld agent.
    1. In the TIBCO Enterprise Administrator server GUI, navigate to the home page.
    2. In the Products pane, click the HelloWorldTopLevelType icon.
      This action navigates to the HelloWorld product page.
    3. Click the hw button, which invokes the agent's only operation.
    4. In the dialog, select Hello World Agent as the operation target.
    5. Enter a string in the greetings field.
    6. Click the hw button to complete the operation.
      The agent outputs a greeting in the alert box.
    7. Click the Dismiss button to close the alert box.

What to do next

To learn more about the sample code, see The HelloWorld Sample: Lessons for Agent Developers.