SQL_GETJSMHANDLE

This is an advanced activity in the SQL database activities suite that can retrieve the JSM session handle corresponding to an active SQL connection handle.

Normal usage of the SQL database activities will not require this value.  This activity is provided for use in custom solutions, possibly using a custom activity that wish to perform highly-customized SQL processing using the LANSA Integrator SQLService connection opened by the SQL_CONNECT activity.  This permits even a highly custom solution to take advantage of the SQL_CONNECT activity and its use of LANSA Composer's Database Configurations.  The custom solution might perform a sequence of activities something like this:

1.  Connect to the database using SQL_CONNECT along with an existing Database Configuration, specifying NO for the RESTARTELIGIBLE parameter.

2.  Retrieve the JSM session handle for the database connection using the SQL_GETJSMHANDLE (this) activity.

3.  Perform custom processing in a custom activity using the SQLService JSM session handle,

4.  Disconnect using SQL_DISCONNECT.

NOTE: A LANSA Composer solution using the SQL_GETJSMHANDLE activity cannot be successfully restarted while the returned JSM session handle is in use.  The JSM session handle value will no longer be valid following a Processing Sequence restart.  You should specify NO for the RESTARTELIGIBLE parameter of the SQL_CONNECT activity when the connection is used with this activity.

For more information about the SQL database activities, refer to the description of the SQL_CONNECT activity.  For a list of supplied working (*) examples using the SQL database activities, refer to:

Example Processing Sequences using the SQL database activities

INPUT Parameters:

SQLHANDLE: Required

This parameter must specify the connection handle value that identifies the SQL connection upon which this activity should operate.  The connection handle value is returned by the SQL_CONNECT activity.

OUTPUT Parameters:

JSMHANDLE:

If successful, this output parameter contains the JSM session handle corresponding to the SQL connecton handle specified.