How to reload an application WAR in JBoss using twiddle utility?


Enabling JMX in JBoss

To enable JMX access to JBoss, add the following arguments to JBoss VM args:

-Dcom.sun.management.jmxremote

The above line will enable only local monitoring. To enable remote JMX connection we need to specify the port which the JMX server will listen for remote connections.

-Dcom.sun.management.jmxremote.port=9004 (or any other port number)

The JMX remote connection is secured by default. To disable the authentication or the SSL in the JMX remote connection:

-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

This, I guess, needs to be added in [JBOSS_HOME]/bin/run.conf file.

Reload a WAR

If JBoss is running in Unix/Linux machines, the following command will do the reload.

[JBOSS_HOME]/bin/twiddle.sh invoke jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/[App_Name] reload

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 27 other followers

%d bloggers like this: