To Deploy to WebLogic

Restriction: This topic applies only when the Enterprise Server feature is enabled.

This topic describes how to deploy an application developed using the Interface Mapping Toolkit to WebLogic Application Server.

  1. If you have not set up a WebLogic server domain, set one up using the WebLogic Domain Configuration Wizard, following the instructions in the wizard. You can start the wizard from the Start menu.
  2. If your COBOL system (either Visual COBOLor COBOL Server) is installed in a location that uses a spacey path, you need to copy the following files to a non-spacey location:
    • mfcobolpure.jar - This is by default in the %ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2013\bin and \bin64 of your COBOL system installation.
    • mfconnector.jar - This is by default in a subdirectory under %ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2013\javaee of your COBOL system installation. You need the jar file that corresponds to the WebLogic version that you are using, such as the mfconnector.jar in the javaee5/oracleweblogic10 subdirectory.
  3. Open the startup script for your project in a text editor. This startup script is StartWebLogic.cmd , and is located in your domain directory of your WebLogic installation.
  4. Go to the end of the file.
  5. Above the line @rem Call WebLogic Server , add the following lines:
    set java_home=jdk_path
    set mf_home=mfcobolpure_path
    set classpath=%java_home%\lib\tools.jar;
                  %mf_home%\mfconnector_path\mfconnector.jar;
                  %mf_home%\mfcobolpure.jar

    Where:

    • jdk_path is the location of the JDK installation to use for WebLogic.
    • mfcobolpure_path is the path containing mfcobolpure.jar.
    • mfconnector_path is the path containing the required mfconnector.jar. If you have copied this jar into the same directory as mfcobolpure.jar, you don't need to specify this path.
  6. Save the file.
  7. You can now run the startup script.

To enable tracing

To enable tracing (optional), edit the weblogic-ra.xml file that corresponds to your Java EE and WebLogic versions. The weblogic-ra.xml is included in the mfcobol-notx.rar archive file located by default in one of the following directories:
Java EE 5, WebLogic 10
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2013\javaee\javaee5\oracleweblogic10
Java EE 6, WebLogic 1211
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2013\javaee\javaee6\oracleweblogic1211
Java EE 7, WebLogic 1221
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2013\javaee\javaee7\oracleweblogic1221
Set the following attribute to true:
  • trace

To start WebLogic

  1. Set up a WebLogic server domain and edit the startup script, if you have not already done so.
  2. Go to the Start menu for WebLogic and choose the domain and server that you specified in your startup script. This Start menu item runs the startup script.

    You cannot start WebLogic using Services in Windows Control Panel and you cannot configure it in Control Panel to start automatically when you reboot the machine.

To start WebLogic server console:

  1. Start WebLogic.
  2. Open a browser.
  3. Enter the URL, http://localhost:7001/console where 7001 is the default port for the server console.

To deploy a resource adapter to WebLogic

  1. Start WebLogic server and the WebLogic Server Console.
  2. In the left pane of WebLogic Server Console, expand your-domain >Deployments>Connectors
  3. Click Configure a new Connector Component and follow the steps on the page. When you are asked to upload the resource adapter file, upload the required mfcobol*.rar file.

    You do not need to create a connection factory or specify the JNDI name of the resource adapter because these are already specified in the deployment descriptor for the connection factory, weblogic-ra.xml

  4. Confirm that the resource adapter has been successfully deployed, by examining the Deployment Activity table on the page on the right. The resource adapter should also be listed in the hierarchy on the left.
Note: To deploy the local transaction connector (mfcobol-localtx.rar), first deploy the XA transaction connector (mfcobol-xa.rar) and then undeploy it. You will then be able to install the local transaction connector.

To deploy an EJB to WebLogic

  1. If you don't have a .ear file containing your EJB, package the EJB into an.ear file now. You will have an .ear file if you generated a client and EJB together, and it will be in myProject\repos\myservice.deploy
  2. Start WebLogic server and the WebLogic Server Console.
  3. Deploy the .ear file as follows:
    1. In the left pane expand mydomain >Control> myserver
    2. Click Configure a new Application on the right, and follow the steps on the page.
    3. Confirm that the application has been successfully deployed, by examining the Deployment Activity table on the page on the right. The application should also be listed in the hierarchy on the left

To stop WebLogic

  1. Start the WebLogic server console, if it is not already started.
  2. Navigate to your server in the left-hand pane. This will probably mean expanding: mydomain >Control> myserver
  3. Right-click your server.
  4. Click Start/Stop server and follow the instructions.

TheWebLogic Server Console will not be available until you restart the server.