Configuring WebLogic

Note:
  • These details only explain how to enable use of the JVM COBOL run-time system with WebLogic; any other WebLogic configuration is out of the scope of this topic.
  • The manifest file (manifest.mf) in mfcobolrts.jar already contains the information required to be recognized as a shared library in WebLogic.

To install the JVM COBOL run-time system (mfcobolrts.jar) in WebLogic 12.1.1 or later, you can add it as a shared library from the weblogic.Deployer command line utility.

To install the run-time system from the command line

Note: The weblogic.Deployer utility only registers the JVM COBOL run-time system with the application server; it does not copy it to the server's directory structure.
  1. Ensure the application server is running.
  2. To set up your environment for the command line tool, run the setWLSEnv.cmd (Windows) or setWSLEnv.sh (UNIX) script, located in the server\bin (Windows) or server/bin (UNIX) sub-directory of the WebLogic server installation directory.
  3. Copy mfcobolrts.jar from $COBDIR/bin to a new location.
  4. Enter the following command:
    java weblogic.Deployer -adminurl t3://localhost:7001 -username USER_NAME 
                           -password PASSWORD -deploy -library PATH\mfcobolrts.jar

    Replace USER_NAME and PASSWORD with details supplied by the administrator of the application server. Replace PATH with the path that you used in the previous step.

Configure the application configuration file

In Eclipse, in the project that will be deployed, in the META-INF directory, add a weblogic-application.xml file that contains the following code - 2.3 is the version of Visual COBOL:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-application
xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <library-ref>
    <library-name>mfcobolrts</library-name>
    <specification-version>2.3</specification-version>
    <implementation-version>2.3</implementation-version>
    <exact-match>false</exact-match>
  </library-ref>
</weblogic-application>
Note: 2.3 in this file is the version of Visual COBOL. If you bind your application to a newer version of the COBOL run-time system than was supplied in a more recent version of Visual COBOL, that must be reflected in the specification-version and implementation-version settings.

To uninstall the run-time system from the command line

  1. Ensure the application server is running.
  2. Enter the following command:
    java weblogic.Deployer -adminurl t3://localhost:7001 -username USER_NAME 
                           -password PASSWORD -undeploy  -name mfcobolrts

Replace USER_NAME and PASSWORD with details supplied by the administrator of the application server.