Hitachi

Hitachi Application Server V10 User's Guide (For Windows® Systems)


4.6.2 Setting up Application Server

To set up Application Server, you must set up the performance tracer by using the create-prf subcommand of asadmin utility command, the Java EE server by using the create-cluster and create-instance subcommands, and the web server by using the create-webserver subcommand. You must also set up the dependency relations by using the create-relation subcommand.

Prerequisites

Intended users

Procedure

  1. To set up the performance tracer, run the create-prf subcommand of the asadmin utility command.

    asadmin create-prf --node node_name performance_tracer_name

    When this command is run, the result is displayed as follows:

    Command create-prf executed successfully.
  2. To display a list of performance tracers, run the list-prfs subcommand of the asadmin utility command.

    asadmin list-prfs

    Verify whether the name of the performance tracer that was configured in step 1 is displayed in the list.

    performance_tracer_name not running
    Command list-prfs executed successfully.
  3. For cluster configurations that contain multiple Java EE servers, to set up a cluster that groups the Java EE server, run the create-cluster subcommand of the asadmin utility command.

    asadmin create-cluster cluster_name

    When this command is run, the result is displayed as follows:

    Command create-cluster executed successfully.
  4. To set up the Java EE server (server instance), run the create-instance subcommand of the asadmin utility command.

    asadmin create-instance --node node_name --prf performance_tracer_name 
    --cluster cluster_name server_instance_name
    • For performance_tracer_name, specify the name of the performance tracer that was configured in step 1.

    • In a cluster configuration where more than one Java EE server is deployed, specify the cluster name that was configured in step 3 for the --cluster option.

    • By specifying the --prf option, a dependency relation between the server instance and the performance tracer is created (the relation type: prf-relation).

    When this command is run, the result is displayed as follows:

    Command create-instance executed successfully.
  5. To display a list of Java EE servers, run the list-instances subcommand of the asadmin utility command with the --long option.

    asadmin list-instances --long=true

    When this command is run, the result is displayed as follows. Verify whether the name of the server instance that was configured in step 4 is displayed.

    server_instance_name host_name port_number process_ID cluster_name not running
    Command list-instances executed successfully.
    
    • cluster_name is displayed only in a cluster configuration where more than one Java EE server is deployed.

  6. To set up the web server, run the create-webserver subcommand of the asadmin utility command.

    asadmin create-webserver --node node_name 
    --prf performance_tracer_name web_server_name
    • For performance_tracer_name, specify the name of performance tracer that was specified in step 1.

    • By specifying the --prf option, a dependency relation between the web server and the performance tracer is created (the relation type: prf-relation).

    When this command is run, the result is displayed as follows:

    Command create-webserver executed successfully.
  7. To display the list of web servers, run the list-webservers subcommand of the asadmin utility command.

    asadmin list-webservers

    When this command is run, the result is displayed as mentioned below. Verify whether the name of the web server that was specified in step 6 is displayed.

    web_server_name not running
    Command list-webservers executed successfully.
  8. To associate the Java EE server (server instance) that is used as the redirection destination for the request that is received by the web server, run the create-relation subcommand of the asadmin utility command.

    asadmin create-relation --relationtype redirect 
    --from web_server_name --to server_instance_name 
    [--properties property_name_of_dependency_relation=value 
    [:property_name_of_dependency_relation=value]...]
    dependency_relation_name
    • For web_server_name, specify the name of the web server that was specified in step 6.

    • For server_instance_name, specify the server instance that was specified in step 4.

    • When setting up the relation for redirection, specify path and network-listener for the --properties option to process static content by the web server, and process requests other than static content by the Java EE server.

      Example:

      path=/apserver/:network-listener=http-listener-1

      For path, specify the URL path, starting with a slash (/). Do not specify a slash only (path=/). In this example, a request that does not contain apserver as the first part of the file path in the URL following the domain name (for example, http://xxxxxxxxxxx/index.html) is accessed as static content of a web server. A request containing apserver as the first part of the file path in the URL following the domain name (for example, http://xxxxxxxxxxx/apserver/sample/index.jsp) is redirected to the Java EE server. In this case, the request is redirected to the URL http://yyyyyyyyyyy/sample/index.jsp on the Java EE server.

      For network-listener, specify a network listener name that indicates the HTTP listener or HTTPS listener of the redirection-target Java EE server. On the Java EE server, the following network listeners are defined by default: the HTTP listener http-listener-1, and the HTTPS listener http-listener-2.

    When this command is run, the result is displayed as follows:

    Command create-relation executed successfully.
  9. To display a list of dependency relations, run the list-relations subcommand of the asadmin utility command.

    asadmin list-relations

    When this command is run, the result is displayed as follows. Verify whether the following dependency relations are displayed.

    • Performance tracer relation between the server instance and performance tracer

    • Performance tracer relation between the web server and the performance tracer

    • Redirect relation between web server and server instance that was set in step 8.

    dependency_relation_name prf-relation server_instance_name 
    performance_tracer_name
    dependency_relation_name prf-relation web_server_name 
    performance_tracer_name
    dependency_relation_name redirect web_server_name 
    server_instance_name
    Command list-relations executed successfully.