Restriction: This topic applies only when the Enterprise Server feature is enabled.
- 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.
- 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
- Located in the
$COBDIR/lib
directory by default.
- mfconnector.jar
- Located in the subdirectory of
$COBDIR/javaee/javaee7
that corresponds to your application server. For example, the
mfconnector.jar file for WebLogic is located in a subdirectory named
oracleweblogic1221.
- Open the startup script for your project in a text editor. This startup script is
StartWebLogic.sh
, and is located in your domain's
bin directory of your WebLogic installation.
- Go to the end of the file.
- Above the line # START WEBLOGIC that starts the WebLogic server, add the following lines:
UNIX platforms - Above the line # START WEBLOGIC that starts the WebLogic server, add the following lines:
JAVA_HOME=jdk_path
export JAVA_HOME
MF_HOME=mfcobolpure_path
export MF_HOME
CLASSPATH=$JAVA_HOME/lib/tools.jar:
$MF_HOME/mfconnector_path/mfconnector.jar:
$MF_HOME/mfcobolpure.jar
export CLASSPATH
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.
- Save the file.
- You can now run the startup script.
To enable tracing
To enable tracing (optional), edit the
ra.xml that corresponds to your Java EE and WebLogic versions. The
ra.xml file is included in the
mfcobol*.rar archive file, located by default in the
/opt/microfocus/VisualCOBOL/javaee/javaee7/oracleweblogic1221.
Change the property value for the
Trace property from
false to
true. Specifically, change:
<config-property>
<config-property-name>Trace</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
to
<config-property>
<config-property-name>Trace</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
To start WebLogic
- Set up a WebLogic server domain and edit the startup script, if you have not already done so.
- Change directory to your WebLogic server domain directory.
- As root user, run the startup script by typing:
startWebLogic.sh
To start WebLogic server console:
- Start WebLogic.
- Open a browser.
- Enter the URL,
http://localhost:7001/console where 7001 is the default port for the server console.
To deploy a resource adapter to WebLogic
- Start WebLogic server and the WebLogic Server Console.
- In the left pane of WebLogic Server Console, expand
your-domain
>Deployments>Connectors
- 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
- 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
- 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
- Start WebLogic server and the WebLogic Server Console.
- Deploy the
.ear file as follows:
- In the left pane expand
mydomain
>Control>
myserver
- Click
Configure a new Application on the right, and follow the steps on the page.
- 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
- Start the WebLogic server console, if it is not already started.
- Navigate to your server in the left-hand pane. This will probably mean expanding:
mydomain
>Control>
myserver
- Right-click your server.
- Click
Start/Stop server and follow the instructions.
TheWebLogic Server Console will not be available until you restart the server.