The following examples illustrate implementing LU support with both task beans and task files.
Task beans implement the ITask interface. The instance name is a property on com.attachmate.tasks.ITask. When a request comes in from a client, the following occurs:
To indicate to the run-time engine that the instance name refers to an LU name, the instance name must be formatted as follows:
LU.<LU name>[,free]
(IBM)-or->
ID.<ID name>[,free]
(Unisys)
Where <LU name> or <ID name> is the name of the LU or terminal or station ID that you want to use, and "free" is an optional parameter that tells the Runtime Service to destroy the session instead of returning it to the pool.
The following code snippet illustrates how the code for task beans might look:
ITask task = new MyTask(); . . . task.setInstanceName("LU." + clientToLuMapping.getProperty(clientName, defaultLU)); task.executeSync(); . . .
Where
Task files are XML task interface objects that implement the IConnectorAccess interface (com.attachmate.connectors.screen.ScreenConnectorAccessImpl). They work similarly to task beans, except that the instance name is specified in IConnectorAccess.open. The instance name is appended to the file specification or URL using the URL query syntax, as follows:
<task file>?instance=LU.<LU name>[,free]
(IBM)-or-
<task file>?instance=ID.<ID name>[,free]
(Unisys)
Where <task file> is the name of the task file to open and <LU name> or <ID name> is the name of the LU or terminal ID that you want to use. "Free" is an optional parameter that tells the Runtime Service to destroy the session instead of returning it to the pool.
The following code snippet illustrates how the code for ScreenConnectorAccessImpl might look:
IConnectorAccess conn = new ScreenConnectorAccessImpl(); . . . conn.open(taskFile + "?instance=LU." + clientToLuMapping.getProperty(clientName, defaultLU)); conn.execute(taskName, inputParameters); . . .
Where
![]() |
|
![]() |
Using Dedicated Sessions, Overview |
![]() |
Creating Session Pools for Dedicated LUs |
![]() |