J Boss 7 Installation

Ratings:
(4)
Views:0
Banner-Img
  • Share this blog:

J Boss 7 Installation

This is an introduction to the newest JBoss AS 7 which appeared in the download section for the first time in Nov 2010. JBoss application server can be freely downloaded from the community site: http://www.jboss.org/jbossas/downloads/ JBoss AS 7 does not come with an installer; it is simply a matter of extracting the compressed archive. After you have installed JBoss, it is wise to perform a simple startup test to validate that there are no major problems with your Java VM/operating system combination. To test your installation, move to the bin directory of your JBOSS_HOME directory and issue the following command:

standalone.bat # Windows users
$ standalone.sh # Linux/Unix users

The above command starts up a JBoss standalone instance that's equivalent of starting the application server with the run.bat/run.sh script used by earlier AS releases. You will notice how amazingly fast is starting the new release of the application server; this is due to the new modular architecture, which only starts up necessary parts of the application server container needed by loaded applications. If you need to customize the startup properties of your application server, then you need to open the standalone.conf (or standalone.conf.bat for the Windows users) where the memory requirements of JBoss are declared. Here's the Linux core section of it:  

if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.
warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.
server.gcInterval=3600000"
fi

So, by default, the application server starts with a minimum memory requirement of 64MB of heap space and a maximum of 512MB. This will be just enough to get started, however, if you need to run a core Java EE application on it, you will likely require at least 1GB of heap space or 2GB or more depending on your application type. Generally speaking, 32-bit machines cannot execute a process whose space exceeds 2GB, however on 64 bit machines, there's essentially no limit to process size. You can verify that the server is reachable from the network by simply pointing your browser to the application server's welcome page, which is reachable by default at the well-known address: http://localhost:8080 Connecting to the server with the command line interface If you have been using previous releases of the application server you might have heard about the twiddle command -line utility that queried the MBeans installed on the application server. This utility has been replaced by a more sophisticated interface named the Command Line Interface (CLI), which can be found in the JBOSS_HOME/bin folder. Just launch the jboss-cli.bat script (or jboss-admin.sh for Linux users) and you will be able to manage the application server via a shell interface. Now issue the connect [Ipaddress:port] command to connect to the management interface:

[disconnected /] connect
Connected to localhost:9999

Connecting to a remote host
Inclined to build a profession as JBOSS Developer?
Then here is the blog post on JBOSS Training Program

JBoss AS 7 introduction

After you have installed JBoss, it is wise to perform a simple startup test to validate that there are no major problems with your Java VM/operating system combination. To test your installation, move to the bin directory of your JBOSS_HOME directory and issue the following command:

standalone.bat # Windows users
$ standalone.sh # Linux/Unix users

The above command starts up a JBoss standalone instance that's equivalent of starting the application server with the run.bat/run.sh script used by earlier AS releases. You will notice how amazingly fast is starting the new release of the application server; this is due to the new modular architecture, which only starts up necessary parts of the application server container needed by loaded applications. If you need to customize the startup properties of your application server, then you need to open the standalone.conf (or standalone.conf.bat for the Windows users) where the memory requirements of JBoss are declared. Here's the Linux core section of it:  

if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.
warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.
server.gcInterval=3600000"
fi

 So, by default, the application server starts with a minimum memory requirement of 64MB of heap space and a maximum of 512MB. This will be just enough to get started, however, if you need to run a core Java EE application on it, you will likely require at least 1GB of heap space or 2GB or more depending on your application type. Generally speaking, 32-bit machines cannot execute a process whose space exceeds 2GB, however on 64 bit machines, there's essentially no limit to process size. You can verify that the server is reachable from the network by simply pointing your browser to the application server's welcome page, which is reachable by default at the well-known address: http://localhost:8080 Connecting to the server with the command line interface If you have been using previous releases of the application server you might have heard about the twiddle command -line utility that queried the MBeans installed on the application server. This utility has been replaced by a more sophisticated interface named the Command Line Interface (CLI), which can be found in the JBOSS_HOME/bin folder. Just launch the jboss-cli.bat script (or jboss-admin.sh for Linux users) and you will be able to manage the application server via a shell interface. Now issue the connect [Ipaddress:port] command to connect to the management interface:

[disconnected /] connect
Connected to localhost:9999

Connecting to a remote host

 Starting from the 7.1.0 release there is security enabled by default on the AS 7.1 distribution for remote clients. Thus management interfaces are secured by default to prevent unauthorized remote access whilst still allowing access for local users for an easier out of the box experience.

If you are connecting to a remote host controller, then you need to provide your credentials:

./jboss-cli.sh --connect 192.168.1.1
 Authenticating against security realm: 192.168.1.1
 Username:admin
 Password:*****
 Connected to standalone controller at 192.168.1.1:9999
 [standalone@192.168.1.1:9999 /]

Stopping JBoss Probably the easiest way to stop JBoss is by sending an interrupt signal with Ctrl+C. However, if your JBoss process was launched in the background or rather is running on another machine (see next), then you can use the CLI interface to issue an immediate shutdown command:

[disconnected /] connect
Connected to localhost:9999
[localhost:9999 /] :shutdown

 There is actually one more option to shutdown the application server, which is pretty useful if you need to shut down the server from within a script. This option consists of passing the --connect option to the admin shell, thereby switching off the interactive mode:

jboss-cli.bat --connect command=:shutdown # Windows
jboss-cli.sh --connect command=:shutdown # Unix / Linux

Restarting JBoss The command-line Interface contains a lot of useful commands. One of the most interesting options is the ability to reload all or parts of the AS configuration using the reload command . When issued on the root node path of the AS server, it is able to reload the services configuration:

[disconnected /] connect
Connected to localhost:9999
[localhost:9999 /] :reload

The new server structure The first thing you'll notice when you browse through the application server folders is that its file system is basically divided into two core parts: the dichotomy reflects the distinction between standalone servers and domain servers. Capture.1 A JBoss domain is used to manage and coordinate a set of application server instances. JBoss AS 7 in domain mode spawns multiple JVMs which build up the domain. Besides the AS instances, two more processes are created: the Domain Controller which acts as management control point of the domain and the Host Controller which interacts with the domain Controller to control the lifecycle of the AS instances. Capture.2 Applications are deployed differently depending on the type of server. If you are deploying to a domain of servers then you need the Command Line Interface because the application server needs to be informed on which server group/s  the deployment is targeted. Ex. Deploy an application on all server groups:  

deploy MyApp.war --all-server-groups

Ex. Deploy an application on one or more server groups (separated by a comma): deploy application.ear --server-groups=main-server-group If you are deploying to a standalone server then you can either use the CLI or drop the deployment unit into the server deployments folder. As soon as the deployer HD scanner detects the application, the module is moved to the work folder of the application, leaving a placeholder Test.war.deployed file in the deployments folder. Capture.3 Note: With the default configuration, packaged archives (.ear, .war, .jar, .sar) are automatically deployed. Exploded archives need adding a .do-deploy empty file in the deployments folder to trigger deployment.

For indepth understanding on JBoss click on:

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox