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 selection—“Must be activated in the default context.” This new option can be useful when you know that clients of the component reside in the default context and make frequent calls of short duration to your component, and that your component does not use most of the COM+ services.

The new COM+ 1.5 component Activation tab

Figure B-15. The new COM+ 1.5 component Activation tab

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset