![]() |
Transoft Component Adapters (Deployment) 3.41
|
Contents
IntroductionWelcome to revision 3.41 of Transoft Component Adapters (Deployment). The Transoft Component Adapters (Deployment) - Installation & Licensing Guide can be found in the base directory of this CD-ROM, along with Microsoft's Word Viewer 97. Install Word Viewer 97. Note that this release modifies the shared memory format from version 3.31. Please update language components as described in the Language Integration section. New Features
Support for Java Components through the Java Native Interface (JNI)TCA has supported Java Components through the 'Java Remote Components' mechanism, where the Java code runs under a separate server. Release 3.41 introduces Java components running as a process, where the Java Native Interface is used to communicate with the host broker. ExampleGenerate Java component wrappers with the JAVACOMP language on the application line of the SDL. Upon generating wrappers, the following classes will be generated:
Editing the Component classAn example of a method to reverse a string and return that in the output_string parameter: package component; public class SimpleComponent { public ReverseOutputs executeReverse(ReverseInputs inputs) { ReverseOutputs outputs = new ReverseOutputs(); // ##BEGINCODE Reverse char[] ca = inputs.getInput_string().toCharArray(); for (int i = 0; i < ca.length / 2; i++) { char tmp = ca[i]; ca[i] = ca[ca.length - i - 1]; ca[ca.length - i - 1] = tmp; } outputs.setOutput_string(new String(ca)); SimpleContext cx = this.getContext(); cx.setRev_count(cx.getRev_count()+1); // ##ENDCODE Reverse return outputs; } In this example, note the use of the context with the getContext() call. The following example shows the use of a resultset: public PrimesOutputs executePrimes(PrimesInputs inputs) { PrimesOutputs outputs = new PrimesOutputs(); // ##BEGINCODE Primes int np = inputs.getNumprimes(); if (np > 999) { outputs.setStatus(false); outputs.setReason("Too many primes"); } else { outputs.setStatus(true); outputs.setReason("OK"); for (int i = 1; i <= np; i++) { PrimesResults row = new PrimesResults(); int prime = MyFunctions.calculatePrime(i); row.setPrime(prime); row.setDesc("Prime " + i + " is " + prime); outputs.getResultSet().add(row); } } // ##ENDCODE Primes return outputs; } The getResultSet() call returns a java.util.ArrayList, that The component executable line and LanguageIniFile settingNotesThe Java runtime used must be at version 1.5 or above, as generics support is required. The Java runtime must be the same architecture as the TCA broker. That is, if the broker is 32 bit, the Java runtime must also be 32 bit Support for monitoring tools such as Nagios and RHQTCA has been modified to support plugins for the RHQ Project and Nagios RHQ (also, JON) PluginThe RHQ plugin is implemented in the file transoft-tca-plugin.jar. For installation instructions, consult the Word document RHQ Plugin For TCA. NagiosThe Nagios plugin is implemented in the Perl script check_tca.pl. For installation and configuration instructions, consult Nagios Plugin for TCA. Logging Enhancements on UNIXOn UNIX, when SIGHUP or SIGTERM is received, dump diagnostic information to the logfile (if log level INFO is set) New features for Log Rotation added. Set the maximum log size with the MaxLogSize=N where N is the maximum size in megabytes. Old logs can be saved with the MaxLogBackups=B where B is the number of old backups to keep (named appserver.log.1, appserver.log.2 etc) Bugs Fixed
Language IntegrationWhen using COBOL, the runtime will need to be linked with the TCA COBOL Application Bus Adapter library. How this is done depends on the platform and version of COBOL required. WindowsThe Windows runtimes make use of the cfacob.dll library. Make sure the TCF_PLATFORM=WIN32 environment variable is set.
UNIXWhen using COBOL under UNIX, the runtime system will need to be rebuilt or enhanced by linking in the COBOL Application Bus Adaptor library (cobcf.a), or by placing a shared object library (libcobcf.so or libcobcf.sl) version in the appropriate directory. Using shared objectsTo use shared objects under UNIX, the (ACU) runtime must call the library libcobcf.so or libcobcf.sl on HP/UX. MicroFocus COBOL must call cobcf.so/cobcf.sl - generated by mflinktca.sh in the cobol subdirectory of the TCA installation (see 'Re-linking the runtime') Set the environment variable LD_LIBRARY_PATH to point to the lib directory of the TCA installation (LIBPATH on AIX, SHLIB_PATH on HP/UX). When running under HP/UX, edit the ACU .cfg file to include the line: SHARED_LIBRARY_EXTENSION .sl It may also be necessary to force the following export to load a dependency: export LD_PRELOAD=/usr/lib/libsec.sl When running under HP/UX, make sure to set the TCF_PLATFORM environment variable (it can be set in the language .ini file) to HPUX On platforms that support more than one ABI (For example, systems that support 32 and 64-bit binaries, or SCO, which supports the OSR5 ABI and SVR5 ABIs), the shared library ABI must match that of the COBOL runtime binary. Use the file command to show the details of each. # ACU file /usr/tca/lib/libcobcf.so file $ACUDIR/../bin/runcbl # MF file $COBDIR/lib/cobcf.so file $COBDIR/bin/cobrun Troubleshooting shared objectsThe COBOL wrappers include the following section to load the shared object: tcf-init section. tcf-init-begin. display "TCF_PLATFORM" upon environment-name. accept w-tcf-platform-name from environment-value. evaluate w-tcf-platform-name when "WIN32" Set w-tcf-dll to entry "CFACOB.DLL" when "HPUX" CALL "cobcf.sl" ON EXCEPTION CONTINUE when other CALL "cobcf.so" ON EXCEPTION CONTINUE end-evaluate. call "CFINIT" using w-tcf-init1 w-tcf-init2. If there are problems loading shared libraries, remove the ON EXCEPTION CONTINUE clause to generate an error within the COBOL runtime. Check dependencies required by libcobcf.so are satisfied - use the command ldd libcobcf.so to list dynamic dependencies. On HP/UX, you can investigate the paths used to locate libraries with the chatr command: chatr libcobcf.sl. It may also be useful to check the output of chatr against the COBOL runtime. Some platforms have environment variables that may be set to debug dynamic linking. Set the variables in the LanguageIniFile:
Additional tracing may be obtained with a system tracing tool - for example truss (Solaris, AIX), strace (Linux) or tusc(HP/UX) - to diagnose system calls used to load shared libs. Additional configuration options for ACUThe ACU .cfg file has a number of options for handling shared libraries. In particular, the DYNAMIC_FUNCTION_CALLS setting can be used to force calls to be looked up in a shared library (by default, ACU will attempt to load a matching COBOL program before looking up function calls): DYNAMIC_FUNCTION_CALLS CF* The SHARED_LIBRARY_LIST can be used to force the load of a shared library when the runtime starts: SHARED_LIBRARY_LIST /usr/tca/lib/libcobcf.so Re-linking the runtimeThere is a UNIX shell script within the cobol subdirectory for each COBOL language type supported:
Run the relevant script, and follow any instructions provided. Additional NotesUsers of the SCO UnixWare client-side library should note that the client timeout feature is not supported under UnixWare and possibly other platforms that use the same binary. Release notes for previous revisionsRelease notes for 3.40 |
Phone:
770-933-1965 (U.S.) or +44 (0) 1753 778000 (U.K.) Copyright © Computer Software Group Limited 2010. All rights reserved |