Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Accessing External Routines : Overview

Overview
Functional Overview
How Does TIBCO Object Service Broker Process an External Routine?
From TIBCO Object Service Broker you can pass control to and receive control back from a routine outside TIBCO Object Service Broker operating boundaries. When an external routine is called, the following takes place:
1.
2.
The link to the external routine remains until the session ends.
What Languages are Supported?
TIBCO Object Service Broker for Open Systems supports external routines in C and Java.
C
For routines in C, the following conditions must be met:
The C compiler must be able to produce:
Java
Java routines must be static Java methods.
Even though TIBCO Object Service Broker allows only static methods as external routines, non-static methods of a particular target class can be invoked indirectly, as shown here:
1.
The mapping should be maintained in a static data structure within that class.
2.
Have the mapping class implement a static method (a class factory) that creates instances of the target class and returns a handle to the instance while adding, to the internal data structure, the mapping from the handle to the instance.
This class factory method can be called by a TIBCO Object Service Broker application to create instances of the target class.
3.
For each instance method of the target class that you want to invoke from the TIBCO Object Service Broker application, have the mapping class implement an intermediate static method. This method takes a target class instance handle and arguments corresponding to the arguments of the instance method to be invoked.
4.
The intermediate method should resolve the handle into a class instance reference and call the instance method, passing the required arguments to it.
The mapping class methods should also check handles for validity and possibly implement further (static) methods. These methods are then available for a TIBCO Object Service Broker application to manage the life cycle of the target class instances.
Syntax for Calling the Routine
The external routine can be invoked from within a rule either as a function or explicitly with the CALL statement as in the following examples:
Process Flow
The following shows the process flow between TIBCO Object Service Broker and an external routine.
See Also
TIBCO Object Service Broker Programming in Rules for information about coding rules and the rules language

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved