![]() |
![]() |
e-docs > Tuxedo > Administering a Tuxedo Application at Run Time > TP Framework |
Administering a Tuxedo Application at Run Time
|
Synopsis
Allows the application to perform any application-specific cleanup, such as logging off a database, unregistering well-known factories, or deallocating resources.
C++ Binding
typedef Tobj_ServantBase* Tobj_Servant;
class Server {
public:
void release();
};
Arguments
None.
Exceptions
If an exception is raised in release(), the TP Framework catches the exception. Each exception causes an error message to be written to the user log (ULOG) file, as follows:
"Couldn't unregister factory");
In all cases, the server continues to exit.
Description
The release callback method, which is invoked as the first step in server shutdown, allows the server application to perform any application-specific cleanup. The user must override the virtual function definition.
Typical tasks performed by the application in this method are as follows:
This method is normally called in response to a tmshutdown command from the administrator or operator.
The TP Framework provides a default implementation of Server::release(). The default implementation closes XA resource managers for the server. The implementation does this by issuing a tx_close() invocation, which uses the default CLOSEINFO configured for the server's group in the UBBCONFIG file.
It is the responsibility of the application to close any open XA resource managers. This is done by issuing either of the following calls:
Note: You must use the TP::close_xa_rm() method if you use the INS bootstrap mechanism to obtain initial object references.
Note: Once a server receives a request from the tmshutdown(1) command to shut down, it can no longer receive requests from other remote objects. This may require servers to be shut down in a specific order. For example, if the Server::release() method in Server 1 needs to access a method of an object that resides in Server 2, Server 2 should be shut down after Sever 1 is shut down. In particular, the TP::unregister_factory() method accesses the FactoryFinder Registrar object that resides in a separate server. The TP::unregister_factory() method is typically invoked from the release() method; therefore, the FactoryFinder server should be shut down after all servers that call TP::unregister_factory() in their Server::release() method.
Return Value
None.
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |