Profiles and scripting

Scripting provides the capability to customize the environment in which scripts run by using the profile script. One can specify a profile in the following ways:

  • Specify the -profile command option with wsadmin. One can specify more than one profile with the use of the multiple -profile option. The profile is invoked in the order given. An example on the Windows system follows:

    wsadmin -profile c:\myprofile1.jacl -profile c:\myprofile2.jacl
    
    myprofile1.jacl is run before myprofile2.jacl

  • Specify the profile scripts using the com.ibm.ws.scripting.profiles property in the properties file. One can specify multiple profiles by separating each profile script with a ; . The profiles are invoked in the order given. An example of this property in the Windows system follows:

    com.ibm.ws.scriptng.profiles=c:/myprofile1.jacl;c:/myprofile2.jacl
    

If profile is set in both the -profile option and as a property in the properties file, the profiles listed in the property file are invoked before the profiles in the command option.

If profile is specified, the profile is run when the scripting process starts. Any command specified with the -c command option and script file specified with the -f command option runs after the profiles are executed. In this way, the command and script file can use anything set up by the profiles. If the scripting process brings up an interactive session, then any procedures and variables defined in the profiles are available to the interactive session.


 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.