Code and Compile Guidelines
As you start creating and updating your application code, consider the following guidelines:
- To begin working with the Solace Java RTO API, import the required packages:
com.solacesystems.solclientj.*
The Solace Java RTO API requires the use of standard Java distribution 1.8 or greater.
Guidelines for Secure Connections and Authentication
The following requirements must also be met to successfully code and compile an application that will use TLS/SSL client connections, client certificate authentication, or Kerberos authentication schemes.
The Solace Java RTO API supports both TLS/SSL security libraries and Kerberos security libraries. The names of these packages are operating system dependent.
TLS/SSL Libraries
To allow programmers to quickly develop client applications that create secure connections to event brokers, OpenSSL libraries (including the crypto library) are bundled with the API in .a and .so versions (Linux), .lib and .dll versions (Windows), and in .a and .dylib versions (macOS). These libraries allow developers to prototype and test TLS/SSL-encrypted client connections.
The provided libraries are distributed for developers' convenience and are not endorsed for distribution in a production network. Consult with your Network Operations Center to obtain your organization's latest secure TLS/SSL packages. OpenSSL distributions can be found at www.openssl.org.
Kerberos Libraries
To develop client applications to use Kerberos authentication, the appropriate Generic Security Service Application Program Interface (GSSAPI) library files must be installed on the development system and on systems that will run the applications. GSSAPI libraries are not bundled with the API.
To successfully link TLS/SSL security libraries or Kerberos security libraries when building your application, refer to the following sections:
- Recommended Methods for Linking with Security Libraries
- Alternate Method to Dynamically Link Linux Applications
- Code and Compile Guidelines
Recommended Methods for Linking with Security Libraries
The following tables provide information for dynamically linking TLS/SSL libraries and Kerberos libraries with Windows and Linux applications.
| Applications Using. | Description |
|---|---|
|
Windows |
|
|
Linux |
|
| Applications Using. | Description |
|---|---|
|
Windows |
|
|
Linux (Solace Java RTO API) |
|
Alternate Method to Dynamically Link Linux Applications
When you build an application as recommended above, it will have a run-time dependency on the required security libraries. If you are using TLS/SSL, this can be verified with /usr/bin/ldd.
When you build an application as recommended above, it also means that the applications will not run on systems where the required libraries are not present. This is not typically an issue because all of the libraries used are automatically deployed in operating system installations.
However, in some cases, you may want to build one binary application that can run when the security libraries are not present as long as features that require these libraries are not used. This is possible and may be simpler for upgrading customers as you do not need to modify your existing build procedure.
If you do not include any extra libraries (other than libsolclient.so) in your link-edit step, your application will not have any run-time dependencies. However, libsolclient itself will still attempt to dynamically load the required libraries at run-time if session properties indicates TLS/SSL or GSS is necessary.