WebSphere Application Server & Liberty

 View Only
  • 1.  Liberty - command line restart of single app

    Posted Wed January 25, 2023 09:18 AM
    Hi Liberty Community - 1st post here

    IBM ELM/Jazz runs a Liberty Reporting server that has 2 apps which are sensitive to start up timing in our main vmware field demo template

    app2(rs) reports problems registering with app1 (lqe) if it(rs) starts too early and its an ugly path for new users to remedy
    - noting that startAfter in application.properties is already used for app2(rs) after app1(lqe)

    wanted to avoid splitting these two into seperate services and delaying app2(rs) so I want to try to restart app2(rs) some time after start up via a separate service - but there doesnt appear to be a restart command
    Starting and stopping a server from the command line

    Any way to do a programmatic restart of a single Liberty app ?
    Thanks

    ------------------------------
    Gray Bachelor
    ------------------------------


  • 2.  RE: Liberty - command line restart of single app

    IBM Champion
    Posted Wed January 25, 2023 09:28 AM
    Hi,

    Indeed there is no restart command line, what i suggest is that you write a script that do the following :

    - Stop the instance 
    - Make a loop to check if the process is stopped using ps -ef and grep on the pid (when u start the instance a file is created which have the pid)
    - Start the instance once the process is stopped

    Hope it helps.

    Good luck

    ------------------------------
    Largou walid
    ------------------------------



  • 3.  RE: Liberty - command line restart of single app

    Posted Wed January 25, 2023 11:20 AM
    Edited by Alasdair Nottingham Wed January 25, 2023 11:20 AM
    There isn't a command line as you have observed. There is a JMX MXBean for applications and it has a restart method.

    ------------------------------
    Alasdair Nottingham
    ------------------------------