10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

How You Can Communicate Between OpenROAD Applications Using Database EventsDBEventObjectWhen an application receives a database event from the DBMS and places it onthe native event queue, it also initializes a DBEventObject for each frame thatis registered to receive the database event. The attributes of theDBEventObject contain the following information:CurFrame.DBEvent.DBEventNameContains the event's nameCurFrame.DBEvent.DBEventOwnerContains the name of the event's ownerCurFrame.DBEvent.DBEventDatabaseContains the database in which the event is storedCurFrame.DBEvent.DBEventTimeContains the date and time when the event was raisedCurFrame.DBEvent.DBEventTextContains the text specified when the event was raised, if anyIn the frame that receives the event, the values in the DBEventObject are onlyaccessible in the event block that the frame executes for the event. In thisblock, you use the CurFrame variable to reference the event's DBEventObject.How Database Events Work with Multiple SessionsWhen the DBMS receives the event from a sending application, it checks to seewhich applications are registered for that event and sends the event to thoseapplications. Because the DBMS perceives each database session in anapplication as a separate application, a multiple-session application receives adatabase event from the DBMS in the same session in which the registerdbevent statement for that event was issued. The application receives alldatabase events for which it registered in any currently open session even ifthe application is not currently working in the session.When the application receives a database event, OpenROAD ultimatelydispatches it to the frame or frames that are registered to receive that event.When the event reaches the top of the frame's event queue, OpenROADprocesses it. To execute the event block for the event, the frame must beworking at this time in the session in which the event was registered. If theframe is working in a different session when the event reaches the top of theframe's event queue, OpenROAD discards the event.358 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!