Previous Topic Next topic Print topic


Deploy a Service Interface

To successfully deploy a Java service interface to an enterprise server region, you need to first set some options in Enterprise Developer.

Set Deployment Properties

To ensure that the deployment process runs smoothly, you must set some options that tell Enterprise Developer the name of your enterprise server region, what application server to use, and where to find certain files.

  1. From the COBOL Explorer, right-click the ProgramEJB Web Service; then click Properties.
  2. On the General tab, click EJB Generation (default).
  3. On the Deployment Server tab, click the Change button that corresponds to the Enterprise Server name field.
  4. Select ESDEMO.
  5. On the Application Files tab, click Legacy application needs deploying; then click Add Files to add the following files:
    File Project Folder
    bookfile.dat ProgramEJB
    bookfile.idx ProgramEJB
    book.dll ProgramEJB > New_Configuration.bin
    These files are copied to the enterprise server region when you deploy. The .dat and .idx files are the data and index parts of the indexed file accessed by the service. The .dll is the executable file you need to debug the service.
  6. On the EJB Generation tab, use the drop-down lists to set the Application Server to JEE 6 and JBOSS 6.1.0 (Java6).
  7. Also on the EJB Generation tab, click the Browse button that corresponds to the J2EE Class Path field and add the following EJB connector class files, all of which are located in your JBoss installation's client subfolder:
    • jboss-ejb-api_3.1_spec.jar
    • jboss-connector-api_1.5_spec.jar
    • jboss-servlet-api_3.0_spec.jar

Start the ESDEMO Enterprise Server Region

Before deploying your service interface, you must start the ESDEMO region where the ProgramEJB service will run.

  1. If the Server Explorer in Enterprise Developer is not active, click Window > Show View > Other > Micro Focus COBOL > Server Explorer; then click OK.
  2. From the Server Explorer, expand Local [localhost:86] to see a list of available enterprise server regions.
  3. To start the ESDEMO enterprise server region, right-click it; then click Start.

    ESDEMO provides a default user name and password that you can customize. For this tutorial, you use the default information.

  4. If a sign-on dialog box appears, click OK; then click No to disable password recovery.

The Enterprise Server Daemon is then invoked via the Console, starting the enterprise server region.

Deploy the ProgramEJB service interface

  • From COBOL Explorer, right-click the ProgramEJB service interface; then click Deploy.

The Console shows the progression of the deployment process. If deployment was successful, you should see a message indicating success.

If deployment ever fails, you should find a message in the output window indicating why it failed. Also, the failure message contains the path to the deployment log file. You can type the address into a browser and view the log file from there.

View deployment results

Now that your service interface has been deployed as a service running on the ESDEMO enterprise server, you can look at the details of the deployed service Enterprise Server Administration page.

  1. From Server Explorer, right-click Micro Focus Servers; then click Administration.

    The Enterprise Server Administration Home page appears in a window of the Eclipse IDE.

    In the row showing information for the ESDEMO enterprise server, you should see that the Objects column shows the number of services that this enterprise server runs. In this case, the number of running services should be at least 9. These are the five that come standard with the ESDEMO enterprise server, plus the one service you added containing four operations. You might see more if you have deployed other services to the ESDEMO enterprise server.

  2. Click the Details button for the ESDEMO Services.

    In the row showing your new service, ProgramEJB, you'll notice that the Current Status column shows all four operations as Available. This means that the service is ready to be access by a client.

Previous Topic Next topic Print topic