ORB::work_pending

Overview The work_pending() method is used in a server application to determine if any outstanding requests need to be processed.
Original class CORBA::ORB
Exceptions CORBA::SystemException
 


Intended Usage

The work_pending() method is intended to be used by server applications in situations where you cannot use an infinite request-processing loop. The method will return an indication as to whether any outstanding requests need to be processed by the server. This method would be useful in a single-threaded server where you need to use a polling-type approach for processing requests.

Syntax

CORBA::Boolean work_pending();

Return values

TRUE
if one or more outstanding requests need to be processed
FALSE
if no requests are waiting to be processed.

Example

#include <corba.h>

// Assume "op" points to the ORB object.

...

int done = 0;

// Enter the polling loop.
while ( !done )
{
    // Check to see if any requests are pending.
    if ( op->work_pending() )
       op->perform_work();

    // Do other stuff in the polling loop.
    ...
}

Related reference
CORBA module



Searchable topic ID:   rcor_modo34
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modo34.html

Library | Support | Terms of Use | Feedback