|
1
|
|
|
2
|
- Package functionality in binary code units
- Operating System provides a simple framework for objects to interact
|
|
3
|
- Operating system does not provide
any functionality for complex interaction of the objects
|
|
4
|
- There are many infrastructure facilities created for many enterprise
applications
- These services are now provided by the Operating System
|
|
5
|
- Neutral Apartments
- Transactions (formerly MTS)
- Queued Components
- COM+ Events
- Load Balancing
|
|
6
|
- Apartments are conceptual spaces in the operating system where the OS
places COM objects
- In Windows NT 4.0 there were two apartments
- STA (Single Threaded Apartment)
- MTA (Multi Threaded Apartment)
|
|
7
|
- Many per process
- Only one thread allowed access to the apartment
- Safe
- Crossing apartment boundary costs a lot
|
|
8
|
- One per process
- Not safe, but very fast
- More difficult to program
|
|
9
|
- If an object in an STA calls an object in an MTA there is a substantial
performance hit.
|
|
10
|
- Allows any thread to enter
- Only one thread allowed in at a time
- COM+ provides synchronization
|
|
11
|
- COM+ Transactions are successor to MTS
- We’re going to assume that audience knows MTS
|
|
12
|
- Object Pooling now a reality
|
|
13
|
- When an object is done with whatever it is doing, it alerts COM+ by
calling SetComplete
- COM+ then calls Deactivate, but does not destroy the object
- COM+ removes the object from the client (invisibly) and puts it in a
pool to be used by other clients
- When another object is requested, the object is retrieved from the pool,
Activate is called and it is handed to the client
|
|
14
|
|
|
15
|
- IPooledObject
- Multiply(int Op1, int Op2)
- IObjectControl
- Activate
- Deactivate
- CanBePooled
|
|
16
|
- Dim oPooledObject As PooledObject
- Dim Result As Integer
- Set oPooledObject = CreateObject("PooledObjectLib.PooledObject)
- Result = oPooledObject.Multiply(5, 6)
|
|
17
|
- Allows clients to call methods on a COM object when the COM object is
not available.
|
|
18
|
|
|
19
|
- Configure COM+ Application in Component Services Manager as Queued
- Configure interface as Queued
- Create object with a moniker – huh?
Like this – CreateObject(“queue:/new:ProgId”)
- Calls are then coded and stored in a Message Queue
|
|
20
|
- No out arguments
- No App specific error codes (HRESULT’s)
- All arguments must be passed ByVal
- Some mechanism to report failures must be implemented if necessary
|
|
21
|
- A component fires an event
- Another component hears the event and
performs some action
- Currently, for another component to act on the event, the first
component must be altered
|
|
22
|
- The event is defined within the operating system, not the component
- Any component can be written to respond to the event
- Any client can instantiate the event class and fire the event
|
|
23
|
|
|
24
|
- Shares COM calls between objects on multiple servers
- Available only in Windows 2K AppCenter
|
|
25
|
|
|
26
|
- Lots of functionality becomes administrative instead of programmatic
- COM+ moves functionality previously requiring extensive infrastructure
into the Operating System
|