Changing the location of the wstemp temporary workspace directory

Configuration changes are stored in the wstemp temporary workspace directory until the changes are merged with the master configuration repository. This topic discusses how to change the location of the wstemp temporary workspace directory.

Before you begin

You must first install WebSphere® Application Server before you change the location of the wstemp directory, which is a temporary workspace directory.

About this task

Whenever a user logs into the administrative console, or uses wsadmin scripting to make a configuration change, the changes are stored in the workspace. When a user uses the ConfigService configuration service interface of the Java™ application programming interfaces (APIs), the user specifies a session object that is associated with the workspace in order to store the changes. Only when the user performs a save operation under the administrative console, wsadmin scripting, or the Java APIs are the changes propagated and merged with the master configuration repository. For each administrative console user or each invocation of wsadmin scripting, the application server creates a separate workspace directory to store the intermediate changes until the changes are merged with the master configuration repository. Users of the Java APIs use different session objects to decide where the workspace directory resides. Both the administrative console and wsadmin scripting generate user IDs randomly. The user IDs are different from the user IDs that you use to log into the administrative console or wsadmin scripting. The Java APIs can either randomly generate the user ID or specify the user ID as an option when creating the session object.

You might want to change the location of the wstemp directory if you want to keep it in a separate place from the product installation.

The product determines the location of the workspace in the following order by using the first Java virtual machine (JVM) property in the list that is set. If no JVM property is set, the product uses the default workspace location.
Table 1. Workspace locations of JVM system properties . The Location column states the wstemp directory location for specified JVM system properties.
JVM system property Location Comments
websphere.workspace.root The wstemp directory location is the value of the websphere.workspace.root JVM system property plus
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]/wstemp
  • [Windows]\wstemp
For example, the websphere.workspace.root JVM system property and its value could be
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]
    -Dwebsphere.workspace.root
    =/temp
  • [Windows]
    -Dwebsphere.workspace.root
    =c:\temp
The property and its value are split on multiple lines for printing purposes.

Set the JVM system property for the deployment manager to change the wstemp directory location. Use the full path rather than a relative path for this property.

If the websphere.workspace.root property is not set, the value of the user.install.root property is used. The default wstemp location is the value of the user.install.root JVM system property plus
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]/wstemp
  • [Windows]\wstemp
Do not change the user.install.root property as the profile creation process sets this property by pointing to the profile_root directory. In this case, the wstemp location is:
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]profile_root/wstemp
  • [Windows]profile_root\wstemp

Procedure

  • Change the workspace location for a particular JVM property by setting the -D option on the java command.

    This method of changing the workspace location is only needed when you run a stand-alone administrative program in local mode.

    For example, use the following option:

    -Dwebsphere.workspace.root=the location of the new workspace directory
  • Change the JVM custom property through the administrative console by setting the JVM property as a name-value pair on the Custom properties page.
    For example,
    1. [AIX Solaris HP-UX Linux Windows][IBM i]Click System Administration > Deployment manager > Java and Process Management > Process definition > Java Virtual Machine > Custom properties.

      [z/OS]Click Servers > Server Types > WebSphere application servers > server_name > Java and Process Management > Process definition > Java Virtual Machine > Custom properties.

    2. Click New.
    3. Specify websphere.workspace.root as the name.

    4. Specify the full path of the new workspace directory as the value. The wstemp directory is created under that path.

    5. Stop the server.

      This step is optional if you want to keep your existing workspace files.

    6. Copy files from the old location of the workspace directory to the new location of the workspace directory.

      This step is optional if you want to keep your existing workspace files.

    7. Start the server.

      This step is optional if you want to keep your existing workspace files.

Results

You have used either the administrative console or the -D option on the java command to change the location of the wstemp temporary workspace directory.