Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Order Dependencies

When you are constructing programs, there is a calling order for the MTA SDK routines that must be observed; for a given enqueue context, some routines must be called before others.

Figure 3–1 visually depicts the calling order dependency of the message enqueue routines. To the right of each routine name appears a horizontal line segment, possibly broken across a column, for example, mtaEnqueueWrite(). Routines for which two horizontal line segments, one atop the other, appear are required routines; that is, routines that must be called in order to successfully enqueue a message. These routines are mtaEnqueueStart(), mtaEnqueueTo(), and mtaEnqueueFinish(). To determine at which point a routine may be called, start in the leftmost column and work towards the rightmost column. Any routine whose line segment lies in the first (leftmost) column may be called first. Any routine whose line segment falls in the second column may next be called, after which any routine whose line segment falls in the third column may be called, and so forth. When more than one routine appears in the same column, any or all of those routines may be called in any order. Progression from left to right across the columns is mandated by the need to call the required routines. Of the required routines, only mtaEnqueueTo() may be called multiple times for a given message.

Figure 3–1 Calling order Dependency for Message Enqueue Routines

The calling order dependency for message enqueue routines. mtaInit,
mtaEnqueueStart, metEnqueueTo, and mtaEnqueueFinish are required.