Apama 10.3 | Apama Documentation | Connecting Apama Applications to External Components | Working with Connectivity Plug-ins | Using Connectivity Plug-ins | Deploying plug-in libraries
Deploying plug-in libraries
Every Java plug-in is loaded in a separate class loader. Static variables cannot be shared between different plug-ins, unless a class is placed on the system's classpath. This allows different plug-ins to use different versions of Java libraries without interference.
For C++ plug-ins, note that while a library can be loaded from any directory by specifying a directory key in the connectivityPlugins section of the configuration file (see Configuration file for connectivity plug-ins), any libraries that the plug-in depends on will only be loaded from the system library path (using the LD_LIBRARY_PATH environment variable and standard locations on UNIX, or using the PATH on Windows). The Apama Command Prompt (see Setting up the environment using the Apama Command Prompt) adds $APAMA_WORK/lib to the system library path, which is the recommended place to put any libraries that plug-ins require. Any libraries that the plug-in loads will be shared across the entire process, therefore different plug-ins will need to use the same version of third-party libraries where applicable. On Windows, ensure that the class and package names of plug-ins are different across plug-ins.
In general, C++ plug-ins will give better performance than Java libraries, as there is a cost in converting objects between Java and the C++ types. In particular, avoid mixing many interleaved Java and C++ plug-ins in the same chain. If possible, put the C++ plug-ins on the host side of the chain, as the correlator host plug-ins are C++ and adjacent plug-ins of the same type are cheaper than conversions. However, the language bindings of any libraries required by a plug-in and familiarity with the programming environment should be the primary factors when deciding in which language to write a new plug-in.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.