Improved Context Activation Setting

As explained in Chapter 3, configuring your component to use JITA requires having its own context. COM+ 1.0 lets you configure your component to use JITA, and configure it to require that the component always must be activated in its creator’s context, by checking the checkbox “Must be activated in caller’s context” on the component’s Activation tab. (As discussed in Chapter 3, this name is inaccurate and should read “Must be activated in creator’s context.”) These two settings are mutually exclusive. If you configure a component in this way, all activations fail. You face a similar pitfall when configuring the component to use transactions or enforce security access checks for the component—all require a private context. The COM+ 1.5 Explorer remedies this situation by redesigning the component Activation tab (see Figure B-15) and adding a new activation option. The Activation Context properties group contains three radio buttons. You can select only one of the buttons at a time—thus enforcing mutual exclusion. If you select “Don’t force activation context,” you actually select the regular COM+ context activation behavior. In this mode, you can enable JITA, transactions, and security access checks. In fact, as long as transaction support or access security are enabled, you cannot select another option; enabling security checks sets the selection back to “Don’t force activation context” from any other setting.

COM+ 1.5 adds a new context activation ...

Get COM & .NET Component Services 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.