Advertise with us

Search Mastertheboss

Our eBooks

How to deploy an application remotely with JBoss AS ?

JBoss AS 7

If you are running JBoss AS 7 there are several choices for deploying your application remotely.  You can opt for:
  • Web Administration Console
  • Command Line Interface
The simplest is using the Web Administration console (http://remotehost:9990/console). There, once authenticated, move to the Runtime Tab and select "Deployments".
jboss remote deploy deployment
You can deploy a new application using the "Add Content" button, which will let you upload the application from remote. Remember that the application needs to be enabled in order to be accessible.
jboss remote deployment howto
If you prefer the Command Line Interface, you can connect on the remote host which is running the remote controller
connect 192.168.1.1
Connected to standalone controller at 192.168.1.1:9999 [This email address is being protected from spambots. You need JavaScript enabled to view it..1.1:9999 /]

Now to deploy an application, all that's necessary is to type in deploy and the path to the package (the tab-completion will help to navigate the filesystem), e.g.
[This email address is being protected from spambots. You need JavaScript enabled to view it..1.1:9999 /] deploy ../test-app.war   
'test-app.war ' deployed successfully.

To undeploy this application its name has to be passed in as the argument to undeploy (if you type in undeploy, the tab-completion will list all the deployed applications and help complete the deployment name), e.g.
[This email address is being protected from spambots. You need JavaScript enabled to view it..1.1:9999 /] undeploy test-app.war
Successfully undeployed test-app.war.

JBoss AS 5-6

If you are running a JBoss AS release 5.1.x/6.x, there's a web application named admin-console which is going to replace the jmx-console for monitoring the application server.

You can launch it this way:
http://xx.xx.xx.xx/admin-console
(Replace the xx.xx.xx.xx with your IP Address)

Now, in order to deploy an application select in the left tree view the type of Application you wish to deploy (Web, EJB or other) and click on the folder node.


jboss deploy application remotely

In the central frame just select "Add a new resource" and upload your application.

JBoss AS 4

JBoss AS 4 does not ship with a friendly management console, however you can use the twiddle  command line utility to achieve some advanced administration tasks.
We can deploy stuff with:

 

./twiddle.sh -u admin -p <password -s 192.168.1.1 invoke "jboss.system:service=MainDeployer" deploy /tmp/sample.war                        
and we can see it is deployed with:
./twiddle.sh -u admin -p <password> -s 192.168.1.1 query 'jboss.web.deployment:*'    
© 2020 mastertheboss.com. All Rights Reserved.

Please publish modules in offcanvas position.