22.09.2013 Views

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

68 Chapter 3. How to Use <strong>SAF</strong> <strong>Subroutines</strong><br />

Object method:<br />

• SWEEP-SESSION<br />

This method is called when a session is timed out. It is used to per<strong>for</strong>m<br />

processing such as file closing and database (DB) commitment/rollback.<br />

Method argument:<br />

None<br />

Method return in<strong>for</strong>mation:<br />

None<br />

Note:<br />

• If a session is timed out, the <strong>SAF</strong> subroutine calls the SWEEP-SESSION method<br />

and assigns a NULL object to the object reference item which has been<br />

registered in the session data.<br />

• If the default SWEEP-SESSION method is not replaced by a user-written method,<br />

nothing is executed by the SWEEP-SESSION method.<br />

• The COBW3-SESSION-ADAPTER class inherits the FJBASE class.<br />

Example:<br />

[COBOL program]<br />

IDENTIFICATION DIVISION.<br />

CLASS-ID. SESSDATA INHERITS COBW3-SESSION-ADAPTER.<br />

:<br />

IDENTIFICATION DIVISION.<br />

OBJECT.<br />

:<br />

IDENTIFICATION DIVISION.<br />

METHOD-ID. SWEEP-SESSION OVERRIDE.<br />

DATA DIVISION.<br />

:<br />

PROCEDURE DIVISION.<br />

:<br />

* Write down timeout processing if necessary.<br />

:<br />

END METHOD SWEEP-SESSION<br />

:<br />

END OBJECT.<br />

END CLASS SESSDATA.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!