Managing JBoss Servers with JBoss ON
real scenarios for managing EAP instances
Abstract
1. Managing JBoss Products with JBoss ON
2. Deploying Applications on JBoss Instances
2.1. Deploying EAR and WAR Files
- Search for the JBoss server instance to which to deploy the EAR or WAR.
- On the details page for the selected JBoss server instance, open the Inventory tab.
- In the Create New drop-down menu, select the item for or , as appropriate.
- In the resource form, enter the information for the application to be deployed. Aside from the obvious settings, like the resource name, the WAR or EAR resource entry requires the following information:
- The package name that the EAR or WAR file will be deployed as. In other words, the target entry name.
- The package architecture.
Note
For EAR and WAR deployment, the package architecture should always benoarch. - The full path to the file to be deployed, in the File field.
- Whether the file should be unzipped when it is deployed.
- The path to the directory to which to deploy the EAR or WAR package. The destination directory is relative to the JBoss server instance installation directory; this cannot contain an absolute path or go up a parent directory.
2.2. Deploying Data Sources
- Search for the JBoss server instance to which to deploy the data source.
- On the details page for the selected JBoss server instance, open the Inventory tab.
- In the Create New drop-down menu, select the item for .
- Select a template for the data source. There are three data sources templates to populate a data source with common information:
- The default template is used with SQL databases like PostgreSQL or MySQL
- The Oracle Local TX is used for Oracle databases with local transactions.
- The Oracle XA template is used for Oracle databases with XA transactions.
- Along with the obvious settings, like the resource name, enter the information for the specific child resource to be deployed:
- The type of data source to create, either No TX Data Sources, Local TX Data Sources or XA Data Sources
- A unique JNDI name for the DataSource wrapper to use to bind under
- The fully qualified name of the JDBC driver or DataSource class, such as
org.postgresql.Driver - The JDBC driver connection URL string, such as
jdbc:postgresql://127.0.0.1:5432/foo - The username and password to use to connect to the data source
- The minimum and maximum connection pool sizes for this data source
Additional settings are available under the Advanced Settings area. These are the same as the advanced settings available when the JBoss ON server is installed.
2.3. Deploying Connection Factories
- Search for the JBoss server instance to which to deploy the connection factory.
- On the details page for the selected JBoss server instance, open the Inventory tab.
- In the Create New drop-down menu, select the item for .
- Along with the obvious settings, like the resource name, enter the information for the specific child resource to be deployed:
- The type of connection factory to create, either tx-connection-factory (transaction) or no-tx-connection-factory (no transaction)
- A unique JNDI name for the DataSource wrapper to use to bind under
- The username and password to use to connect to the data source
- The minimum and maximum connection pool sizes for this data source
Additional settings are available under the Advanced Settings area. These are the same as the advanced settings available when the JBoss ON server is installed.
2.4. Configuring JMS Queues and Topics
- Search for the JBoss messaging service to which to deploy the JMS queue or topic.
- On the details page for the selected JBoss messaging service, open the Inventory tab.
- In the Create New drop-down menu, select the item for or , as appropriate.
- Aside from the obvious settings, like the resource name, the JMS Queue or JMS Topic entry requires two additional parameters:
- The name of the queue or topic to use as the JMX object name
- A unique JNDI name for the DataSource wrapper to use to bind under
Additional settings are available under the Advanced Settings area. These are the same as the advanced settings available when the JBoss ON server is installed.
2.5. Updating and Deleting Applications on JBoss Servers
- Browse to the EAR or WAR resource in the JBoss ON UI.
- In the EAR or WAR resource details page, open the Content tab, and click the New subtab.

- Click the button.
- Click the button.

- In the pop-up window, click the Add button, and browse the local filesystem to the updated WAR or EAR file to be uploaded.

- Click the UPLOAD button to load the file and dismiss the window.
- In the main form, select the repository where the WAR or EAR file package should be stored. If one exists, select an existing repository or a subscribed repository for the resource. Otherwise, create a new repository.
- Confirm the details for the new package, then click .


Figure 1. Deployment History for a Resource
Note
3. Applying JBoss Patches
3.1. Supported JBoss Products for Patch Updates
Note
Note
3.2. Situations That Can Require Manual Steps
- The file to be patched is not present in the configuration.
- There are files that need to be removed manually.
- Configuration files, such as XML or Java properties files, require patches that need to be applied manually.
- Seam is being used and must be patched manually.
3.3. Enabling the Default JBoss Patch Content Source
Note
- In the Administration tab in the top menu, open the menu and select the Content Sources item.
- Click the JBoss CSP Patch Feed source.

- Click the Edit button at the bottom of the CSP Feed Settings area to modify the content source.
- Fill in the required connection information.

