BOA::execute_next_request

Overview Executes the next pending remote request in a server application.
Original class CORBA module: BOA Class
Exceptions CORBA::SystemException


Intended Usage

This method is intended to used by a server application to execute the next remote request received from a remote client, and send the response to the waiting client. Both blocking and non-blocking calls are supported. Requests are executed in first-in-first-out order only. This method should be called only after CORBA::BOA::impl_is_ready has been called successfully.

This method is an IBM extension to the CORBA specification.

Syntax

  virtual CORBA::Status execute_next_request (CORBA::Flags waitFlag);

Input parameters

waitFlag
Used to indicate whether the application wants to wait (block) if there is no request currently available to process. Valid values are CORBA::BOA::SOMD_WAIT and CORBA::BOA::SOMD_NO_WAIT.

Return values

CORBA::Status
A zero return value indicates success. If the input parameter is CORBA::BOA::SOMD_NO_WAIT, a return value of SOMDERROR_NoMessages indicates that there is no available request to service.

Example

  #include "corba.h"
  void main(int argc, char* argv[])
  {
    /* Initialize the server's ImplementationDef, ORB, and BOA: */
    CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository;
    /* Assume dummyServer is already registered in
       the implementation repository */
    CORBA::ImplementationDef_ptr imp =
              implrep->find_impldef_by_alias ("dummyServer");
    extern static CORBA::ORB_ptr op; /* assume previously initialized */
    extern static CORBA::BOA_ptr bp; /* assume previously initialized */
    bp->impl_is_ready(imp);
    ...
    /* Execute the next pending remote request */
    while(1)
    bp->execute_next_request(CORBA::BOA::SOMD_WAIT);
    ...
  }
  #include "corba.h"
  void main(int argc, char* argv[])
  {
    /* Initialize the server's ImplementationDef, ORB, and BOA: */
    CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository;
    /* Assume dummyServer is already registered in
       the implementation repository */
    CORBA::ImplementationDef_ptr imp =
              implrep->find_impldef_by_alias ("dummyServer");
    static CORBA::ORB_ptr op = CORBA::ORB_init(argc, argv, "DSOM");
    static CORBA::BOA_ptr bp = op->BOA_init(argc, argv, "DSOM_BOA");
    bp->impl_is_ready(imp);
    ...
    /* Execute the next pending remote request */
    while(1)
    bp->execute_next_request(CORBA::BOA::SOMD_WAIT);
    ...
  }

Related reference
CORBA module



Searchable topic ID:   rcor_modbo6
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_modbo6.html

Library | Support | Terms of Use | Feedback