Note: In order to use the classes in this package the caller's address space must be permitted to the BPX.WLMSERVER Facility class if it is defined. If BPX.WLMSERVER is not defined, the calling process must be defined as a superuser (UID=0).
Note: WLM currently only allows one WorkloadManager instance per Java Virtual Machine.
It is the user's responsibility to manage the lifecycle of the WorkloadManager and to
disconnect()
in order to release native system resources.
Uses JNI wrappers to the following C Library APIs:
- ConnectWorkMgr
- DisconnectServer
For additional information, see:
- Since:
- 2.3.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWorkloadManager
(String subSystemType, String subSystemName) Connect to WLM as a work manager to perform Workload Manager work manager functions. -
Method Summary
Modifier and TypeMethodDescriptionCreate (and store for later deletion) a ServerClassification.void
Destroy a ServerClassification that was previously created/associated to this WorkloadManager.void
Disconnect the server from WLM.int
-
Constructor Details
-
WorkloadManager
Connect to WLM as a work manager to perform Workload Manager work manager functions.- Parameters:
subSystemType
- a string containing the generic subsystem type (CICS, IMS, WEB, etc.). This is the primary category under which WLM classification rules are grouped. The string can be up to 4 bytes in length.subSystemName
- a string containing the subsystem name used for classifying work requests. The character string can be up to 8 bytes in length.- Throws:
ErrnoException
SecurityException
- if a a SecurityManager is active and the user doesn't have access to JzosPermission("WorkloadManager")
-
-
Method Details
-
disconnect
Disconnect the server from WLM.Destroy and remove any ServerClassifications held in the manager's cache. This method has no effect if the WorkloadManager is already disconnected.
- Throws:
ErrnoException
-
createServerClassification
Create (and store for later deletion) a ServerClassification.The returned instance can be used when creating a WorkUnit
WorkUnit(ServerClassification, String)
. All ServerClassifications created via this method will be destroyed whendisconnect()
is called.- Returns:
- the ServerClassification
- Throws:
ErrnoException
IllegalStateException
- if this WorkLoadManager is no longer connected.
-
destroyServerClassification
Destroy a ServerClassification that was previously created/associated to this WorkloadManager.This destroys and deallocates the native storage associated with a ServerClassification using the C-Library __server_classifyDestroy() function.
- Parameters:
sc
- the ServerClassification to remove and destroy- Throws:
IllegalStateException
- if the given ServerClassification is not foundErrnoException
-
getConnToken
public int getConnToken()- Returns:
- the connection token. Returns 0 if not connected.
- Throws:
IllegalStateException
- if the WorkloadManager is not connected
-