Server
is used as the base class for application specific server classes generated by the C++ Expert.
BEATuxBldr · Server
The member functions of this class provide default behavior for Module1
Srv
(Generated Server) sub-classes that the C++ Expert creates for your application. This allows you to easily extend the implementation of member functions for a specific generated application.
This section lists the member functions of Server
.
Data Member | Access | Documented in |
---|---|---|
close_xa_rm |
public |
Server |
initialize |
public |
Server |
open_xa_rm |
public |
Server |
release |
public |
Server |
Upon successful completion, Under the following conditions,
close_xa_rm
close_xa_rm
closes the Resource Manager linked to the calling application's server process.
Synopsis
int close_xa_rm()
Returns
close_xa_rm
returns a non-negative value.
close_xa_rm
fails and returns the error code from the associated tx_close
function call. For more information about tx_close
refer to the BEA TUXEDO Reference Manual (see Where to Find Related Information). The error codes that may be returned by close_xa_rm
are listed below:
[TX_ERROR]
ULOG
file.
[TX_FAIL]
ULOG
file.
close_xa_rm
should be called once by the implementation of release
for each server that is linked with an Resource Manager and should be used in place of any Resource Manager-specific close
function call. The information needed to close a Resource Manager should be placed in the CLOSEINFO
parameter in the GROUPS
section of the BEA TUXEDO UBBCONFIG
file. This information depends on the Resource Manager termination semantics and is provided by the Resource Manager vendor.
For more information about the CLOSEINFO
parameter, refer to the ubbconfig
section of the BEA TUXEDO Reference Manual, and the Configuring Distributed Transaction Processing section of the BEA TUXEDO Administration Guide (see Where to Find Related Information).
initialize
allows the server application to perform application-specific initialization procedures, as implemented by the server application developer.
Boolean initialization argc, char** argv)
argc
argv
. The value of argc
will be one greater than the number of application-specific options.
argv[0]
argv[1..n]
TRUE
FALSE
initialize
, the application code should return FALSE
, causing the server to exit gracefully. The application code should not attempt to use the exit
system call.
initialize
is called by the C++ ATMI Framework as the last step in server initialization. It allows the server application to perform application-specific initialization procedures such as connecting to a database, registering with an Event broker, performing centralized logging, etc.
Application-specific options contained in argv
are passed to the server from the server main
function. These options are specified in the BEA TUXEDO UBBCONFIG
file in the CLOPT
parameter of the SERVER
section. Options recognized by BEA TUXEDO should be listed first in the CLOPT
parameter, followed by a double-hyphen (--), followed by any application-specific options.
For processes that are linked with a Resource Manager, the implementation of initialize
must call open_xa_rm
to connect to Resource Manager(s) that have been linked with this server.
For more information about the CLOPT
parameter, refer to the ubbconfig
section of the BEA TUXEDO Reference Manual, and the Configuring Distributed Transaction Processing section of the BEA TUXEDO Administration Guide (see Where to Find Related Information).
open_xa_rm
opens the Resource Manager linked to this server.
int open_xa_rm()
Upon successful completion, open_xa_rm
returns a non-negative value.
Under the following conditions, open_xa_rm
fails and returns the error code from the associated tx_open
function call. For more information about tx_open
refer to the BEA TUXEDO Reference Manual (see Where to Find Related Information). The error codes that may be returned by open_xa_rm
are listed below:
[TX_ERROR]
ULOG
file.
[TX_FAIL]
ULOG
file.
open_xa_rm
should be called once by the implementation of initialize
for each server that is linked with a Resource Manager and should be used in place of any Resource Manager-specific open
function call. The information needed to open a Resource Manager should be placed in the OPENINFO
parameter in the GROUPS
section of the BEA TUXEDO UBBCONFIG
file. This information depends on the Resource Manager connection semantics and is provided by the Resource Manager vendor.
For more information about the OPENINFO
parameter, refer to the ubbconfig
section of the BEA TUXEDO Reference Manual, and the Configuring Distributed Transaction Processing section of the BEA TUXEDO Administration Guide (see Where to Find Related Information).
release
causes the server application to perform any application-specific procedures during server shut-down.
void release()
release
is called by the C++ ATMI Framework during server shut-down and allows the application to perform any application-specific clean up such as logging off a database, raising events, perform central logging, etc. For servers that are linked with an Resource Manager, release
must call the close_xa_rm
to close the Resource Manager.
Note: Regardless of the status or actions of release, the server is shut down once release returns.