- The Customer Support Portal username and password
- The URL for the content source (https://access.redhat.com/jbossnetwork/restricted/feed/software.html?product=all&downloadType=all&flavor=rss&version=&jonVersion=2.0)
- The activation state (Yes)
Most of the default settings, such as the schedule, can be kept.Important
Keep the Lazy Load checkbox activated, or all patches defined in the RSS feed, 1 GB of data, is preemptively downloaded by the JBoss ON server. - Click .
- Optionally, use button to force the content source to pull down the latest RSS Feed and synchronize it with the local data. The history of synchronization attempts is listed in the Synchronization Results section.
3.4. Subscribing a Specific Resource to the Default JBoss Patch Repository
- In the Resources item in the top menu, go to the Servers item.
- Search for the JBoss instance to subscribe to the repository.
- On the JBoss server resource's entry page, open the Content tab and select the Subscriptions subtab. The JBoss patches repository is listed as available for subscription.

- Select the checkbox beside the JBoss patches repository, and click the button. When the assignment is complete, the repository is listed under the Current Resource Subscriptions area, rather than Available Repositories.

3.5. Subscribing Multiple JBoss Resources to the Default JBoss Patch Repository
- In the Administration tab in the top menu, open the menu and select the Repositories item.
- Click the JBoss Patch Channel.The JBoss patch repository is associated with the JBoss patch content source by default. To associate the repository to another content source, click the button and assign the content source.
- In the main page for the repository, click the button to subscribe JBoss resources to the patch repository.
- In the search area, select Server in the drop-down menu.
- Select all the JBoss server instance resources to subscribe to this repository.
3.6. Applying a Patch
- Stop the JBoss instance.
- In the Resources item in the top menu, go to the Servers item.
- Search for the JBoss instance to patch.
- On the JBoss server resource's entry page, open the Content tab and select the New subtab. This lists all of the packages and patches which are available for that specific resource type.
- Select the checkboxes beside the names of the patched to install, and click the button.

- Review the information on the page and verify everything is correct. Click the VIEW link in the Instructions column to review the steps that will be performed during the package installation process.

- Optionally, enter any notes to describe the patch deployment or environment.
- Click the button to install the updates. The patch process runs in the background; the progress can be viewed in the History subtab of the Content tab.
- When the installation process is complete, the patch job is listed in the Completed Requests area. Clicking the button displays the list of steps that performed in the process and whether they succeeded, failed, or were skipped.

- When the patch process is complete, start the JBoss instance.
4. Managing mod_cluster Deployments
mod_cluster module provides intelligent, dynamic load balancing for web applications. There are two halves to mod_cluster: one in the JBoss application server (which manages the web application contexts) and one in the HTTP server (which manages sessions and routing). JBoss ON monitors and manages the mod_cluster module within the JBoss server.
Note
mod_cluster version 1.1.2. This version of mod_cluster is not currently supported on JBoss EAP or the httpd service on Red Hat Enterprise Linux.
4.1. About mod_cluster
mod_cluster is an HTTP load balancer that provides a level of intelligence and control over web applications that is not available with other HTTP load balancers. mod_cluster has lots of features that improve performance and management, but two are crucial:
- By using multicast (advertising),
mod_clustersignals workers what proxy servers are available, so workers can register themselves dynamically with the cluster domain. - Using a special communication layer between the JBoss server and the HTTP server,
mod_clustercan not only register when a web context is enabled but also when it is disabled and removed from load balancing. This allowsmod_clusterto handle full web application life cycles.
mod_cluster is in the product documentation at http://www.jboss.org/mod_cluster.
mod_cluster has two modules: one for the HTTP server which handles routing and load balancing and one for the JBoss server to manage the web application contexts. Both modules must be installed and configured for the cluster to function.

Figure 2. The mod_cluster Topology
mod_cluster domain is imported as a child resource for the JBoss server. The web application contexts are listed as children resources for the cluster, with contexts as children within the mod_cluster module.

Figure 3. The mod_cluster Resource Hierarchy
Important
mod_cluster module in the HTTP server is configured externally from JBoss ON and is not managed by JBoss ON.
mod_cluster module in the JBoss server can be managed by JBoss ON, and it is critical that the cluster is properly configured in order for JBoss ON to manage its resources. JBoss ON detects mod_cluster like any other JMX resource (such as Hibernate).
mod_cluster:
4.2. Managing mod_cluster
mod_cluster properties provide direct management over how the mod_cluster domain operates. Almost any part of the mod_cluster configuration can be managed through JBoss ON, but two elements are critical for domain behavior:
- How the
mod_clusterdomain handles sticky sessions. Sticky sessions are enabled inmod_clusterby default, but this can be disabled or its behavior can be changed through the configuration properties. - Enabling advertising (multicast).
mod_clustercan send the JBoss information to any VirtualHost configured in the HTTP server. This allows workers to find the cluster and register themselves with the JBoss server dynamically.

Figure 4. Setting Server-Level Properties
mod_cluster domain domain. The obvious ones that impact the web application contexts are enabling and disabling all contexts. The other options are used to reset the mod_cluster domain after an error (reset the node) or reload the cluster configuration after making changes to the cluster properties.

Figure 5. Running Server-Level Operations
4.3. Managing Web Applications Contexts
mod_cluster load-balancing cluster.
mod_cluster domain.

Figure 6. Running Web Application Context Operations
5. Document Information
5.1. Giving Feedback
- Select the Other products group.
- Select RHQ Project from the list.
- Set the component to Documentation.
- Set the version number to 3.0.
- For errors, give the page number (for the PDF) or URL (for the HTML), and give a succinct description of the problem, such as incorrect procedure or typo.For enhancements, put in what information needs to be added and why.
- Give a clear title for the bug. For example,
"Incorrect command example for setup script options"is better than"Bad example".
5.2. Document History
| Revision History | |||
|---|---|---|---|
| Revision 3.0-5 | 2013-10-31 | ||
| |||
| Revision 3.0-0 | December 5, 2011 | ||
| |||
Index
J
- JBoss
- applying patches, Applying JBoss Patches
- enabling the default patch content source, Enabling the Default JBoss Patch Content Source
- managing and configuring, Managing JBoss Products with JBoss ON
- subscribing resources to the default patch, Subscribing Multiple JBoss Resources to the Default JBoss Patch Repository
P
- patches
- applying, Applying a Patch
R
- resources
- child
- connection factories, Deploying Connection Factories
- data sources, Deploying Data Sources
- EAR and WAR, Deploying EAR and WAR Files
- jms queues and topics, Configuring JMS Queues and Topics
- child types, Deploying Applications on JBoss Instances
- managing and configuring JBoss products, Managing JBoss Products with JBoss ON
