Configuring a Liberty JVM server
Configure the Liberty JVM server if you want to deploy Java EE applications such as EJBs, JSP, JSF and servlets.
About this task
- Autoconfigure
- CICS® automatically creates and updates the configuration file for Liberty, server.xml, from templates that are supplied in the CICS installation directory. Autoconfigure gets you started quickly with a minimal set of configuration values in Liberty. To enable autoconfigure, set the JVM system property, -Dcom.ibm.cics.jvmserver.wlp.autoconfigure property to true. If you are defining the JVM server in a CICS bundle, set this option.
- Manually configuring
- This is the default setting. You supply the configuration files and all values. Manually configuring is appropriate where you want to remain in full control of the Liberty server configuration.
To define the JVM server, see Ways of defining CICS resources.
Procedure
Results
The JVMSERVER reads the JVM profile and initializes itself based on the provided settings. If autoconfigure is enabled and a Liberty server configuration does not exist, it will be created. If autoconfigure is not enabled and there is no configuration, or the configuration is incorrect, the JVMSERVER will become DISABLED and report an appropriate failure. On subsequent start up, the JVMSERVER will use the existing configuration and launch the Liberty server instance. When the JVMSERVER completes startup successfully, the JVMSERVER resource installs in the ENABLED state.
If an error occurs, for example, CICS is unable to find or read the JVM profile, the JVM server fails to initialize. The JVM server is installed in the DISABLED state and CICS issues error messages to the system log. See Troubleshooting Liberty JVM servers and Java web applications for help. To confirm that Liberty successfully started within your JVM server, consult the messages.log file in the WLP_USER_DIR output directory on zFS.
What to do next
- Run the CICS Liberty default web application to verify the Liberty JVM server is running by using the following URL:
http://server:port/com.ibm.cics.wlp.defaultapp/
. For more information, see Configuring the CICS Default Web Application. - Specify any directories that contain native C dynamic link library (DLL) files, such as IBM MQ. Middleware and tools that are supplied by IBM or by vendors might require DLL files to be added to the library path.
- Add support for security. See Configuring security for a Liberty JVM server.
- Install the Java EE applications (EAR files, WAR files, and EBA files), as described in Deploying a Java EE application in a CICS bundle to a Liberty JVM server.
- Liberty bootstrap properties can be placed in the JVM profile to achieve the same effect as using a Liberty bootstrap.properties file.
- By default, Liberty and OSGi caches are not cleared on start-up of the JVM server. Should you encounter caching issues, or receive guidance from the IBM Service team to clean your server, this can be achieved by using one of two approaches:
- Add
-Dcom.ibm.cics.jvmserver.wlp.args=--clean
to your JVM profile. - Add
-Dorg.osgi.framework.storage.clean=onFirstInit
to your JVM profile.
In both cases, remove the option once the server has started to ensure subsequent restarts are not performance impacted.
- Add
- Be aware that by default, when Liberty is configured, two defaulted settings are applied but are not visible in
server.xml
. See CICS Liberty defaulted settings for more information. - For more information on general Liberty set up see this overview on Liberty, Liberty overview.