My webMethods Server 10.7 | My webMethods Server Webhelp | Administering My webMethods Server | System Administrator Functions | Managing My webMethods Server Content | Adding Custom JAR Files
 
Adding Custom JAR Files
My webMethods Server runs in an Open Services Gateway initiative (OSGi) framework. You can add custom JAR files to a dedicated directory of the server instance, and run mws update to convert those JAR files into OSGi bundles. During the execution of the update command, My webMethods Server generates bundle manifests with default content for the JAR files. If a JAR file in the dedicated Software AG_directory /MWS/lib directory already includes an OSGi bundle manifest, My webMethods Server skips the manifest generation for that file.
Additionally, you can customize the default manifest contents by providing instructions in a bind file, for example, when adding a JAR file as a fragment to another bundle.
The following procedure describes how to add custom JAR files and how to attach a JAR file as a fragment bundle. For more information on bundles, see the OSGi Service Platform Core Specification.
*To add custom JAR files
1. Copy the JAR file to this location:
Software AG_directory /MWS/lib
2. Optional. To include a custom manifest, or add the JAR file as a fragment to another bundle, do the following:
a. Create a file with the name jar_file_name.bnd where jar_file_name is the name of the custom JAR file, without the .jar extension.
b. In the bind file, add the custom instructions on how to bind the JAR file. For example:
# attach as fragment to the caf.server bundle
Fragment-Host: com.webmethods.caf.server
c. Place the bind file in the same directory where you placed the JAR file:
Software AG_directory /MWS/lib
3. Run the update command for the server instance.

Software AG_directory/MWS/bin/mws.[bat | sh] update