Sun Java System Access Manager Policy Agent 2.2 Guide for BEA WebLogic Server 9.0/9.1

Configuring BEA WebLogic Server 9.0/9.1 Instance With Agent Classpath and Agent Java Options

During installation, the installer creates a script in domain-directory named as follows:

UNIX Platforms

setAgentEnv_server-instance.sh
Windows Platforms

setAgentEnv_server-instance.cmd
domain-directory

represents the domain name associated with your BEA WebLogic Server 9.0/9.1 instance. The following is the default full path name for the domain-directory:

/usr/local/bea/user_projects/domains/mydomain
server-instance

represents the BEA WebLogic Server 9.0/9.1 instance name entered during installation. For example Server1 or Server2.

This script is associated with Agent for BEA WebLogic Server 9.0/9.1 and is used to set up the environment for the agent. This script sets the classpath and java options for the agent. Administrators are responsible for calling the same script from their startup scripts. If the script is included correctly, the agent related classpath is appended to the WebLogic classpath. This script is required for the following task.

ProcedureTo Configure BEA WebLogic Server 9.0/9.1 Instance With Agent Classpath and Agent Java Options


Note –

This step is required. Agent for BEA WebLogic Server 9.0/9.1 will not work if the agent startup script is added incorrectly to the WebLogic startup script. If the agent startup script does not get invoked appropriately from the WebLogic startup script, BEA WebLogic Server 9.0/9.1 will not function appropriately after the Agent Authenticator is set.


    Add the environment script in the following file to the BEA WebLogic Server 9.0/9.1 instance start up script:


    Note –

    Throughout this guide scripting files apply to both UNIX platforms and Windows platforms even when the script for Windows platforms is not expressly mentioned. The difference is that scripts for UNIX platforms have the .sh extension while scripts for Windows platforms have the .cmd extension.



    setAgentEnv_server-instance.sh

    This environment script is called during the server's start up sequence.

    1. Locate the following line in the startup script:

      . ${WL_HOME}/common/bin/commEnv.sh
    2. Determine which line in the following list is appropriate for your requirements and add that line immediately after the line you located in the previous substep.

      As the following list indicates, when adding the agent environment variable script, you have the choice of specifying the fully qualified path or a relative path to this script. The list that follows includes some use cases of how to add this script for UNIX platforms and Windows platforms.

      • UNIX Platforms (fully qualified path)


        fully-qualified-path/setAgentEnv_server-instance.sh

        For this scenario, the following is a conceivable line if server-instance is named server1 and the domain directory is named mydomain:


        /usr/local/bea/user_projects/domains/mydomain/setAgentEnv_server1.sh

        Therefore, in this scenario, the start up script would then, amongst other lines, contain these two lines as shown:

        . ${WL_HOME}/common/bin/commEnv.sh
        /usr/local/bea/user_projects/domains/mydomain/setAgentEnv_server1.sh
      • Windows Platforms (fully qualified path)


        call "fully-qualified-path/setAgentEnv_server-instance.cmd"

        For this scenario, the following is a conceivable line if server-instance is named server1 and the domain directory is named mydomain:


        call "/usr/local/bea/user_projects/domains/mydomain/setAgentEnv_server1.cmd"

        Therefore, in this scenario, the start up script would then contain, amongst other lines, these two lines as shown:

        . ${WL_HOME}/common/bin/commEnv.sh
        call "/usr/local/bea/user_projects/domains/mydomain/setAgentEnv_server1.cmd"
      • UNIX Platforms (relative path)


        ../setAgentEnv_server-instance.sh

        For this scenario, the following is a conceivable line if server-instance is named server1:

        ../setAgentEnv_server1.sh

        Therefore, in this scenario, the start up script would then, amongst other lines, contain these two lines as shown:

        . ${WL_HOME}/common/bin/commEnv.sh
        ../setAgentEnv_server1.sh
      • Windows Platforms (relative path)


        call "./setAgentEnv_server-instance.cmd"

        For this scenario, the following is a conceivable line if server-instance is named server1:


        call "./setAgentEnv_server1.cmd"

        Therefore, in this scenario, the start up script would then, amongst other lines, contain these two lines as shown:

        . ${WL_HOME}/common/bin/commEnv.sh
        call "./setAgentEnv_server1.cmd"

      The following are descriptions for variable names used in this step:

      server-instance

      represents the BEA WebLogic Server 9.0/9.1 instance name entered during installation. For example Server1 or Server2.

      fully-qualified-path

      represents the fully qualified path to the following agent script:


      /setAgentEnv_server-instance.cmd"

    Note –

    A safe practice is to cut and paste agent classpath and agent java option entries from the setAgentEnv_managed_server_name.sh file to avoid any misconfiguration due to typographical errors.