IBM Support

Sample applications provided by Jazz for Service Management Registry can be deployed in WebSphere Liberty Profile too.

Technical Blog Post


Abstract

Sample applications provided by Jazz for Service Management Registry can be deployed in WebSphere Liberty Profile too.

Body

The Jazz for Service Management Registry sample applications are already seen running on the Apache Tomcat and WebSphere Application Servers. Now, with the advent of the WebSphere Liberty Profile, we have the opportunity to get these samples up and running even faster.
 
Steps to deploy the application on WAS liberty profile
  • Install the WebSphere Liberty Profile.
  • Create two server profiles for deploying the sample applications - “GenericServer” for deploying SampleProvider and "PreviewServer" for deploying PreviewDemo. Open a command prompt and cd to % WAS_LIBERTY_ROOT%/bin. One needs to provide the server name in the command. Issue the following commands to create the servers:
server.bat create  GenericServer
server.bat create  PreviewServer
Verify that the servers are created under % WAS_LIBERTY_ROOT%/usr/servers. The directory should list GenericServer and PreviewServer directories.
Now, create apps directory under each of those directories.
Replace the server.xml inside GenericServer directory with below.
<server description="new server">
    <featureManager>
        <feature>servlet-3.0</feature>
        <feature>jsp-2.2</feature>
        <feature>localConnector-1.0</feature>
        <feature>jaxrs-1.1</feature>
       <feature>restConnector-1.0</feature>
       <feature>serverStatus-1.0</feature>
    </featureManager>
    <httpEndpoint id="defaultHttpEndpoint"    host="*"  httpPort="9999"  httpsPort="8888" />
    <applicationMonitor updateTrigger="mbean"/>
    <application id="GenericProvider" location="GenericProvider.war" name="GenericProvider" type="war"  context-root="GenericProvider"/>
</server>

Replace the server.xml inside PreviewServer directory with below
<server description="new server">
     <featureManager>
        <feature>servlet-3.0</feature>
        <feature>jsp-2.2</feature>
        <feature>localConnector-1.0</feature>
        <feature>jaxrs-1.1</feature>
       <feature>restConnector-1.0</feature>
       <feature>serverStatus-1.0</feature>
    </featureManager>
    <httpEndpoint id="defaultHttpEndpoint"   host="*"   httpPort="9991"  httpsPort="8881" />
    <applicationMonitor updateTrigger="mbean"/>
    <application id="PreviewDemo" location="PreviewDemo.war" name="PreviewDemo" type="war" autoStart="true" context-root="/PreviewDemo"/>
</server>

NOTE : During replacement of GenericServer's and PreviewServer's server.xml, look for the httpEndpoint xml tag and verify that its httpPort and httpsPort are not in use. If so modify them to use free ports.
  • Deploying sample applications
GenericProvider sample app - Build the GenericProvider applications by executing the build.xml as specified in the readme.txt of this application. Unzip the GenericProvider.war to GenericProvider.war directory  inside the % WAS_LIBERTY_ROOT%/usr/servers/GenericServer/apps directory. This is due to a restriction in the Websphere Liberty Profile 8.5 mentioned in link:
  
PreviewDemo sample app -  Build the PreviewDemo applications by executing the build.xml as specified in the readme.txt of this application. Now, copy the PreviewDemo.war to %WAS_LIBERTY_ROOT%/usr/servers/PreviewServer/apps directory(Unzipping the war is not required as the restriction does not apply to this web application).
  • Running the applications
Start GenericProvider sample application by issue the following command in a command prompt:
    cd %WAS_LIBERTY_ROOT%/bin
    server.bat start GenericServer
                or
    server.bat run GenericServer
The latter one starts the server as a foreground process. You could view the logs in %WAS_LIBERTY_ROOT%/usr/servers/GenericServer/logs.

Similarly, start PreviewDemo sample application by issuing the following command from %WAS_LIBERTY_ROOT%/bin to start the server:
    server.bat start PreviewServer
              or
    server.bat run PreviewServer
  • Access the GenericProvider link at http://<host>:<port>/GenericProvider/* to activate the Listener. Check the http port in the server.xml for this server, default is 9999.
  • Verify that the demos are running correctly by accessing the PreviewDemo application.

[{"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Product":{"code":"SSHPN2","label":"Tivoli"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11275448