Deploying Java EE applications directly to a Liberty JVM server

You can deploy Java™ EE applications by defining the application element in server.xml, or by copying the application into a previously defined dropins directory.

Before you begin

The JVM server must be configured to use Liberty technology.

About this task

Java EE applications can be packaged as a Web Archive (WAR), a Enterprise Bundle Archive (EBA), or a Enterprise Application Archive (EAR).

Liberty provides two methods to install Java EE applications:

  • You can add an application element in server.xml.
  • Alternatively you can copy the application into the dropins directory of the Liberty JVM server. If you use dropins, CICS® is will always run under the transaction CJSA and will not benefit from extra qualities of service such as CICS security.
Note:
  • Do not use both techniques to deploy the same application into the same JVM server.
  • If you accept the defaults that are provided by CICS autoconfigure, the dropins directory is not automatically created.

Procedure

  • To deploy an application by adding it to the server configuration file:

    You must configure the following attributes for the application element in the server.xml:

    • id - Must be unique and is used internally by the server.
    • name - Must be unique.
    • type - Specifies the type of application. The supported types are WAR, EBA, and EAR.
    • location - Specifies the location of the application. The location can be an absolute path or a URL.
    For example:
    <application
        id="com.ibm.cics.server.examples.wlp.tsq.app"
        name="com.ibm.cics.server.examples.wlp.tsq.app"
        type="eba"
        location="${server.output.dir}/path_to_app"/>
  • To create the dropins directory and deploy applications to it:
    1. To enable dropins, you need to add configuration that is similar to the following example to your server.xml:
      <applicationMonitor dropins="dropins" dropinsEnabled="true" pollingRate="5s" 
      updateTrigger="disabled"/>

      For more information, see Controlling dynamic updates.

    2. Use FTP to transfer the exported file in binary mode to the dropins directory. The directory path is WLP_USER_DIR/servers/server_name/dropins, where server_name is the value of the com.ibm.cics.jvmserver.wlp.server.name property. If the property is not set, the property is defaultServer.

Results

The Liberty JVM server installs the application.

What to do next

Access the Java EE application from a web browser to ensure that it is running correctly. To remove the application file, delete the WAR, EBA or EAR file from the dropins directory. If it was deployed with an application element, remove that element from server.xml.