Appendix D Creating C Components
C component lifecycle
This
figure illustrates the states in the lifetime of a C component instance:
Figure 35-1: C component lifecycle
The state transitions are:
- New
instance
- A new C component instance is created
whenever a client application instantiates a stub for the component.
At this point, the Jaguar runtime calls the component's create routine
(see "Customize the creation and
destruction of components").
- In Method
- In response
to a method invocation request from the client, the Jaguar runtime
calls the C routine that implements the method. The next state depends
on which of the transaction state primitives is called.
- If JagCompleteWork or JagRollbackWork is
called, the instance is destroyed when the method invocation completes.
- If JagContinueWork or JagDisallowCommit is
called, the instance persists when the method invocation completes.
If the component is transactional, the routine that is called
also influences the outcome of the transaction that the component
is participating in.
Chapter 5, "C Routines Reference" in the Jaguar
CTS API Reference contains reference pages for the C
routines. Chapter 3, "Understanding Transactions
and Component Lifecycles" describes
Jaguar's transaction model.
- Destruction
- If the
method called JagCompleteWork or JagRollbackWork, the
instance is destroyed when the method completes. An instance is
also destroyed when the client destroys its stub instance or if
the client disconnects abruptly without explicitly destroying the
stub.
Copyright © 2000 Sybase, Inc. All rights reserved.
|
|