Topic
  • 6 replies
  • Latest Post - ‏2014-01-13T19:14:41Z by MyScreen2
MyScreen2
MyScreen2
41 Posts

Pinned topic Liberty Profile Start/Stop Web Application (WAR)

‏2014-01-13T12:51:47Z |

If I have several large WAR files installed in Liberty Profile under the 'apps' folder, how can I start and stop them individually?

  • bergmark
    bergmark
    42 Posts
    ACCEPTED ANSWER

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T14:18:11Z  

    You may be able to start/stop applications from the ApplicationMBean.  Some information about the mbeans available in Liberty here:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.wlp.nd.doc%2Fae%2Frwlp_mbeans_list.html

  • Alasdair
    Alasdair
    55 Posts
    ACCEPTED ANSWER

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T19:09:12Z  

    Everything in the Repository seems to be Collective related - does that matter if I do not use Collectives?  Also, I did not see anything for start/stop Application but maybe I just missed it.

    You are right we don't, but you can take the examples from one of the scripts and modify it to call a single server application mbean to start and stop applications.

    Thanks
    Alasdair

  • bergmark
    bergmark
    42 Posts

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T14:18:11Z  

    You may be able to start/stop applications from the ApplicationMBean.  Some information about the mbeans available in Liberty here:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.wlp.nd.doc%2Fae%2Frwlp_mbeans_list.html

  • MyScreen2
    MyScreen2
    41 Posts

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T14:46:11Z  
    • bergmark
    • ‏2014-01-13T14:18:11Z

    You may be able to start/stop applications from the ApplicationMBean.  Some information about the mbeans available in Liberty here:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.wlp.nd.doc%2Fae%2Frwlp_mbeans_list.html

    This looks like it may work (I just need to figure it out...).  Unfortunately I am not a java developer and jconsole is new to me.  My only dealings with MBeans was generating the web server plugin.

     

    Do you happen to know if a start app and stop app command might be on a list of enhancements in Liberty?  If I understand this works correctly I would have to start jconsole with the same jvm version as my jre, then go through the UI to find the appropriate MBean to execute the Start/Stop.  I am trying to automate the install/update process so I need a command or bat file.  I am just wondering if this might be something that may be provided in the future.

     

    I would hope that generating the plugin might fall into this same category.

  • Alasdair
    Alasdair
    55 Posts

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T17:29:04Z  

    This looks like it may work (I just need to figure it out...).  Unfortunately I am not a java developer and jconsole is new to me.  My only dealings with MBeans was generating the web server plugin.

     

    Do you happen to know if a start app and stop app command might be on a list of enhancements in Liberty?  If I understand this works correctly I would have to start jconsole with the same jvm version as my jre, then go through the UI to find the appropriate MBean to execute the Start/Stop.  I am trying to automate the install/update process so I need a command or bat file.  I am just wondering if this might be something that may be provided in the future.

     

    I would hope that generating the plugin might fall into this same category.

    Hi,

    We have a set of scripts in the Liberty repository that show how to call MBeans from a scripting environment. Does this meet your needs? 

    There is a Java tool in github here: https://github.com/notatibm/Liberty-Tools for generating the plugin.

    Thanks
    Alasdair

  • MyScreen2
    MyScreen2
    41 Posts

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T17:53:30Z  
    • Alasdair
    • ‏2014-01-13T17:29:04Z

    Hi,

    We have a set of scripts in the Liberty repository that show how to call MBeans from a scripting environment. Does this meet your needs? 

    There is a Java tool in github here: https://github.com/notatibm/Liberty-Tools for generating the plugin.

    Thanks
    Alasdair

    Everything in the Repository seems to be Collective related - does that matter if I do not use Collectives?  Also, I did not see anything for start/stop Application but maybe I just missed it.

  • Alasdair
    Alasdair
    55 Posts

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T19:09:12Z  

    Everything in the Repository seems to be Collective related - does that matter if I do not use Collectives?  Also, I did not see anything for start/stop Application but maybe I just missed it.

    You are right we don't, but you can take the examples from one of the scripts and modify it to call a single server application mbean to start and stop applications.

    Thanks
    Alasdair

  • MyScreen2
    MyScreen2
    41 Posts

    Re: Liberty Profile Start/Stop Web Application (WAR)

    ‏2014-01-13T19:14:41Z  
    • Alasdair
    • ‏2014-01-13T19:09:12Z

    You are right we don't, but you can take the examples from one of the scripts and modify it to call a single server application mbean to start and stop applications.

    Thanks
    Alasdair

    OK, I just wanted to make sure I understood what you described.  I will look into customizing them.

     

    Thanks!