wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes JBOSS 5.1 GA - How to start/stop application using command prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBOSS 5.1 GA - How to start/stop application using command prompt" Watch "JBOSS 5.1 GA - How to start/stop application using command prompt" New topic
Author

JBOSS 5.1 GA - How to start/stop application using command prompt

kunu patil
Greenhorn

Joined: Sep 24, 2007
Posts: 20
Hi

I am using JB0ss 5.1 GA. Is it possible to start/stop an application, deployed in default server configuration, using command prompt?

For example, I have two applications app1 and app2 deployed in default server config. Is there any command to stop app1 using command prompt, without stopping app2?

I understand that same can be done using admin-console, but if in case it is not possible to access it, how can we start/stop appliactions?

Thanks.
Kunal
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

You can use the twiddle.bat (windows) or twiddle.sh (UNIX/Linux/Mac) - which is the Command Line Access to JMX (the admin web page)


Regards, Rene Larsen
Dropbox Invite
kunu patil
Greenhorn

Joined: Sep 24, 2007
Posts: 20
Thanks Rene,

I ran command to find all the listed applications on the server.

However, when I used following command:

, I got as response on the command prompt. This application (Test1.war) was listed in the output of previous command. Also, when I checked through admin-console, the application was still up. Could you please tell if there is any mistake in the command or what is the reason of getting ?

Thanks
Kunal
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

I don't think that there is anything wrong with the return status - it is just an empty message.

If you look at the Results when you start/stop an Application from inside the admin-console, you'll see this line: "The operation did not return any results."

You'll not be able to see that the Application has been stopped in admin-console, when started/stopped from the jmx-console web page (what twiddle also is using).

The two 'admin' web pages admin-console and jmx-console are working independently of each other.
The still new admin-console is using SEAM to control the 'jobs', and the 'old' jmx-console is using .... JMX.

As far as I know there doesn't exist a command line tool (not yet??) for the admin-console.

In jmx-console you'll start/stop your web Applications under "jboss.web.deployment" - but monitor if they are available under "jboss.web" (this is the way I'm able to do it).

When you stop your Application it is undeployed, and removed from the "jboss.web" view - but not removed from the deploy folder - and when you start your Application it is deployed, and added to the "jboss.web" view again.

In the JBoss AS console (or log) you'll see the output from both the admin-console and the jmx-console.
kunu patil
Greenhorn

Joined: Sep 24, 2007
Posts: 20
Thanks a lot Rene for the detailed reply.

Yes, I saw the message after starting/stopping the web apps from JMX Console. Also, verfied that application shuts down after stop command , in logs as well as in "jboss.web" for the same could be seen.

Your reply really helped.

Regards
Kunal

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JBOSS 5.1 GA - How to start/stop application using command prompt