[IBM i]

enbprfwas command

The enbprfwas command enables a profile to allow an application server to run under it and optionally changes the group profile to QEJBSVR.

It is an alternative to using iSeries Navigator to do the same thing. To run this script, your user profile must have *ALLOBJ authority.

Syntax

The command syntax is as follows:
enbprfwas -profile <user profile> [-chggrpprf]

Parameters

The following options are available for the enbprfwas command:

-profile
This is a required parameter. The value <user profile> specifies the name of the profile that you want to enable to run application servers.
-chggrpprf
This is an optional parameter. If you specify this parameter, the command changes the group profile of <user profile> to QEJBSVR.
Best practice: If the application server uses IBM Technology for Java Java Virtual Machine (JVM), you will need to execute few more commands to take advantage of the -Xshareclasses JVM option, which will reduce virtual memory footprint and improve the application server's startup time. To determine if the Application server uses IBM Technology for Java:
  1. Examine the profile_root/properties/.instance.properties file.
  2. If the value for the instance.use.j9 property is set to true, then the application server uses the IBM Technology for Java JVM.
Select either one of the following methods to optimize the application server to use the -Xshareclasses JVM option:
  • Using the administrative console:
    1. In the administrative console, click Servers > Server Types > WebSphere application servers > server.
    2. Under Server Infrastructure, click Java and Process Management > Process Definition.
    3. Select Java Virtual Machine.
    4. In the Generic JVM arguments field, add a space at the end of the string, and add the following string:
      -Xshareclasses:name=webspherev80_profile_name,groupAccess,nonFatal
      where profile_name is the run-as user profile that is described for profile parameter, click OK.
    5. Click OK.
    6. Click Save on the console task bar.
    7. Restart the application server.
  • Using the wsadmin command:
    1. Start the Qshell environment.
    2. On the IBM i CL command line, run the STRQSH command and then execute the following commands:
      cd app_server_root/bin 
      wsadmin -conntype NONE -profileName was_profile
         # where was_profile is the profile of the application server. 
      set jvm [$AdminConfig getid /Server:server_name/JavaProcessDef:/JavaVirtualMachine:/] 
         # where server_name, is the application server name.
      set curargs [$AdminConfig showAttribute $jvm genericJvmArguments] 
      set newargs [concat $curargs "-Xshareclasses:name=webspherev80_profile_name,groupAccess,nonFatal"]
         # where profile_name is the run-as user profile. 
      set attrs [subst {{genericJvmArguments $newargs}}] 
      $AdminConfig modify $jvm $attrs 
      $AdminConfig save
      exit
    3. Restart the application server.