Prepare a HATS project for use as a Web application

 

+
Search Tips   |   Advanced Search

 

Overview

To convert a HATS project into to a WebSphere application...

  1. Assemble the project into a J2EE application.

  2. Transfer the application to a server.

Note that the terms "HATS application", "WebSphere application", and "J2EE application" can be used interchangeably to refer to an application created from a HATS project. It is a HATS application because it was developed in the HATS Studio. It is a WebSphere application because it will be installed and run on WebSphere Application Server. It is a J2EE application because it conforms to the J2EE standards.

 

Assemble the project into an application

To assemble the project into an application, follow these steps:

  1. Single-click the name of your project in the HATS Project View.

  2. Click the Assemble HATS Project icon on the main tool bar, or right click the project name and select Assemble HATS Project.

  3. In the Export window, choose an Enterprise Application project from the drop-down list or type the name of an Enterprise Application project in the Enterprise Application project name field.

  4. Type the name of a directory and file name in the Destination field (or click Browse and then select a directory and file name).

  5. If you want to export the project's source files along with the executable files, check the Export source files box. If you include the source files, another developer can extract them from your .ear file. This can make collaboration or service easier, but decide whether it creates a security risk.

  6. If you have exported this project to this location before, the export process asks whether you want to overwrite the existing files. This is intended to protect you from overwriting files that you might want to keep, perhaps to archive a previous version of your project. If you want to overwrite previous files without being asked for confirmation, check the Overwrite existing resources without warning box.

  7. Click Finish. The project is assembled into a J2EE application, represented by an Enterprise Archive file with extension .ear, with the directory and file name you specified.

If you use the display terminal or any other trace options in HATS Studio, be sure you turn the functions off before assembling your project for installation to WebSphere Application Server. Otherwise, those functions will be active when you install your application to the server. See the HATS User's and Administrator's Guide for more information.

If you export (assemble) a HATS Enterprise Application project and receive an error dialog named EAR Export Error, refresh each project in the ear file by right-clicking on the project name and selecting Refresh from the context menu, and then export again.

 

Grouping your applications

You can group your HATS applications together in one .ear file, or store each in its own separate .ear file. These options are discussed in HATS User's and Administrator's Guide. Be sure your HATS applications are grouped in the way you want before you install them to WebSphere Application Server.

 

Install the application on a server

If you created the application's .ear file on your Studio machine, you must move it to your WAS machine. Use FTP, shared network drives, or whatever other method is standard in your environment. After the application's .ear file is on your WAS machine, ask your WAS administrator to install it as a WebSphere application, using the administrative console and the steps described in the WAS InfoCenter. Once the application has been installed, test it by bringing up the URL in a Web browser on another computer. Then you can publish the URL to your users.

Notes:

  1. Graphing support on iSeries servers requires additional iSeries software and configuration. See Appendix A. Enabling graphing support for HATS on iSeries for details on installing and configuring the required software.

  2. On zSeries, there are some recommended server settings and additions to WebSphere variables. See Appendix B. Running HATS applications on a zSeries Server for details on the server settings and WebSphere variables, as well as information on the required software and configuration for graphing support.

 

Changes necessary in the server environment

Depending on how you've created your projects, and the functions you have included in them, you might need to make some changes to the server environment in which the project runs. Those changes are discussed in the following sections.

 

Configure class loader policies

When you install your HATS applications, or when running the applications in the HATS Studio in the Run on Server mode, configure your WAR class loader policy on a per J2EE application basis for any of the following situations:

To change the module visibility in WebSphere Application Server, follow these steps:

  1. In the WAS Administration console, go to...

    Enterprise Applications | Project .ear file

  2. Change the .war class loader policy option to Application

  3. Click

    Apply | Save

  4. Stop and start the Enterprise Application.

To change the module visibility in WebSphere Studio, follow these steps:

  1. Click...

    Window | Show View | Other | Server Server Configuration | OK

  2. In the Server Configuration window, right click on the server you want to modify, and select Open.

  3. Click on the Applications tab. This opens the Application Options panel.

  4. Expand Application settings.

  5. In the Applications list, select the HATS .ear file you want to change.

  6. On the right side of the panel, change the .war class loader policy setting to Application.

  7. Save the changes by pressing Ctrl+S.

  8. Stop the application server if it is running. Do not use Restart because your change will not be applied if you only restart.

  9. Start the application server.

 

HATS and Host Publisher V4.0.1 coexistence

If you install HATS on a WebSphere Application Server V5 where you also have Host Publisher V4.0.1 installed, a HAT0300 NoSuchMethodError message might display when running HATS applications. The error occurs because the HATS application uses the habeanslnv.jar file installed in the WebSphere \lib\ext by Host Publisher, rather than the habeanslnv.jar file defined by the HATS application. By default, WebSphere searches for .jar files in \lib\ext first.

Use WebSphere administration to set the class loader policy for the HATS application so that classes defined in the HATS application are used before classes defined outside the application. To set the class loader policy in WebSphere administration, follow these steps:

  1. In the left pane, click the plus sign (+) to expand Applications.

  2. Click the Enterprise Applications link.

  3. In the right pane, click the link for your HATS application.

  4. On the Configuration tab, locate the Classloader Mode. Change the mode to PARENT_LAST.

  5. Click Apply.

  6. A message tells you to save the changes to your configuration. Save the changes.

  7. Return to the Enterprise Applications.

  8. Stop the application.

  9. Restart the application.

If you continue to receive the HAT0300 NoSuchMethodError message, stop and restart the application server where the HATS application is installed.

 

Home