Get a basic understanding of tuxedo in the Windows environment

Source: Internet
Author: User

Recently changed a job, the new company use tuxedo to simplify the development of the application, and I have been working for so many years, although a little understanding of C + + development, but also did not use tuxedo this ancient things. Since there is no contact, then learn it.
Let's describe the twists and turns of the road.


My native environment is operating system: 64-bit Windows 10 Pro, Memory: 8g,c++ 's development tool is: Microsoft Visual Studio Ultimate. I began to feel that, in order to be more compatible with the operating system, I should download a 64-bit tuxedo, so chose the Tuxedo111120_64_win_2k8_x86_vs2010.exe, all installed to no problem, in the compilation Tuxedo_ Home inside the Samples\atmi\simpapp example, perform "Buildclient-o simpcl-f simpcl.c" and "Buildserver-o simpserv-f simpserv.c-s TOUPPER" , always prompt all kinds of inexplicable mistakes. The essence of these two commands is to call the compiler cl.exe in Ms VC to compile the linker. We can find the corresponding 64-bit cl.exe and use the corresponding 64-bit library in MS VC to connect to the target file, but eventually there are a variety of errors. I decided to choose the 32-bit tuxedo. Here's what I did with the 32-bit tuxedo.


Software Environment
Operating system: 64-bit Windows 10 Pro
The development tool for C + + is: Microsoft Visual Studio Ultimate
Version information for tuxedo: Tuxedo111120_32_win_2k8_x86_vs2010.exe

The installation of tuxedo to a place where there is no special attention, just go all the way down. Then do the environment variable configuration. Specific as follows:
Include=c:\bea\tuxedo11gr1_vs2010\include; C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\include;
Lib=c:\bea\tuxedo11gr1_vs2010\lib; C:\Program Files (x86) \microsoft Sdks\windows\v7.0a\lib; C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\lib;
These two environment variables are actually not related to tuxedo, but are used by Ms VC when compiling the program. Usually, we use the MS VC this IDE to develop programs, through the menu can be done to compile the connection and run. In fact, we can also use a program called Cl.exe to compile, in the command line using Cl.exe to compile the program, you need to set the Include directory and library file directory, like g++, so that the cl.exe followed by the parameters generally more. By setting these two environment variables, when using cl.exe on the command line, you can simplify the way the command is written, removing the path designation for the Include and Lib library files.

The following is an example of a beginner to tuxedo.
Now make a copy of the example in "$TUXEDO _home\samples\atmi\simpapp". Reading the Readme.nt, this is a quick way to learn how to compile and use tuxedo.

Environment variables are required in the documentation, and the environment variables I set are as follows:
tuxdir=c:\bea\tuxedo11gr1_vs2010# the installation directory of my Tuxedo
appdir=c:\bea\tuxedo11gr1_vs2010\samples\atmi\simpapp_baby# the application directory of my example
Path=c:\bea\tuxedo11gr1_vs2010\bin; C:\bea\tuxedo11gR1_VS2010\samples\atmi\simpapp_baby; C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\bin; C:\Program Files (x86) \microsoft Visual Studio 10.0\Common7\IDE; C:\bea\tuxedo11gR1_VS2010\bin; C:\bea\tuxedo11gR1_VS2010\jre\bin\server; C:\bea\tuxedo11gR1_VS2010\jre\bin, #实际上我的主机的环境变量比这个多, I have only listed the tuxedo and Ms VC related.
tuxconfig=c:\bea\tuxedo11gr1_vs2010\samples\atmi\simpapp_baby\tuxconfig# the configuration file for my example in tuxedo.
wsnaddr=127.0.0.1:3050#
In fact, the environment variables I set up have the following:
Nlspath=c:\bea\tuxedo11gr1_vs2010\locale\c# This is the time to generate Tuxconfig file, without it, "TMLOADCF ubbsimple" This command will be error.

Then I changed the contents of the SetEnv.cmd and ran the script file. It seems that this setting and the manual setting in the environment variable are repeated.
Online said, some host also to run the VC installation directory vcvars32.bat This script file, I also run a bit. In fact, he also set the environment variables, open a little read, and found that he is set up include and Lib and Libpath. The setting of this and the topmost environment variable is essentially one thing.

After Setup, you can compile the program:
Buildclient-o simpcl-f simpcl.c# Client program
Buildserver-o simpserv-f simpserv.c-s toupper# Server program
If the environment variables of the above include and Lib are not set incorrectly, the two programs can be compiled without pressure. If something goes wrong, there will be an error similar to the following:
Cl.exe/md-i "%tuxdir%" \include-i "C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\include"-fesimpcl simpcl.c "%T uxdir% "\lib\libtux.lib"%tuxdir% "\lib\libbuft.lib"%tuxdir% "\lib\libfml.lib"%tuxdir% "\lib\tuxlib.lib"%TUXDIR% "\ Lib\libfml32.lib "%tuxdir%" \lib\libengine.lib-link-implib:bc-5054.lib

Cl.exe/md/fa-i "%tuxdir%" \include-fesimpserv bs-374c.c simpserv.c "%tuxdir%" \lib\libtux.lib "%TUXDIR%" \lib\ Libbuft.lib "%tuxdir%" \lib\libfml.lib "%tuxdir%" \lib\libfml32.lib "%tuxdir%" \lib\libengine.lib wsock32.lib Kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib-link-implib:bs-374c.lib
This error shows what the nature of buildclient and Buildserver are.

Modify the configuration of the Ubbsimple
With the experience of the above configuration, this modification is not difficult. Follow the prompts to change the contents of the <> inside the file. There is a "-" in the middle of my computer name, so the whole computer name needs to be enclosed.

Generate Tuxconfig File
Follow the instructions in the manual: TMLOADCF ubbsimple can generate the configuration file that the $tuxconfig points to. If $nlspath is not set, then this command will prompt an error. I am also based on the error tips, find the solution on the Internet.

Run the server program according to the prompts in Readme.nt
C:\bea\tuxedo11gr1_vs2010\samples\atmi\simpapp_baby>tmboot-y
Booting all admin and server processes in C:\bea\tuxedo11gR1_VS2010\samples\atmi\simpapp_baby\tuxconfig
Info:oracle Tuxedo, Version 11.1.1.2.0 with VS2010, 32-bit, Patch level (none)

Booting admin processes ...

EXEC bbl-a:
Process id=14836 ... Started.

Booting Server processes ...

EXEC simpserv-a:
Process id=9204 ... Started.
2 processes started.

After booting, with the tasklist command, you can see that two new backend services have been added:
BBL.exe 18288 Services C:\bea\tuxedo11gR1_VS2010\bin\BBL.exe
Simpserv.exe 18320 Services C:\bea\tuxedo11gR1_VS2010\samples\atmi\simpapp_baby\simpserv.exe

Then start the client program
C:\bea\tuxedo11gr1_vs2010\samples\atmi\simpapp_baby>simpcl.exe Hello
Returned string Is:hello

At this point, the test is complete!
Later, you can stop the service.
C:\bea\tuxedo11gr1_vs2010\samples\atmi\simpapp_baby>tmshutdown-y
Shutting down all admin and server processes in C:\bea\tuxedo11gR1_VS2010\samples\atmi\simpapp_baby\tuxconfig

Shutting down server processes ...

Server id = 1 Group id = GROUP1 Machine = Simple:shutdown Succeeded

Shutting down admin processes ...

Server id = 0 Group id = Simple Machine = Simple:shutdown Succeeded
2 processes stopped.

Get a basic understanding of tuxedo in the Windows environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.