![]() |
![]() |
|
|
Joining an Application
Before an ATMI client can perform any service request, it must join the BEA Tuxedo ATMI application, either explicitly or implicitly. Once the client has joined the application, it can initiate requests and receive replies.
A client joins an application explicitly by calling the tpinit(3c) function with the following signature:
int
tpinit (TPINIT *tpinfo)
A client joins an application implicitly by issuing a service request (or any ATMI function) without first calling the tpinit()function. In this case, the tpinit() function is called by the BEA Tuxedo system on behalf of the client with the tpinfo argument set to NULL. The tpinfo argument points to a typed buffer with a TPINIT type and NULL subtype. The TPINIT typed buffer is defined in the atmi.h header file and includes the following information:
char usrname[MAXTIDENT+2];
char cltname[MAXTIDENT+2];
char passwd[MAXTIDENT+2];
char grpname[MAXTIDENT+2];
long flags;
long datalen;
long data;
The following table summarizes the TPINIT data structure fields.
TPINIT Data Structure Fields
Before it can join the application, the client program must call tpalloc() to allocate the TPINIT buffer. The following example shows how to allocate a TPINIT buffer that will be used to pass eight bytes of application-specific data to the tpinit() function. Allocating a TPINIT Typed Buffer Refer to tpinit() in the BEA Tuxedo ATMI C Function Reference for more information on the TPINIT typed buffer. See Also.
.
.
TPINIT *tpinfo;
.
.
.
if ((tpinfo = (TPINIT *)tpalloc("TPINIT",(char *)NULL,
TPINITNEED(8))) == (TPINIT *)NULL){
Error Routine
}
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|