Hitachi

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


9.2.4 Changing the environment variable to be applied to the process of the asadmin utility command

To change the environment variable to be applied to the process of the asadmin utility command, edit the environment definition file of the Java EE server (asenv.bat). For the environment variable to be applied to the process of the asadmin utility command, specify values for Java memory, such as the Java heap; the log for the asadmin utility command; and other information. For example, if many applications are deployed or many files are included in applications, and a memory shortage thereby occurs when the Java EE server starts, change the size of the Java heap to be applied to the process of the asadmin utility command.

Prerequisites

Intended users

Procedure

  1. If you are using a hardware load balancer, then block it.

    For more information about blocking, refer to the hardware load balancer manual.

    If the performance tracer, server instance, and web server are not stopped, go to step 2.

    If the performance tracer, server instance, and web server are already stopped, omit steps 1 to 5.

  2. To stop all performance tracers, server instances, and web servers at the same time, execute the stop-servers subcommand of the asadmin utility command.

    asadmin stop-servers

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

    Command stop-servers executed successfully.
  3. To display a list of performance tracers, run the list-prfs subcommand of the asadmin utility command.

    asadmin list-prfs

    When this command is run, the result is displayed as follows. Ensure that the statuses of the performance tracers are not running.

    performance_tracer_name not running
    Command list-prfs executed successfully.
  4. To display a list of server instances, run the list-instances subcommand of the asadmin utility command with the --long option specified.

    asadmin list-instances --long=true

    When this command is run, the result is displayed as follows. Ensure that the statuses of the server instances are not running.

    server_instance_name host_name port_number process_ID cluster_name not running
    Command list-instances executed successfully.
    
    • cluster_name is displayed only for cluster configurations that contain multiple Java EE servers.

  5. To display a 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 follows. Ensure that the statuses of the web servers are not running.

    web_server_name not running
    Command list-webservers executed successfully.
  6. Edit the environment variable definition file of Java EE Server (asenv.bat), and change the environment variable to be applied to the process of the asadmin utility command.

    Change the environment variable for the remote host and the localhost in a cluster configuration that contains more than one Java EE server.

    Environment variable definition file of Java EE Server

    installation_directory_for_Application_Server/javaee/glassfish/config/asenv.bat

    Example edits

    If you want to change the maximum size of the Java heap, set a value for the environment variable HJES_ASADMIN_JVM_OPTIONS.

    set HJES_ASADMIN_JVM_OPTIONS=-Xmx256m

    If you are finished making changes, go to step 7.

    If you want to change the following environment definitions, define each environment setting without starting the servers that configure Application Server.

    • Application Server settings

    • Web server settings

    • Java VM options

  7. To start Application Server at once, run the start-servers subcommand of the asadmin utility command.

    asadmin start-servers

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

    Command start-servers executed successfully.
  8. To display a list of performance tracers, run the list-prfs subcommand of the asadmin utility command.

    asadmin list-prfs

    When this command is run, the result is displayed as follows. Ensure that the statuses of the performance tracers are running.

    performance_tracer_name running
    Command list-prfs executed successfully.
  9. To display a list of server instances, run the list-instances subcommand of the asadmin utility command with the --long option specified.

    asadmin list-instances --long=true

    When this command is run, the result is displayed as follows. Ensure that the statuses of the server instances are running.

    server_instance_name host_name port_number process_ID cluster_name running
    Command list-instances executed successfully.
    
    • cluster_name is displayed only for cluster configurations that contain multiple Java EE servers.

  10. To display a 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 follows. Ensure that the statuses of the web servers are running.

    web_server_name   running
    Command list-webservers executed successfully.
  11. If you are using a hardware load balancer, unblock it.

    For more information about unblocking, refer to the hardware load balancer manual.