3.7.3.7.5 Description
This method can be used to cause deactivation of an object,
either the object currently executing (upon completion of the
method in which it is called) or another object. It can only be
used for objects with the process activation policy. It provides
additional flexibility for objects with the process
activation policy.
Note:
For single-threaded servers, theTP::deactivateEnable(interface, object id, servant)
method
can be used to deactivate an object. However, if that object is currently in a transaction, the object will be deactivated when the transaction commits or rolls back. If an invoke occurs on the object before the transaction is committed or rolled back, the object will not be deactivated. To ensure the desired behavior, make sure that the object is not in a transaction or ensure that no invokes occur on the object after the TP::deactivateEnable()
call until the transaction is complete.
For multithreaded servers, use of the TP::deactivateEnable(interface, object id, servant)
method
is not supported for deactivation of objects in per-object servers. This method is supported for deactivation objects in per-request servers, however, the deactivation may be delayed because others threads are acting on the object.
Depending on which of the overloaded functions are called, the actions are as follows:
-
Current-object format
- When called from within a method of an object with process activation policy, the object currently executing will be deactivated after completing the method being executed.
-
Any-object format
- The application can request deactivation of an object by
specifying its
ObjectId
and the associated servant.
If the object for which the deactivate is requested has a
transaction
activation policy, an
IllegalOperation
exception is raised. This is because
deactivation of such objects may interfere with their correct
notification of transaction completion by the Oracle Tuxedo
transaction manager.
Parent topic: TP::deactivateEnable()