+

Search Tips   |   Advanced Search

Change 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 page discusses how to change the location of the wstemp temporary workspace directory. You must first install WAS before you change the location of the wstemp directory, which is a temporary workspace directory.

Whenever a user logs into the admin 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 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 admin console, wsadmin scripting, or the Java APIs are the changes propagated and merged with the master configuration repository. For each admin console user or each invocation of wsadmin scripting, the appserver 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 admin console and wsadmin scripting generate user IDs randomly. The user IDs are different from the user IDs that you use to log into the admin 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 to keep it in a separate place from WAS installation. WAS ND v7.0 determines the location of the workspace in the following order by using the first JVM property in the list that is set. If no JVM property is set, WAS uses the default workspace location.


Table 1. Workspace locations of 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) [HP-UX] [Solaris]

    [AIX] /wstemp

  • (Windows) \wstemp

For example, the websphere.workspace.root JVM system property and its value could be

  • (Linux) [HP-UX] [Solaris]

    [AIX]

    -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 dmgr 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) [HP-UX] [Solaris]

    [AIX] /wstemp

  • (Windows) \wstemp

Do not change the user.install.root property as the profile creation process sets this property by pointing to the $WP_PROFILE directory. In this case, the wstemp location is:

  • (Linux) [HP-UX] [Solaris]

    [AIX] $WP_PROFILE/wstemp

  • (Windows) $WP_PROFILE\wstemp

 

 

Results

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

 

Related tasks

Working with server configuration files