Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 12 Developing an EMS Client Application : Programmer Checklists

Programmer Checklists
This section provides a checklist that outlines the steps for creating an EMS application in each language:
Java Programmer’s Checklist
Install
Add the full pathnames for the following jar files to your CLASSPATH:
   jms-2.0.jar
   tibjms.jar
   tibjmsufo.jar
 
All jar files listed in this section are located in the lib subdirectory of the TIBCO Enterprise Message Service installation directory.
Code
Import the following packages into your EMS application:
   import javax.jms.*;
   import javax.naming.*;
Compile
Compile your EMS application with the javac compiler to generate a .class file.
For example:
   javac MyApp.java
generates a MyApp.class file.
Run
Use the java command to execute your EMS .class file.
For example:
   java MyApp
C Programmer’s Checklist
Developers of EMS C programs can use this checklist during the five phases of the development cycle.
Install
Code
Application programs must:
Add EMS_HOME/include to the include path. (OpenVMS environments do not require an include path; skip this item.)
Include the tibems.h header file:
    #include <tibems/tibems.h>
    #include <tibems/emsadmin.h>
   #include <tibems/tibufo.h>
Call tibems_Open() to initialize the EMS C API and tibems_Close() to deallocate the memory used by EMS when complete.
Compile and Link
See the samples/c/readme file for details.
Run
UNIX   If you use dynamic EMS libraries on a UNIX platform, the environment variable $LD_LIBARY_PATH must include the EMS_HOME/lib directory (which contains the shared library files). (On some UNIX platforms, this variable is called $SHLIB_PATH or $SYLIB_LIBRARY_PATH).
Windows   The PATH must include the ems\8.4\bin directory.
OpenVMS   The installation procedure automatically installs the shareable images required for using EMS dynamic libraries.
All Platforms   The application must be able to connect to a EMS server process (tibemsd).
Link These Library Files
EMS C programs must link the appropriate library files. The following sections describe which files to link for your operating system platform:
 
32-Bit UNIX
In 32-bit UNIX environments, both shared and static libraries are available. We recommend shared libraries to ease forward migration.
64-Bit UNIX
In 64-bit UNIX environments, both shared and static libraries are available. We recommend shared libraries to ease forward migration. In this release, 64-bit libraries are available on HP-UX, Solaris, AIX and Linux (2.4 glibc 2.3) platforms.
To use 64-bit libraries, you must include TIBCO_HOME/ems/8.4/lib/64 in your library path, and it must precede any other EMS directory in the library path.
 
Microsoft Windows
For a list of Windows platforms that Release 8.4 supports, see the file readme.txt in the installation directory. Both DLLs and static libraries are available. We recommend DLLs to ease forward migration.
 
The version of the libeay32.dll shared library that is included with EMS is built to optionally support FIPS. This has a side-effect of preventing its relocation in a process address space during run time.
 
OpenVMS
In OpenVMS environments, both shared and static libraries are available. We recommend shared libraries to ease forward migration.
 
C# Programmer’s Checklist
Developers of EMS C# programs can use this checklist during the four phases of the development cycle.
Install
Code
.NET Unshared State API
Compile
Run
To automatically upgrade to the latest .NET assemblies, include the appropriate policy file in the global cache. See Automatic Upgrades Between Versions for more information.
Assembly Versioning
TIBCO Enterprise Message Service assembly DLLs are versioned using the format 1.0.release.version, where release is the EMS release number and version is an arbitrary value. For example, the assembly version number for software release 8.2.0 is similar to 1.0.820.8.
Automatic Upgrades Between Versions
In order to allow for seamless upgrades between releases, the TIBCO Enterprise Message Service installation includes policy and configuration files that redirect existing applications from an older assembly to the newest assembly. There is a policy and configuration file for each EMS library:
A policy.1.0.assembly file. For example, policy.1.0.TIBCO.EMS.dll. The policy file must be included in the global cache to enable automatic upgrades.
An assembly.config file. For example, TIBCO.EMS.dll.config. The configuration file must be present when the related policy file is added to the global cache.
Table 65 shows the policy and configuration files for each EMS assembly.
.NET Unshared State API
Enabling Updates
To enable automatic updates for a library, add the appropriate policy file to the global cache. Note that the related configuration file must be located in the directory with the policy file in order to add the policy file to the global cache.
Disabling Automatic Upgrades
If you do not want your older applications to automatically move to the newer version, do not include the policy DLL in the global cache. When the policy.1.0.assembly file is absent, the client application is not upgraded.
Running Multiple Clients from Different EMS Releases
To deploy two or more applications that are built with different TIBCO Enterprise Message Service releases:
1.
Build clients using the different .NET client assemblies.
2.
Include all desired versions of the .NET client assemblies in the global cache.
3.
Do not include the policy DLL in the global cache.
Excluded Features and Restrictions
This section summarizes features that are not available in the .NET library.
Note that compression, SSL, and the LDAP lookup of administered objects features are available only with Microsoft .NET Framework 2.0.
ConnectionConsumer, ServerSession, ServerSessionPool
Modify socket buffer sizes (see Tibems.SetSocketReceiveBufferSize and Tibems.SetSocketSendBufferSize in the HTML reference)
Daemon threads (see Tibems.SetSessionDispatcherDaemon in the HTML reference)
Character Encoding
.NET programs represent strings within messages as byte arrays. Before sending an outbound message, EMS programs translate strings to their byte representation using an encoding, which the program specifies. Conversely, when EMS programs receive inbound messages, they reconstruct strings from byte arrays using the same encoding.
When a program specifies an encoding, it applies to all strings in message bodies (names and values), and properties (names and values). It does not apply to header names nor values. The method BytesMessage.WriteUTF always uses UTF-8 as its encoding.
Outbound Messages
Programs can determine the encoding of strings in outbound messages in three ways:
Inbound Messages
An inbound message from another EMS client explicitly announces its encoding. A receiving client decodes the message using the proper encoding.
For more information about character encoding, see Character Encoding in Messages.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved