Asynchronous Components

Earlier, you saw how to build a J# client application that accesses the FourthCoffee components hosted within COM+. The components themselves were written in Visual Basic and supported queued method execution and loosely coupled events. Next, we’ll look at how to provide the same functionality using serviced components.

Creating a Queued Component

The Oven class (in the file Oven.jsl in the Oven project) models an oven for baking cakes. Before you place a cake in the oven, you must set the oven to the correct temperature and wait for the oven to reach that temperature. The Oven class implements the IQueuedOven interface, which defines the SetTemperature method. This method takes a temperature as a parameter and sets the oven ...

Get Microsoft® Visual J#™ .NET (Core Reference) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.