| Previous | Next |
| CONTEXT_E_SYNCH_TIMEOUT | CONTEXT_E_ROLENOTFOUND |
CONTEXT_E_OLDREF
CONTEXT_E_OLDREF is the failure HRESULT 0x8004E007 (signed decimal -2147164153, unsigned decimal 2147803143). Its severity bit is 1, facility is 4 (FACILITY_ITF), and the facility-specific code field is 0xE007.
The object reference outlived the transactional context that made it valid
This HRESULT is returned when a caller invokes a COM+ component through a reference associated with a transaction that has already committed or aborted. Transactional and JIT-activated objects are commonly deactivated at that boundary even though a client may still hold an interface pointer.
AllStat describes the result as “You made a method call on a COM+ component that has a transaction that has already committed or aborted.” for it, this wording identifies the immediate COM+ condition, while surrounding context and earlier events determine why it was reached.
Contract boundary
The pointer can remain syntactically valid while the old transactional identity behind it is no longer usable. Diagnosis therefore concerns reference lifetime across commit or abort, not interface marshaling syntax.
Causes that fit this specific result
- A client caches a transactional component reference and reuses it for a later unit of work.
- A callback fires after the transaction ended and captures an interface from the earlier context.
- Application state keeps a child component reference beyond the root method that created it.
- Pooling or JIT activation assumptions are confused with permission to retain transaction-bound state.
Evidence to preserve before changing the system
- Log the transaction and context IDs at reference acquisition and at the failing call.
- Record the commit or abort timestamp and the object deactivation event.
- Inspect caches, fields, closures, and callback registrations that retain the interface pointer.
- Capture whether the class is transactional and JIT activated in Component Services.
Diagnostic sequence
- Release transaction-scoped references when the unit of work completes.
- Acquire a fresh component through the intended activation path for each new transaction.
- Store stable identifiers or immutable data rather than serviced object pointers in long-lived state.
- Cancel callbacks or detach event handlers before the owning context is deactivated.
Retry and recovery
Discard the old reference and reacquire an object in the new context. Retrying through the same pointer cannot restore the completed transaction.
What the result does not establish
This code does not say that the server process crashed or that COM marshaling failed. The obsolete element is the transaction-associated reference.
Difference from nearby HRESULT values
CONTEXT_E_ABORTING occurs while a transaction is still aborting. CO_E_OBJNOTCONNECTED is a broader disconnected-object result without this specific completed-transaction meaning.
Practical scenario
A web session stores a serviced pricing object created during checkout. After that transaction commits, another request invokes the stored pointer and receives this HRESULT; the application stores product IDs instead and activates a new component per request.
Developer and telemetry guidance
Instrument reference acquisition and deactivation for transactional components. Static analyzers and code review should flag serviced interface pointers placed in singleton, session, or process-wide caches.
Official Microsoft references
- Microsoft: COM transaction and context error codes
- Microsoft: COM+ JIT activation concepts
- Microsoft: managing automatic COM+ transactions
- Microsoft: COM+ contexts
- Microsoft: HRESULT values in MS-ERREF
Looking for a different code? Search another status or error code.