Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
interoperability, a call by reference in Java that passes a reference data type such as an array becomes a pass by value in the .NET proxy, creating a corresponding type in the .NET proxy. While this has performance benefit because pass by reference results in a chatty interface requiring a round trip to the Java side for each access to the array element, it could result in unexpected behaviors. You should be fully aware when you are assigning values to the proxy array, and when passing the proxy array by reference. Note: The details of how call by value or reference is handled and what the solution implementer must do depends to a large extent on the approach and product you choose for class level interoperability. Consult the product documentation for more detail. 5.2.3 Callbacks .NET supports callbacks through the use of delegates and events. Delegates are commonly defined as Type Safe Pointers. A delegate hold references to functions that can be defined and used at runtime. Java classes can participate in .NET callback functionality. The implementation and registration of Java classes as delegates and event handlers in Java to .NET interoperability will depend on the approach and product you choose for class level interoperability. Note: A full discussion on delegates and events and the implementation in Java to .NET interoperability is beyond the scope of this redbook. Please refer to Microsoft .NET documentation for discussion on delegation and events and to the product documentation you are using for your solution to the implementation of delegates and events implementation in Java to .NET interoperability. 5.3 Control considerations To a large extent, the choice of control approach and the product of choice for implementing your solution depends on a number of factors. In this section, we will discuss these factors. We will also like to note that this section is not intended to be prescriptive, but it is intended to be indicative of considerations leading to solutions for different WebSphere and .NET component interoperability scenarios. Chapter 5. Designing component interoperability 179