OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Steve Swartz (steveswMICROSOFT.COM)
Date: Thu Oct 04 2001 - 10:30:09 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Yes, it is, Henk. Another thing to do would be to just remove object3
    and object4 from COM+. Or, if you were running XP, you could add object3
    and object4 to the COM+ application as unconfigured components.

    These settings must be used carefully. Components created this way will
    share their caller's services, but if they support (say) custom
    marshaling, references to them can be exported from context in ways that
    can break the services. If they support normal marshaling, then they'll
    get proxies and policy sets if exported from the context, just as the
    "privileged" component (the one that caused the context to be created).

    -----Original Message-----
    From: Henk de Koning [mailto:henkkCOMPLEXIT.COM]
    Sent: Thursday, October 04, 2001 3:57 AM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Re: FW: COM+ and Free Threading

    Is this a complicated way to achieve what you would get if you create a
    nonconfigured component from a configured one :) ?

    BTW, setting MustRunInClientContext is a bit dangerous if you share
    objrefs
    (which, of course, you dont :)

    -- Henkk

    ----- Original Message -----
    From: "Steve Swartz" <steveswMICROSOFT.COM>
    To: <DCOMDISCUSS.MICROSOFT.COM>
    Sent: Wednesday, October 03, 2001 8:03 PM
    Subject: Re: FW: COM+ and Free Threading

    > It may be that you're running into the old "it's hard and/or
    impossible
    > to truly turn off all services and make components run in the caller's
    > context" problem. To see if that's so, store the following VBS into a
    > file named noctx.vbs and then run the command "noctx.vbs ALL
    > <APPLICATION NAME>" on the library application containing object3 and
    > object4. This eliminates some services you might not even know about
    ;).
    > Often this is what people are seeing when they say "there's context
    > overhead in Windows 2000". They're comparing within-context calls in
    > NT/MTS to cross-context calls in W2K/COM+.
    >
    > So far as I know, Tim Ewald's analysis is completely unsubstantiated.
    I
    > have never seen evidence of even appreciable degradation of
    performance
    > between NT/MTS and W2K/COM+ due to cross-context call performance, let
    > alone the substantial degradation that you're seeing.
    >
    > <%
    >
    >
    > Dim objArgs
    > Set objArgs = WScript.Arguments
    >
    > SetApplicationProperty objArgs(1), "Base Application Partition",
    > "Activation", 0 SetApplicationProperty objArgs(1), "Base Application
    > Partition", "AccessChecksLevel", 0
    >
    > SetComponentProperty objArgs(0), objArgs(1), "Base Application
    > Partition", "COMTIIntrinsics", 0 SetComponentProperty objArgs(0),
    > objArgs(1), "Base Application Partition", "IISIntrinsics", 0
    > SetComponentProperty objArgs(0), objArgs(1), "Base Application
    > Partition", "JustInTimeActivation", 0 SetComponentProperty objArgs(0),
    > objArgs(1), "Base Application Partition",
    > "ComponentAccessChecksEnabled", 0 SetComponentProperty objArgs(0),
    > objArgs(1), "Base Application Partition", "Synchronization", 0
    > SetComponentProperty objArgs(0), objArgs(1), "Base Application
    > Partition", "Transaction", 0 SetComponentProperty objArgs(0),
    > objArgs(1), "Base Application Partition", "EventTrackingEnabled", 0
    > SetComponentProperty objArgs(0), objArgs(1), "Base Application
    > Partition", "MustRunInClientContext", 1
    >
    >
    >
    '***********************************************************************
    > *******
    > ' Modifies a property value on an application
    >
    '***********************************************************************
    > *******
    > Sub SetApplicationProperty (ApplicationName, PartitionName,
    > PropertyName, PropertyValue)
    >
    > Set cat = CreateObject("COMAdmin.COMAdminCatalog.1")
    >
    > 'cat.CurrentPartition = PartitionName
    > Set collApps = cat.GetCollection("Applications")
    >
    > collApps.Populate
    >
    > numApps = collApps.Count
    > For i = numApps - 1 To 0 Step -1
    > If collApps.Item(i).Value("Name") = ApplicationName Then
    > collApps.Item(i).Value(PropertyName) = PropertyValue
    > End If
    > Next
    >
    > collApps.SaveChanges
    >
    > Set collApps = Nothing
    > Set cat = Nothing
    >
    >
    > End Sub
    >
    >
    '***********************************************************************
    > *******
    > ' Set a component property
    >
    '***********************************************************************
    > *******
    > Sub SetComponentProperty (ComponentID, ApplicationName, PartitionName,
    > PropertyName, PropertyValue)
    >
    > Set cat = CreateObject("COMAdmin.COMAdminCatalog.1")
    >
    > 'cat.CurrentPartition = PartitionName
    > Set collApps = cat.GetCollection("Applications")
    >
    > collApps.Populate
    >
    > numApps = collApps.Count
    > For i = numApps - 1 To 0 Step -1
    > If collApps.Item(i).Value("Name") = ApplicationName Then
    >
    > Set collComponents =
    > collApps.GetCollection("Components", collApps.Item(i).Key)
    > collComponents.Populate
    >
    > numComponents = collComponents.Count
    >
    > For j = numComponents - 1 To 0 Step -1
    >
    > 'If collComponents.Item(j).Value("CLSID")
    =
    > ComponentID Then
    >
    > collComponents.Item(j).Value(PropertyName) = PropertyValue
    > 'End If
    >
    > Next
    >
    > collComponents.SaveChanges
    >
    > End If
    > Next
    >
    > collApps.SaveChanges
    >
    > Set collComponents = Nothing
    > Set collApps = Nothing
    > Set cat = Nothing
    >
    > End Sub
    >
    >
    >
    >
    >
    >
    > %>
    >
    > ----------------------------------------------------------------
    > Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    > contains important info. Save time, search the archives at
    > http://discuss.microsoft.com/archives/index.html .
    > To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM
    >

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM