Programming and Coding
Tuxedo .NET Workstation Client - libwsclient.dll
To connect your .Net application to your machine’s Tuxedo services, initialise a TypedTPINIT() object.
TypedTPINIT tpinfo = new TypedTPINIT();
tpinfo.cltname = "ApplicationVersion" //Value defined on server required authentication
tpinfo.usrname = "User9999" //Username
AppContext tuxContext = AppContext.tpinit(tpinfo); // connect to Tuxedo domain
tuxContext.tpterm(); // disconnect from Tuxedo domain
Utils.tuxputenv ("WSNADDR=//10.2.0.5:1001"); //Specifies the network address of the workstation listener process through which clients gain access to the application.
At initialisation time, TUXEDO is identified by the client program through the operating sytems environmental variables. The function Bea.Tuxedo.ATMI.Utils. tuxputenv(String) adds an environment variable to the system in real time and works across the different platforms on which TUXEDO is supported, including those platforms that don't normally have environment variables. This provides a portable alternative to setting the environment variable yourself. A second function, Bea.Tuxedo.ATMI.Utils. tuxreadenv(String, String)performs the same function but reads environmental variable directly from a file which may be easier to maintain.
Bea.Tuxedo.ATMI.Utils. tuxreadenv(String, String)
to disconnect from Tuxedo services, use
tuxContext.tpterm(); // disconnect from the first Tuxedo domain
© 2020 Digcode.com. All rights reserved.