Getting Started Guide
For use with Red Hat JBoss Data Grid 6.4.1
Abstract
Part I. Introducing Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
Chapter 1. Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
- Schemaless key-value store – JBoss Data Grid is a NoSQL database that provides the flexibility to store different objects without a fixed data model.
- Grid-based data storage – JBoss Data Grid is designed to easily replicate data across multiple nodes.
- Elastic scaling – Adding and removing nodes is simple and non-disruptive.
- Multiple access protocols – It is easy to access the data grid using REST, Memcached, Hot Rod, or simple map-like API.
1.1. Supported Configurations Copy linkLink copied to clipboard!
1.2. Components and Versions Copy linkLink copied to clipboard!
1.3. Red Hat JBoss Data Grid Usage Modes Copy linkLink copied to clipboard!
- Remote Client-Server mode
- Library mode
1.3.1. Remote Client-Server Mode Copy linkLink copied to clipboard!
- easier scaling of the data grid.
- easier upgrades of the data grid without impact on client applications.
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME\bin\standalone.bat
$JBOSS_HOME\bin\standalone.bat
1.3.2. Library Mode Copy linkLink copied to clipboard!
- transactions
- listeners and notifications
1.4. Red Hat JBoss Data Grid Benefits Copy linkLink copied to clipboard!
Benefits of JBoss Data Grid
- Performance
- Accessing objects from local memory is faster than accessing objects from remote data stores (such as a database). JBoss Data Grid provides an efficient way to store in-memory objects coming from a slower data source, resulting in faster performance than a remote data store. JBoss Data Grid also offers optimization for both clustered and non clustered caches to further improve performance.
- Consistency
- Storing data in a cache carries the inherent risk: at the time it is accessed, the data may be outdated (stale). To address this risk, JBoss Data Grid uses mechanisms such as cache invalidation and expiration to remove stale data entries from the cache. Additionally, JBoss Data Grid supports JTA, distributed (XA) and two-phase commit transactions along with transaction recovery and a version API to remove or replace data according to saved versions.
- Massive Heap and High Availability
- In JBoss Data Grid, applications no longer need to delegate the majority of their data lookup processes to a large single server database for performance benefits. JBoss Data Grid employs techniques such as replication and distribution to completely remove the bottleneck that exists in the majority of current enterprise applications.
Example 1.1. Massive Heap and High Availability Example
In a sample grid with 16 blade servers, each node has 2 GB storage space dedicated for a replicated cache. In this case, all the data in the grid is copies of the 2 GB data. In contrast, using a distributed grid (assuming the requirement of one copy per data item, resulting in the capacity of the overall heap being divided by two) the resulting memory backed virtual heap contains 16 GB data. This data can now be effectively accessed from anywhere in the grid. In case of a server failure, the grid promptly creates new copies of the lost data and places them on operational servers in the grid. - Scalability
- A significant benefit of a distributed data grid over a replicated clustered cache is that a data grid is scalable in terms of both capacity and performance. Add a node to JBoss Data Grid to increase throughput and capacity for the entire grid. JBoss Data Grid uses a consistent hashing algorithm that limits the impact of adding or removing a node to a subset of the nodes instead of every node in the grid.Due to the even distribution of data in JBoss Data Grid, the only upper limit for the size of the grid is the group communication on the network. The network's group communication is minimal and restricted only to the discovery of new nodes. Nodes are permitted by all data access patterns to communicate directly via peer-to-peer connections, facilitating further improved scalability. JBoss Data Grid clusters can be scaled up or down in real time without requiring an infrastructure restart. The result of the real time application of changes in scaling policies results in an exceptionally flexible environment.
- Data Distribution
- JBoss Data Grid uses consistent hash algorithms to determine the locations for keys in clusters. Benefits associated with consistent hashing include:Data distribution ensures that sufficient copies exist within the cluster to provide durability and fault tolerance, while not an abundance of copies, which would reduce the environment's scalability.
- cost effectiveness.
- speed.
- deterministic location of keys with no requirements for further metadata or network traffic.
- Persistence
- JBoss Data Grid exposes a
CacheStoreinterface and several high-performance implementations, including the JDBC Cache stores and file system based cache stores. Cache stores can be used to populate the cache when it starts and to ensure that the relevant data remains safe from corruption. The cache store also overflows data to the disk when required to prevent running out of memory. - Language bindings
- JBoss Data Grid supports both the popular Memcached protocol, with existing clients for a large number of popular programming languages, as well as an optimized JBoss Data Grid specific protocol called Hot Rod. As a result, instead of being restricted to Java, JBoss Data Grid can be used for any major website or application. Additionally, remote caches can be accessed using the HTTP protocol via a RESTful API.
- Management
- In a grid environment of several hundred or more servers, management is an important feature. JBoss Operations Network, the enterprise network management software, is the best tool to manage multiple JBoss Data Grid instances. JBoss Operations Network's features allow easy and effective monitoring of the Cache Manager and cache instances.
- Remote Data Grids
- Rather than scale up the entire application server architecture to scale up your data grid, JBoss Data Grid provides a Remote Client-Server mode which allows the data grid infrastructure to be upgraded independently from the application server architecture. Additionally, the data grid server can be assigned different resources than the application server and also allow independent data grid upgrades and application redeployment within the data grid.
1.5. Red Hat JBoss Data Grid Version Information Copy linkLink copied to clipboard!
| JBoss Data Grid Product | Infinispan Version |
|---|---|
| JBoss Data Grid 6.0.0 | Infinispan 5.1.5 |
| JBoss Data Grid 6.0.1 | Infinispan 5.1.7 |
| JBoss Data Grid 6.1.0 | Infinispan 5.2.4 |
| JBoss Data Grid 6.2.0 | Infinispan 6.0.1 |
| JBoss Data Grid 6.3.0 | Infinispan 6.1.0 |
| JBoss Data Grid 6.3.1 | Infinispan 6.1.1 |
| JBoss Data Grid 6.4.0 | Infinispan 6.2.0 |
Note
1.6. Red Hat JBoss Data Grid Cache Architecture Copy linkLink copied to clipboard!
Figure 1.1. Red Hat JBoss Data Grid Cache Architecture
- Elements that a user cannot directly interact with are depicted within a dark grey box in the diagram. In Remote Client-Server mode, this includes Persistent Store, Cache, Cache Manager, L1 Cache, and Server Module. In Library mode, user cannot directly interact with Persistent Store and L1 Cache.
- Elements that a user can interact directly with are depicted in a light grey box in the diagram. In Remote Client-Server mode, this includes the Application and the Cache Client. In Library mode, users are allowed to interact with the Cache and Cache Manager, as well as the Application.
JBoss Data Grid's cache architecture includes the following elements:
- The Persistent Store is an optional component. It can permanently store the cached entries for restoration after a data grid shutdown.
- The Level 1 Cache (or L1 Cache) stores remote cache entries after they are initially accessed, preventing unnecessary remote fetch operations for each subsequent use of the same entries.
- The Cache Manager controls the life cycle of Cache instances and can store and retrieve them when required.
- The Cache is the main component for storage and retrieval of the key-value entries.
In Library mode, the Application (user code) can interact with the Cache and Cache Manager components directly. In this case the Application resides in the same Java Virtual Machine (JVM) and can call Cache and Cache Manager Java API methods directly.
1.7. Red Hat JBoss Data Grid APIs Copy linkLink copied to clipboard!
- Cache
- Batching
- Grouping
- Persistence (formerly CacheStore)
- ConfigurationBuilder
- Externalizable
- Notification (also known as the Listener API because it deals with Notifications and Listeners)
- The Asynchronous API (can only be used in conjunction with the Hot Rod Client in Remote Client-Server Mode)
- The REST Interface
- The Memcached Interface
- The Hot Rod Interface
- The RemoteCache API
Part II. Download and Install Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
Chapter 2. Download Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
2.1. Red Hat JBoss Data Grid Installation Prerequisites Copy linkLink copied to clipboard!
2.2. Java Virtual Machine Copy linkLink copied to clipboard!
2.3. Install OpenJDK on Red Hat Enterprise Linux Copy linkLink copied to clipboard!
Procedure 2.1. Install OpenJDK on Red Hat Enterprise Linux
Subscribe to the Base Channel
Obtain the OpenJDK from the RHN base channel. Your installation of Red Hat Enterprise Linux is subscribed to this channel by default.Install the Package
Use the yum utility to install OpenJDK:sudo yum install java-1.6.0-openjdk-devel
$ sudo yum install java-1.6.0-openjdk-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that OpenJDK is the System Default
Ensure that the correct JDK is set as the system default as follows:- Log in as a user with root privileges and run the alternatives command:
/usr/sbin/alternatives --config java
$ /usr/sbin/alternatives --config javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Depending on the OpenJDK version, select
/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/javaor/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java. - Use the following command to set
javac:/usr/sbin/alternatives --config javac
$ /usr/sbin/alternatives --config javacCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Depending on the OpenJDK version used, select
/usr/lib/jvm/java-1.6.0-openjdk/bin/javaor/usr/lib/jvm/java-1.7.0-openjdk/bin/java.
2.4. Download and Install JBoss Data Grid Copy linkLink copied to clipboard!
- Download JBoss Data Grid from the Red Hat Customer Portal.
- Verify the downloaded files.
- Install JBoss Data Grid.
2.4.1. Download Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
Procedure 2.2. Download JBoss Data Grid
- Log into the Customer Portal at https://access.redhat.com.
- Click the button near the top of the page.
- In the Product Downloads page, click .
- Select the appropriate JBoss Data Grid version from the Version: drop down menu.
- Download the appropriate files from the list that displays.
2.4.2. About the Red Hat Customer Portal Copy linkLink copied to clipboard!
- Manage and maintain Red Hat entitlements and support contracts.
- Download officially-supported software.
- Access product documentation and the Red Hat Knowledgebase.
- Contact Global Support Services.
- File bugs against Red Hat products.
2.4.3. Checksum Validation Copy linkLink copied to clipboard!
2.4.4. Verify the Downloaded File Copy linkLink copied to clipboard!
Procedure 2.3. Verify the Downloaded File
- To verify that a file downloaded from the Red Hat Customer Portal is error-free, access the portal site and go to that package's Software Details page. The Software Details page displays the
MD5andSHA256"checksum" values. Use the checksum values to check the integrity of the file. - Open a terminal window and run either the
md5sumorsha256sumcommand, with the downloaded file as an argument. The program displays the checksum value for the file as the output for the command. - Compare the checksum value returned by the command to the corresponding value displayed on the Software Details page for the file.
Note
Microsoft Windows does not come equipped with a checksum tool. Windows operating system users have to download a third-party product instead.
If the two checksum values are identical then the file has not been altered or corrupted and is, therefore, safe to use.
2.4.5. Install Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
Locate the appropriate version, platform, and file type and download Red Hat JBoss Data Grid from the Customer Portal.
Procedure 2.4. Install JBoss Data Grid
- Copy the downloaded JBoss Data Grid package to the preferred location on your machine.
- Run the following command to extract the downloaded JBoss Data Grid package:
unzip JDG_PACKAGE
$ unzip JDG_PACKAGECopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace JDG_PACKAGE with the name of the JBoss Data Grid usage mode package downloaded from the Red Hat Customer Portal. - The resulting unzipped directory will now be referred to as $JDG_HOME.
2.4.6. Red Hat Documentation Site Copy linkLink copied to clipboard!
Chapter 3. Install and Use the Maven Repositories Copy linkLink copied to clipboard!
3.1. About Maven Copy linkLink copied to clipboard!
Important
3.2. Required Maven Repositories Copy linkLink copied to clipboard!
- The JBoss Data Grid Maven Repository
- The
techpreview-all-repository(https://maven.repository.redhat.com/techpreview/all/)
3.3. Install the Maven Repository Copy linkLink copied to clipboard!
- On your local file system (Section 3.3.1, “Local File System Repository Installation”).
- On Apache Web Server.
- With a Maven repository manager (Section 3.3.2, “Maven Repository Manager Installation”).
3.3.1. Local File System Repository Installation Copy linkLink copied to clipboard!
Procedure 3.1. Local File System Repository Installation (JBoss Data Grid)
Log Into the Customer Portal
In a browser window, navigate to the Customer Portal page (https://access.redhat.com/home) and log in.Download the JBoss Data Grid Repository File
Download thejboss-datagrid-{VERSION}-maven-repository.zipfile from the Red Hat Customer Portal.- Unzip the file to a directory on your local file system (for example
$JDG_HOME/projects/maven-repositories/).
3.3.2. Maven Repository Manager Installation Copy linkLink copied to clipboard!
- Apache Archiva: http://archiva.apache.org/
- JFrog Artifactory: http://www.jfrog.com/products.php
- Sonatype Nexus: http://nexus.sonatype.org/ For details, see Section B.1, “Install the JBoss Enterprise Application Platform Repository Using Nexus”.
3.4. Configure the Maven Repository Copy linkLink copied to clipboard!
settings.xml file. The default version of this file is available in the conf directory of your Maven installation.
.m2 sub-directory of the user's home directory. See http://maven.apache.org/settings.html (the Maven documentation) for more information about configuring Maven.
3.4.1. Next Steps Copy linkLink copied to clipboard!
Part III. Supported Containers for JBoss Data Grid Copy linkLink copied to clipboard!
Chapter 4. Using JBoss Data Grid with Supported Containers Copy linkLink copied to clipboard!
- Java SE, started by your application.
- As a standalone JBoss Data Grid server.
- Bundled as a library in your application, deployed to an application server, and started by your application. For example, JBoss Data Grid can be used with Tomcat or Weblogic.
- Inside an OSGi runtime environment, in this case, Apache Karaf.
4.1. Deploy JBoss Data Grid in JBoss EAP (Library Mode) Copy linkLink copied to clipboard!
Note
- Add a dependency to the
jboss-deployment-structure.xmlfile. - Add a dependency to the
MANIFEST.MFfile. - Generate the
MANIFEST.MFfile via Maven.
Add the following configuration to the jboss-deployment-structure.xml file:
Note
jboss-deployment-structure.xml file, see the Red Hat JBoss Enterprise Application Platform documentation.
Add a dependency to the MANIFEST.MF files as follows:
Example 4.1. Example MANIFEST.MF File
Manifest-Version: 1.0 Dependencies: org.infinispan:jdg-6.4 services
Manifest-Version: 1.0
Dependencies: org.infinispan:jdg-6.4 services
- JBoss Data Grid Core:
Dependencies: org.infinispan:jdg-6.4 services
Dependencies: org.infinispan:jdg-6.4 servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Embedded Query:
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.query:jdg-6.4 services
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.query:jdg-6.4 servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - JDBC Cache Store:
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.persistence.jdbc:jdg-6.4 services
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.persistence.jdbc:jdg-6.4 servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - JPA Cache Store:
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.persistence.jpa:jdg-6.4 services
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.persistence.jpa:jdg-6.4 servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - LevelDB Cache Store:
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.persistence.leveldb:jdg-6.4 services
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.persistence.leveldb:jdg-6.4 servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - CDI:
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.cdi:jdg-6.4 meta-inf
Dependencies: org.infinispan:jdg-6.4 services, org.infinispan.cdi:jdg-6.4 meta-infCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The MANIFEST.MF file is generated during the build (specifically during the JAR or WAR process). As an alternative to adding a dependency to the MANIFEST.MF file, configure the dependency directly in Maven by adding the following to the pom.xml file:
4.2. Deploy JBoss Data Grid in JBoss EAP (Remote Client-Server Mode) Copy linkLink copied to clipboard!
Note
- Add a dependency to the
jboss-deployment-structure.xmlfile. - Add a dependency to the
MANIFEST.MFfile.
Add the following configuration to the jboss-deployment-structure.xml file:
Note
jboss-deployment-structure.xml file, see the Red Hat JBoss Enterprise Application Platform documentation.
Add a dependency to the MANIFEST.MF files as follows:
Example 4.2. Example MANIFEST.MF File
Manifest-Version: 1.0 Dependencies: org.infinispan.commons:jdg-6.4 services, org.infinispan.client.hotrod:jdg-6.4 services
Manifest-Version: 1.0
Dependencies: org.infinispan.commons:jdg-6.4 services, org.infinispan.client.hotrod:jdg-6.4 services
- Basic Hot Rod client:
org.infinispan.commons:jdg-6.4 services, org.infinispan.client.hotrod:jdg-6.4 services
org.infinispan.commons:jdg-6.4 services, org.infinispan.client.hotrod:jdg-6.4 servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Hot Rod client with Remote Query functionality:
org.infinispan.commons:jdg-6.4 services, org.infinispan.client.hotrod:jdg-6.4 services, org.infinispan.query.dsl:jdg-6.4 services, org.jboss.remoting3
org.infinispan.commons:jdg-6.4 services, org.infinispan.client.hotrod:jdg-6.4 services, org.infinispan.query.dsl:jdg-6.4 services, org.jboss.remoting3Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Deploy JBoss Data Grid in JBoss Enterprise Web Server Copy linkLink copied to clipboard!
4.4. Deploy Web Applications on WebLogic Server (Library Mode) Copy linkLink copied to clipboard!
The prerequisites to deploy the web applications are as follows:
- WebLogic Server 12c.
- JBoss Data Grid Library (Embedded) mode.
Procedure 4.1. Deploying Web Applications on a WebLogic Server
Create Web Applications
Create a web application and add the libraries in theWEB-INFfolder.Create a weblogic.xml Deployment Descriptor
Create aweblogic.xmldeployment descriptor with the following elements in it:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Theprefer-web-inf-classesclass indicates that the libraries and the classes in theWEB-INF/libfolder is preferred over the default libraries bundled in the WebLogic server. For example, thecommons-pool.jarfile in the WebLogic server has version 1.4 and is automatically loaded by the classloader, but the Hot Rod client uses a newer version of this library.Pack the Web Application into a Web Archive File
Create a web application archive (WAR) file of the web application and verify that the JBoss Data Grid libraries are in theWEB-INFfolder along with the WebLogic deployment descriptor file.Deploy the Application onto WebLogic Server
To deploy the web application using the Infinispan CDI module, stop the WebLogic server if it is running, apply the patch on it (Patch filep17424706_121200_Generic.zip) and restart the WebLogic server. If the Infinispan CDI module is not being used, deploy the web application normally.For more information about applying patch to the WebLogic Server, see the Oracle patch database on the Oracle website.
4.5. Deploy Web Applications on WebLogic Server (Remote Client-Server Mode) Copy linkLink copied to clipboard!
Procedure 4.2. Deploying Web Applications on a WebLogic Server
- To install the WebLogic server, see http://docs.oracle.com/cd/E24329_01/doc.1211/e24492/toc.htm.
- Configure JBoss Data Grid in Remote Client-Server mode, define cache, cache container, and endpoint configuration. After configuration, start JBoss Data Grid to confirm that the Hot Rod endpoint is listening on the configured port. For information about configuring JBoss Data Grid in Remote Client-Server, see Chapter 7, Run Red Hat JBoss Data Grid in Remote Client-Server Mode.
- Create a web application and add the
infinispan-remotelibrary as a dependency if Maven is used. - Create a
weblogic.xmldeployment descriptor with the following elements in it:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Theprefer-web-inf-classesclass indicates that the libraries and classes in theWEB-INF/libfolder are preferred over the default libraries bundled in the WebLogic server. For example, thecommons-pool.jarfile in the WebLogic server has version 1.4 and is automatically loaded by the classloader, however the Hot Rod client uses a newer version of this library. - Add deployment descriptor file in the
WEB-INFfolder. - Ensure that the
infinispan-remotedependency is added to thepom.xmlfile, then use a Maven plugin to create a web archive.Alternatively, create the web archive manually and add the library manually. - Deploy the application in the WebLogic server and verify that the Hot Rod client embedded inside the web application connects to the remote JBoss Data Grid server.
4.6. Running Red Hat JBoss Data Grid in Karaf (OSGi) Copy linkLink copied to clipboard!
4.6.1. Running a Deployment of JBoss Data Grid in Karaf (Remote Client-Server) Copy linkLink copied to clipboard!
features file, located in org/infinispan/infinispan-remote/${VERSION}. This file lists all dependencies for the Hot Rod client in OSGi, while also making it simpler to install the feature into Karaf (version 2.3.3 or 3.0).
4.6.2. Installing the Hot Rod client feature in Karaf Copy linkLink copied to clipboard!
Configure the Red Hat JBoss Data Grid Maven Repository.
Procedure 4.3. Install the Hot Rod Feature in Karaf
Karaf 2.3.3
For Karaf 2.3.3 use the following commands:karaf@root> features:addUrl mvn:org.infinispan/infinispan-remote/${VERSION}/xml/featureskaraf@root> features:addUrl mvn:org.infinispan/infinispan-remote/${VERSION}/xml/featuresCopy to Clipboard Copied! Toggle word wrap Toggle overflow karaf@root> features:install infinispan-remote
karaf@root> features:install infinispan-remoteCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the feature was successfully installed as follows:
karaf@root> features:list //output
karaf@root> features:list //outputCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Karaf 3.0.0
For Karaf use the following commands.karaf@root> feature:repo-add mvn:org.infinispan/infinispan-remote/${VERSION}/xml/featureskaraf@root> feature:repo-add mvn:org.infinispan/infinispan-remote/${VERSION}/xml/featuresCopy to Clipboard Copied! Toggle word wrap Toggle overflow karaf@root> feature:install infinispan-remote
karaf@root> feature:install infinispan-remoteCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the feature was successfully installed:
karaf@root> feature:list
karaf@root> feature:listCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Alternatively, use the-icommand parameter to install the Hot Rod Client feature using the following:karaf@root()> feature:repo-add -i mvn:org.infinispan/infinispan-remote/${VERSION}/xml/featureskaraf@root()> feature:repo-add -i mvn:org.infinispan/infinispan-remote/${VERSION}/xml/featuresCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.6.3. Installing Red Hat JBoss Data Grid in Karaf (Library Mode) Copy linkLink copied to clipboard!
features file, which defines all required dependencies.
features file:
- Register the feature repositories inside Karaf.
- Install the features contained in the repositories.
Procedure 4.4. Installing bundles using the features file
Start the Karaf console
Start the Karaf console using the following commands:cd $APACHE_KARAF_HOME/bin ./karaf
$ cd $APACHE_KARAF_HOME/bin $ ./karafCopy to Clipboard Copied! Toggle word wrap Toggle overflow Register a feature repository
Register a feature repository as follows:- For Karaf 2.3.3:
karaf@root()> features:addUrl mvn:org.infinispan/infinispan-embedded/${VERSION}/xml/featureskaraf@root()> features:addUrl mvn:org.infinispan/infinispan-embedded/${VERSION}/xml/featuresCopy to Clipboard Copied! Toggle word wrap Toggle overflow karaf@root> features:install infinispan-embedded
karaf@root> features:install infinispan-embeddedCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Karaf 3.0.0:
karaf@root()> feature:repo-add mvn:org.infinispan/infinispan-embedded/${VERSION}/xml/featureskaraf@root()> feature:repo-add mvn:org.infinispan/infinispan-embedded/${VERSION}/xml/featuresCopy to Clipboard Copied! Toggle word wrap Toggle overflow karaf@root> feature:install infinispan-embedded
karaf@root> feature:install infinispan-embeddedCopy to Clipboard Copied! Toggle word wrap Toggle overflow
JBoss Data Grid runs in library mode using Karaf.
mvn:<groupId>/<artifactId>/<version>/xml/features
mvn:<groupId>/<artifactId>/<version>/xml/features
Important
Important
Chapter 5. Running Red Hat JBoss Data Grid with Apache Camel Copy linkLink copied to clipboard!
5.1. The camel-jbossdatagrid Component Copy linkLink copied to clipboard!
camel-jbossdatagrid component includes the following features:
- Local Camel Consumer
Receives cache change notifications and sends them to be processed. This can be done synchronously or asynchronously, and is also supported with a replicated or distributed cache.
- Local Camel Producer
A producer creates and sends messages to an endpoint. The
camel-jbossdatagridproducer usesGET,PUT,REMOVE, andCLEARoperations. The local producer is also supported with a replicated or distributed cache. - Remote Camel Producer
In Remote Client-Server mode, the Camel producer can send messages using Hot Rod.
camel-jbossdatagrid dependency must be added to the pom.xml file to run JBoss Data Grid with Camel:
Note
camel-jbossdatagrid component ships with JBoss Data Grid, and is not included in the JBoss Fuse 6.1 or JBoss Fuse Service Works 6.0 distributions.
FileComponent is referred to in a URI as file, which creates FileEndpoints.
The following URI format is used for camel-jbossdatagrid:
infinispan://hostname?[options]
infinispan://hostname?[options]
The producer can create and send messages to a local JBoss Data Grid cache configured in the registry, or to a remote cache using the Hot Rod protocol. If a cacheContainer is present, the cache will be local. If it is not present, the cache will try to connect to remote cache using the supplied hostname/port.
| Name | Default Value | Type | Context | Description |
|---|---|---|---|---|
| cacheContainer | null | CacheContainer | Shared | Reference to a org.infinispan.manager.CacheContainer in the Registry. |
| cacheName | null | String | Shared | The cache name to use. If not specified, the default cache is used. |
| command | PUT | String | Producer | The operation to perform. Only the PUT, GET, REMOVE, and CLEAR values are currently supported. |
| eventTypes | null | Set<String> | Consumer | The event types to register. By default, this listens for all event types. Possible values are defined in org.infinispan.notifications.cachelistener.event.Event.Type |
| sync | true | Boolean | Consumer | By default the consumer will receive notifications synchronously by the same thread that process the cache operation. |
| clustered | false | Boolean | Consumer | By default the consumer will only receive local events. By using this option, the consumer also listens to events originated on other nodes in the cluster. The only events available for clustered listeners are CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, and CACHE_ENTRY_MODIFIED. |
| Name | Default Value | Type | Context | Description |
|---|---|---|---|---|
| CamelInfinispanCacheName | null | String | Shared | The cache participating in the operation or event. |
| CamelInfinispanOperation | PUT | String | Producer | The operation to perform: CamelInfinispanOperationPut, CamelInfinispanOperationGet, CamelInfinispanOperationRemove, CamelInfinispanOperationClear. |
| CamelInfinispanKey | null | Object | Shared | The key to perform the operation to or the key generating the event. |
| CamelInfinispanValue | null | Object | Producer | The value to use for the operation. |
| CamelInfinispanOperationResult | null | Object | Producer | The result of the operation. |
| CamelInfinispanEventType | null | String | Consumer | The type of the received event. Possible values are defined in org.infinispan.notifications.cachelistener.event.Event.Type |
| CamelInfinispanIsPre | null | Boolean | Consumer | Infinispan fires two events for each operation: one before and one after the operation. |
5.2. Routing with Camel in JBoss Data Grid Copy linkLink copied to clipboard!
from("direct:start")
.setHeader(InfinispanConstants.OPERATION, constant(InfinispanConstants.GET))
.setHeader(InfinispanConstants.KEY, constant("123"))
.to("infinispan://localhost?cacheContainer=#cacheContainer");
from("direct:start")
.setHeader(InfinispanConstants.OPERATION, constant(InfinispanConstants.GET))
.setHeader(InfinispanConstants.KEY, constant("123"))
.to("infinispan://localhost?cacheContainer=#cacheContainer");
camel-jbossdatagrid component to send data to an embedded cache created by the local-cache module.
cacheManager to be instantiated.
cacheManager bean for Spring XML can be instantiated as follows:
<bean id="cacheManager" class="org.infinispan.manager.DefaultCacheManager" init-method="start" destroy-method="stop"> <constructor-arg type="java.lang.String" value="infinispan.xml"/> </bean>
<bean id="cacheManager" class="org.infinispan.manager.DefaultCacheManager" init-method="start" destroy-method="stop">
<constructor-arg type="java.lang.String" value="infinispan.xml"/>
</bean>
cacheManager bean using Blueprint XML.
<bean id="cacheManager" class="org.infinispan.manager.DefaultCacheManager" init-method="start" destroy-method="stop">
<argument value="infinispan.xml" />
</bean>
<bean id="cacheManager" class="org.infinispan.manager.DefaultCacheManager" init-method="start" destroy-method="stop">
<argument value="infinispan.xml" />
</bean>
Note
infinispan.xml for configuration of the cache. This file must be present on the classpath.
5.3. Red Hat JBoss Data Grid and Red Hat JBoss Fuse Copy linkLink copied to clipboard!
5.3.1. Installing camel-jbossdatagrid for Red Hat JBoss Fuse Copy linkLink copied to clipboard!
camel-jbossdatagrid, ensure that both JBoss Data Grid 6.4 and JBoss Fuse 6.1 (Full Installation) are installed.
Procedure 5.1. Installing JBoss Data Grid
- For information about installing JBoss Data Grid, see Part II, “Download and Install Red Hat JBoss Data Grid”. Only the following JBoss Data Grid components are required to run the camel component in JBoss Fuse:
- JBoss Data Grid Maven repository.
- The JBoss Data Grid Server package (to use the Hot Rod client).
camel-jbossdatagrid library is also available in a separate distribution called jboss-datagrid-6.4.0-camel-library.
Procedure 5.2. Installing JBoss Fuse
Before attempting to install and use Red Hat JBoss Fuse, ensure your system meets the minimum requirements. For supported Platforms and recommended Java Runtime platforms, see the Red Hat JBoss Fuse Installation Guide.
- 700 MB of free disk space
- 2 GB of RAM
Download the JBoss Fuse Full Installation
You can download the Red Hat JBoss Fuse archive from theRed Hat Customer Portal>Downloads>Red Hat JBoss Middleware>Downloadspage, after you register and login to your customer account.When logged in:- Select , listed under in the sidebar menu.
- Select from the Version drop-down list on the Software Downloads page.
- Click the button next to the Red Hat JBoss Fuse 6.1.0 distribution file to download.
JBoss Fuse allows you to choose between installations that contain different feature sets. To run JBoss Data Grid with JBoss Fuse, the Full installation is required. The Full installation includes the following:- Apache Karaf
- Apache Camel
- Apache ActiveAMQ
- Apache CXF
- Fuse Management
- Console (hawtio)
- JBI components
Unpacking the Archive
Red Hat JBoss Fuse is installed by unpacking an archive system on a system. JBoss Fuse is packaged as a zip file. Using a suitable archive tool, unpack Red Hat JBoss Fuse into a directory to which you have full access.Warning
Do not unpack the archive file into a folder that has spaces in its path name. For example, do not unpack intoC:\Documents and Settings\Greco Roman\Desktop\fusesrc.Additionally, do not unpack the archive file into a folder that has any of the following special characters in its path name: #, %, ^, ".Adding a Remote Console User
The server's remote command console is not configured with a default user. Before remotely connecting to the server's console, add a user to the configuration.Important
The information in this file is unencrypted so it is not suitable for environments that require strict security.To add a user:- Open
InstallDir/etc/users.propertiesin your favorite text editor. - Locate the line
#admin=admin,admin. This line specifies a useradminwith the passwordadminand the roleadmin. - Remove the leading # to uncomment the line.
- Replace the first
adminwith a name for the user. - Replace the second
adminwith the password for the user. - Leave the last
adminas it is, and save the changes.
Note
To access the Fuse Management Console to monitor and manage your Camel routes, ActiveMQ brokers, Web applications, and so on, open a browser to, after starting Red Hat JBoss Fuse.http://localhost:8181/hawtio
Red Hat JBoss Fuse Maven Repositories
To use Maven to build projects, specify the location of the artifacts in a Mavensettings.xmlfile.The following JBoss Fuse Maven repository contains the required dependencies for Camel and must be added to thesettings.xmlfile.https://repo.fusesource.com/nexus/content/groups/public/
https://repo.fusesource.com/nexus/content/groups/public/Copy to Clipboard Copied! Toggle word wrap Toggle overflow The JBoss Fuse repository runs alongside the JBoss Data Grid repository.JBoss Data Grid includes afeatures.xmlfile for Karaf that deploys all artifacts required for thecamel-jbossdatagridcomponent. This file is not included in the JBoss Fuse container distribution. Thefeatures.xmlfile is injboss-datagrid-6.4.0-maven-repository/org/apache/camel/camel-jbossdatagrid/${version}/. No further configuration of the JBoss Data Grid repository is required.For more information about installing and getting started with JBoss Fuse, see the Red Hat JBoss Fuse documentation on the Red Hat Customer Portal.
5.4. Red Hat JBoss Data Grid and Red Hat JBoss EAP Copy linkLink copied to clipboard!
5.4.1. Installing camel-jbossdatagrid for Red Hat JBoss Enterprise Application Platform Copy linkLink copied to clipboard!
- Red Hat JBoss EAP
- Red Hat JBoss Fuse
- Red Hat JBoss Data Grid
Note
jdg.version- the latest version of Red Hat JBoss Data Gridfuse.version- the latest version of Red Hat JBoss Fuseinfinispan.version- the version of Infinispan that is included in the latest version of Red Hat JBoss Data Gridcamel.version- the version of Apache Camel that is included in the latest version of Red Hat JBoss Fuse
camel-jbossdatagrid, please refer to https://access.redhat.com/articles/115883.
Procedure 5.3. Installing JBoss Data Grid
- For information about installing JBoss Data Grid, see Part II, “Download and Install Red Hat JBoss Data Grid”. Only the following JBoss Data Grid components are required to run the camel component in JBoss EAP:
- JBoss Data Grid Maven repository.
- The JBoss Data Grid Server package (to use the Hot Rod client).
camel-jbossdatagrid library is also available in a separate distribution called jboss-datagrid-${jdg.version}-camel-library.
Procedure 5.4. Installing JBoss EAP
- Before attempting to install and use Red Hat JBoss EAP ensure your system meets the minimum requirements as documented in Red Hat JBoss EAP Installation Guide.
Unpacking the Archive
Red Hat JBoss EAP is installed by unpacking an archive system on a system, as JBoss EAP is packaged as a zip file; using a suitable archive tool, unpack Red Hat JBoss EAP into a directory to which you have full access.Warning
Do not unpack the archive file into a folder that has spaces in its path name. For example, do not unpack intoC:\Documents and Settings\Greco Roman\Desktop\JBoss.Additionally, do not unpack the archive file into a folder that has any of the following special characters in its path name: #, %, ^, ".- Once the archive has been extracted JBoss EAP will have been successfully installed. For more information on installation options refer to theRed Hat JBoss EAP Installation Guide.
- If JBoss Data Grid is being used in Library mode then refer to Section 4.1, “Deploy JBoss Data Grid in JBoss EAP (Library Mode)” to ensure the necessary dependencies have been installed.
- If JBoss Data Grid is being used in Remote Client-Server mode then refer to Section 4.2, “Deploy JBoss Data Grid in JBoss EAP (Remote Client-Server Mode)” to ensure the necessary dependencies have been installed.
5.4.2. Deploy Camel with EAP: Copy linkLink copied to clipboard!
5.4.2.1. Add development and runtime dependencies Copy linkLink copied to clipboard!
pom.xml (if using Maven).
Procedure 5.5. Add Camel from Fuse
- Ensure that the Fuse repository has been added to the
pom.xml:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the Camel components as a dependency in the
pom.xml:<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel.version}</version> </dependency><dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel.version}</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 5.6. Add camel-jbossdatagrid to the deployment
- Follow the instructions in Chapter 3, Install and Use the Maven Repositories to add the maven repository.
- Add camel-jbossdatagrid as a dependency in the
pom.xml:<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jbossdatagrid</artifactId> <version>${jdg.version}</version> </dependency><dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jbossdatagrid</artifactId> <version>${jdg.version}</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add in the remaining JBoss Data Grid dependencies depending on which functionality is in use:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.4.2.2. Optionally: Add runtime dependencies as a JBoss EAP Module Copy linkLink copied to clipboard!
Note
pom.xml will need to have the scope set to "provided" for any dependencies provided as modules. For example:
jboss-datagrid-${jdg.version}-camel-library.zip from Red Hat JBoss Data Grid 6.4.0 Camel Component for JBoss Fuse.
apache-camel-${camel.version}.zip found in Red Hat JBoss Fuse's extras/ directory:
user@example modules] unzip /path/to/jboss-fuse-${fuse.version}/extras/apache-camel-${camel.version}
user@example modules] unzip /path/to/jboss-fuse-${fuse.version}/extras/apache-camel-${camel.version}
Procedure 5.7. Add in the Camel components from JBoss Fuse
- Create a directory under $EAP_HOME/modules:
user@example jboss-eap-6.4] cd modules user@example modules] mkdir -p org/apache/camel/core
user@example jboss-eap-6.4] cd modules user@example modules] mkdir -p org/apache/camel/coreCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a
mainsubdirectory to store the jars:user@example modules] mkdir org/apache/camel/core/main
user@example modules] mkdir org/apache/camel/core/mainCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy over the camel-core jar from
apache-camel-${camel.version}.zipto the newly createdmaindirectory:user@example modules] cp /path/to/jboss/fuse/extras/apache-camel-${camel.version}/lib/camel-core-${camel.version}.jar ./org/apache/camel/core/main/user@example modules] cp /path/to/jboss/fuse/extras/apache-camel-${camel.version}/lib/camel-core-${camel.version}.jar ./org/apache/camel/core/main/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
module.xmldescriptor by adding in the following text toorg/apache/camel/core/main/module.xml:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Repeat the above steps to create a module for each dependency in use; note that modules may have dependencies on other modules as described in the Red Hat JBoss Administration and Configuration Guide.
Procedure 5.8. Add in Camel components from JBoss Data Grid
- Create a
mainsubdirectory for the JDG Camel components:user@example jboss-eap-6.4] mkdir -p modules/org/apache/camel/main
user@example jboss-eap-6.4] mkdir -p modules/org/apache/camel/mainCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Unzip
jboss-datagrid-${jdg.version}-camel-library.zip. - Copy
camel-jbossdatagrid-${jdg.version}.jarinto the newly created directory:user@example jboss-eap-6.4] cp jboss-datagrid-${jdg.version}-camel-library/camel-jbossdatagrid-${jdg.version}.jar modules/org/apache/camel/main/user@example jboss-eap-6.4] cp jboss-datagrid-${jdg.version}-camel-library/camel-jbossdatagrid-${jdg.version}.jar modules/org/apache/camel/main/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a
module.xmldescriptor by adding in the following text toorg/apache/camel/main/module.xml:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
jboss-deployment-structure.xml in the WEB-INF of the war, and add dependencies on the newly created module:
Part IV. Running Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
Chapter 6. Run Red Hat JBoss Data Grid JAR Files with Maven Copy linkLink copied to clipboard!
6.1. Run JBoss Data Grid (Remote Client-Server Mode) Copy linkLink copied to clipboard!
Note
Add the following dependencies to the pom.xml file:
- Add
infinispan-remotedependency:<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-remote</artifactId> <version>${infinispan.version}</version> </dependency><dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-remote</artifactId> <version>${infinispan.version}</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For
Remote Cache Storespecific use case add alsoinfinispan-embeddeddependency:<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded</artifactId> <version>${infinispan.version}</version> </dependency><dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded</artifactId> <version>${infinispan.version}</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Warning
infinispan-embedded-query.jar file. Do not include other versions of Hibernate Search and Lucene in the same deployment as infinispan-embedded-query. This action will cause classpath conflicts and result in unexpected behavior.
6.2. Run JBoss Data Grid (Library Mode) Copy linkLink copied to clipboard!
Note
Add the following dependencies to the pom.xml file:
- Add
infinispan-embeddeddependency:<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded</artifactId> <version>${infinispan.version}</version> </dependency><dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded</artifactId> <version>${infinispan.version}</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Add the following dependencies to the pom.xml file:
- Add
infinispan-embedded-querydependency:<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded-query</artifactId> <version>${infinispan.version}</version> </dependency><dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded-query</artifactId> <version>${infinispan.version}</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Warning
infinispan-embedded-query.jar file. Do not include other versions of Hibernate Search and Lucene in the same deployment as infinispan-embedded-query. This action will cause classpath conflicts and result in unexpected behavior.
Chapter 7. Run Red Hat JBoss Data Grid in Remote Client-Server Mode Copy linkLink copied to clipboard!
7.1. Prerequisites Copy linkLink copied to clipboard!
- Ensure an appropriate version of OpenJDK is installed. For more information, see Section 2.3, “Install OpenJDK on Red Hat Enterprise Linux”
- Download and install the latest version of JBoss Data Grid. For more information, see Section 2.4.1, “Download Red Hat JBoss Data Grid”
7.2. Run Red Hat JBoss Data Grid in Standalone Mode Copy linkLink copied to clipboard!
$JDG_HOME/bin/standalone.sh
$JDG_HOME/bin/standalone.sh
$JDG_HOME/standalone/configuration/standalone.xml file.
7.3. Run Red Hat JBoss Data Grid in Clustered Mode Copy linkLink copied to clipboard!
$JDG_HOME/bin/clustered.sh
$JDG_HOME/bin/clustered.sh
$JDG_HOME/standalone/configuration/clustered.xml file.
7.4. Run Red Hat JBoss Data Grid with a Custom Configuration Copy linkLink copied to clipboard!
$JDG_HOME/standalone/configuration directory.
$JDG_HOME/bin/standalone.sh -c ${FILENAME}
$JDG_HOME/bin/standalone.sh -c ${FILENAME}
$JDG_HOME/bin/clustered.sh -c ${FILENAME}
$JDG_HOME/bin/clustered.sh -c ${FILENAME}
-c used for this script does not allow absolute paths, therefore the specified file must be available in the $JDG_HOME/standalone/configuration directory.
-c parameter, JBoss Data Grid uses the default configuration.
7.5. Set an IP Address to Run Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
127.0.0.1/localhost. Use the -b parameter with the script to specify an IP address.
$JDG_HOME/bin/standalone.sh -b ${IP_ADDRESS}
$JDG_HOME/bin/standalone.sh -b ${IP_ADDRESS}
$JDG_HOME/bin/clustered.sh -b ${IP_ADDRESS}
$JDG_HOME/bin/clustered.sh -b ${IP_ADDRESS}
7.6. Running Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
- Use the following command to run JBoss Data Grid using the configuration defined in the
standalone.xmlfile (located at$JDG_HOME/standalone/configuration):$JDG_HOME/bin/standalone.sh
$JDG_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command with an appended
-cfollowed by the configuration file name to run JBoss Data Grid with a non-default configuration file:$JDG_HOME/bin/standalone.sh -c clustered.xml
$JDG_HOME/bin/standalone.sh -c clustered.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command to run JBoss Data Grid with a default clustered configuration:
$JDG_HOME/bin/clustered.sh
$JDG_HOME/bin/clustered.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 8. Run a Red Hat JBoss Data Grid as a Node without Endpoints Copy linkLink copied to clipboard!
8.1. Benefits of a Node Without Endpoints Copy linkLink copied to clipboard!
8.2. Sample Configuration for a Node without Endpoints Copy linkLink copied to clipboard!
Procedure 8.1. Find the JBoss Data Grid Sample Configuration for a Node Without Endpoints
Extract the JBoss Data Grid ZIP
1. Extract the ZIP file for JBoss Data Grid Remote Client-Server mode. This is namedjboss-datagrid-server-${version}. Add the relevant version to the file name.Navigate to the Appropriate Folder
In the extracted folder, navigate to the$JDG_HOME/docs/examples/configfolder.Find the Configuration Sample File
View theclustered-storage-only.xmlfile, which contains the configuration for a node with no endpoints.
8.3. Configure a Node with No Endpoints Copy linkLink copied to clipboard!
- Remove the
datagridsubsystem. - Remove the
modclustersubsystem. - Remove the
datasourcedefinition. - Remove
socket-bindingsformod_cluster,Hot Rodandmemcached.
Chapter 9. Run Red Hat JBoss Data Grid in Library Mode Copy linkLink copied to clipboard!
- As a prerequisite for the subsequent chapters, set up a new project using the instructions in Section 9.1, “Create a New Red Hat JBoss Data Grid Project”.
- Next, use JBoss Data Grid either as an embedded cache (see Chapter 10, Run Red Hat JBoss Data Grid in Library Mode (Single-Node Setup) for more information) or as a clustered cache (see Chapter 11, Run Red Hat JBoss Data Grid in Library Mode (Multi-Node Setup). Each tutorial is based on an Infinispan quickstart.
- Finally, monitor Red Hat JBoss EAP applications using JBoss Data Grid using the instructions in Chapter 12, Monitor Red Hat JBoss Data Grid Applications in Red Hat JBoss EAP
9.1. Create a New Red Hat JBoss Data Grid Project Copy linkLink copied to clipboard!
9.2. Add Dependencies to Your Project Copy linkLink copied to clipboard!
pom.xml file, located in the Maven repository folder:
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-embedded</artifactId>
<version>$VERSION</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-embedded</artifactId>
<version>$VERSION</version>
</dependency>
Note
version value with the appropriate version of the libraries included in JBoss Data Grid.
9.3. Add a Profile to Your Project Copy linkLink copied to clipboard!
settings.xml file in $HOME/.m2/settings.xml as follows:
Example 9.1. Adding a Profile
settings.xml file:
Example 9.2. Enable the Profile
<activeProfiles>
<!-- Optionally, make the repositories active by default -->
<activeProfile>jboss-ga-repository</activeProfile>
<activeProfile>jboss-earlyaccess-repository</activeProfile>
</activeProfiles>
<activeProfiles>
<!-- Optionally, make the repositories active by default -->
<activeProfile>jboss-ga-repository</activeProfile>
<activeProfile>jboss-earlyaccess-repository</activeProfile>
</activeProfiles>
client/java/ directory, included in the Red Hat JBoss Data Grid package to the build classpath.
Chapter 10. Run Red Hat JBoss Data Grid in Library Mode (Single-Node Setup) Copy linkLink copied to clipboard!
10.1. Create a Main Method in the Quickstart Class Copy linkLink copied to clipboard!
These quickstarts use the Infinispan quickstarts located at https://github.com/infinispan/infinispan-quickstart. The following procedure uses the infinispan-quickstart/embedded-cache quickstart.
Procedure 10.1. Create a Main Method in the Quickstart Class
Create the Quickstart.java File
Create a file calledQuickstart.javaat your project's location.Add the Quickstart Class
Add the following class and method to theQuickstart.javafile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy Dependencies and Compile Java Classes
Use the following command to copy all project dependencies to a directory and compile the Java classes from your project:mvn clean compile dependency:copy-dependencies -DstripVersion
$ mvn clean compile dependency:copy-dependencies -DstripVersionCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the Main Method
Use the following command to run the main method:java -cp target/classes/:target/dependency/* com.mycompany.app.Quickstart
$ java -cp target/classes/:target/dependency/* com.mycompany.app.QuickstartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2. Use the Default Cache Copy linkLink copied to clipboard!
10.2.1. Add and Remove Data from the Cache Copy linkLink copied to clipboard!
Procedure 10.2. Add and Remove Data from the Cache
- Add an entry, replacing key and value with the desired key and value:
cache.put("key", "value");cache.put("key", "value");Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Confirm that the entry is present in the cache:
assertEquals(1, cache.size()); assertTrue(cache.containsKey("key"));assertEquals(1, cache.size()); assertTrue(cache.containsKey("key"));Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the entry from the cache:
Object v = cache.remove("key");Object v = cache.remove("key");Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Confirm that the entry is no longer present in the cache:
assertEquals("value", v); assertTrue(cache.isEmpty());assertEquals("value", v); assertTrue(cache.isEmpty());Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.2. Adding and Replacing a Key Value Copy linkLink copied to clipboard!
DefaultCacheQuickstart.java file does:
Procedure 10.3. Adding and Replacing a Key Value
- Add an entry
keywithvalueas the key's value.cache.put("key", "value");cache.put("key", "value");Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 10.4. Replacing a Key Value
- The following code searches for keys (named
keyandkey2). If the two specific keys beings searched for are not found, JBoss Data Grid creates two new keys with the specified key names and values.cache.putIfAbsent("key", "newValue"); cache.putIfAbsent("key2", "value2");cache.putIfAbsent("key", "newValue"); cache.putIfAbsent("key2", "value2");Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The following code confirms that the value of the stored key equals the value we wanted to store.
assertEquals(cache.get("key"), "value"); assertEquals(cache.get("key2"), "value2");assertEquals(cache.get("key"), "value"); assertEquals(cache.get("key2"), "value2");Copy to Clipboard Copied! Toggle word wrap Toggle overflow
See Also:
10.2.3. Adjust Data Life Copy linkLink copied to clipboard!
DefaultCacheQuickstart.java file does:
Procedure 10.5. Adjust the Data Life
- Alter the key's
lifespanvalue:cache.put("key", "value", 5, TimeUnit.SECONDS);cache.put("key", "value", 5, TimeUnit.SECONDS);Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Check if the cache contains the key:
assertTrue(cache.containsKey("key"));assertTrue(cache.containsKey("key"));Copy to Clipboard Copied! Toggle word wrap Toggle overflow - After the allocated
lifespantime has expired, the key is no longer in the cache:Thread.sleep(10000); assertFalse(cache.containsKey("key"));Thread.sleep(10000); assertFalse(cache.containsKey("key"));Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.4. Default Data Mortality Copy linkLink copied to clipboard!
10.2.5. Register the Named Cache Using XML Copy linkLink copied to clipboard!
infinispan.xml file.
infinispan.xml file is located in https://github.com/infinispan/infinispan-quickstart in the infinispan-quickstart/embedded-cache/src/main/resources folder.
Chapter 11. Run Red Hat JBoss Data Grid in Library Mode (Multi-Node Setup) Copy linkLink copied to clipboard!
11.1. Sharing JGroup Channels Copy linkLink copied to clipboard!
Example 11.1. Shared JGroups Channel
EmbeddedCacheManager cm = $LOCATION
Cache<Object, Object> cache1 = cm.getCache("replSyncCache");
Cache<Object, Object> cache2 = cm.getCache("replAsyncCache");
Cache<Object, Object> cache3 = cm.getCache("invalidationSyncCache");
EmbeddedCacheManager cm = $LOCATION
Cache<Object, Object> cache1 = cm.getCache("replSyncCache");
Cache<Object, Object> cache2 = cm.getCache("replAsyncCache");
Cache<Object, Object> cache3 = cm.getCache("invalidationSyncCache");
11.2. Run Red Hat JBoss Data Grid in a Cluster Copy linkLink copied to clipboard!
11.2.1. Compile the Project Copy linkLink copied to clipboard!
mvn clean compile dependency:copy-dependencies -DstripVersion
$ mvn clean compile dependency:copy-dependencies -DstripVersion
11.2.2. Run the Clustered Cache with Replication Mode Copy linkLink copied to clipboard!
Procedure 11.1. Run the Clustered Cache with Replication Mode
- Use the following command to launch the first node:
java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.replication.Node0
$ java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.replication.Node0Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command to launch the second node:
java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.replication.Node1
$ java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.replication.Node1Copy to Clipboard Copied! Toggle word wrap Toggle overflow
JGroups and JBoss Data Grid initialized on both nodes. After approximately fifteen seconds, the cache entry log message appears on the console of the first node.
11.2.3. Run the Clustered Cache with Distribution Mode Copy linkLink copied to clipboard!
Procedure 11.2. Run the Clustered Cache with Distribution Mode
- Use the following command to launch the first node:
java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.distribution.Node0
$ java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.distribution.Node0Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command to launch the second node:
java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.distribution.Node1
$ java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.distribution.Node1Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command to launch the third node:
java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.distribution.Node2
$ java -cp target/classes/:target/dependency/* org.infinispan.quickstart.clusteredcache.distribution.Node2Copy to Clipboard Copied! Toggle word wrap Toggle overflow
JGroups and JBoss Data Grid initialized on the three nodes. After approximately fifteen seconds, the ten entries added by the third node are visible as they are distributed to the first and second nodes.
11.2.4. Configure the Cluster Copy linkLink copied to clipboard!
Procedure 11.3. Configure the Cluster
- Add the default configuration for a new cluster.
- Customize the default cluster configuration according to the requirements of your network. This is done declaratively (using XML) or programmatically.
- Configure the replicated or distributed data grid.
11.2.4.1. Add the Default Cluster Configuration Copy linkLink copied to clipboard!
Example 11.2. Default Configuration
new ConfigurationBuilder() .clustering().cacheMode(CacheMode.REPL_SYNC) .build()
new ConfigurationBuilder()
.clustering().cacheMode(CacheMode.REPL_SYNC)
.build()
Note
GlobalConfigurationBuilder().clusteredDefault() to quickly create a preconfigured and cluster-aware GlobalConfiguration for clusters. This configuration can also be customized.
11.2.4.2. Customize the Default Cluster Configuration Copy linkLink copied to clipboard!
Use the following GlobalConfiguration code to specify the name of the file to use for JGroups configuration:
new GlobalConfigurationBuilder().transport().addProperty("configurationFile", "jgroups.xml")
.build()
new GlobalConfigurationBuilder().transport().addProperty("configurationFile", "jgroups.xml")
.build()
jgroups.xml with the desired file name.
jgroups.xml file is located at Infinispan-Quickstart/clustered-cache/src/main/resources/.
Note
-Djgroups.bind_addr="127.0.0.1". This is particularly useful to test a cluster where all nodes are on a single machine.
Use the following XML snippet in the infinispan.xml file to configure the JGroups properties to use Red Hat JBoss Data Grid's XML configuration:
11.2.4.3. Configure the Replicated Data Grid Copy linkLink copied to clipboard!
Use the following code snippet to programmatically configure the cache for replication mode (either synchronous or asynchronous):
Edit the infinispan.xml file to include the following XML code to declaratively configure the cache for replication mode (either synchronous or asynchronous):
private static EmbeddedCacheManager createCacheManagerFromXml() throws IOException {
return new DefaultCacheManager("infinispan.xml");}
private static EmbeddedCacheManager createCacheManagerFromXml() throws IOException {
return new DefaultCacheManager("infinispan.xml");}
Note
org.infinispan.jmx.JmxDomainConflictException: Domain already registered org.infinispan.
11.2.4.4. Configure the Distributed Data Grid Copy linkLink copied to clipboard!
numOwners parameter, which sets how many owners each entry has.
numOwners value to set the desired trade off between space, durability and availability. Durability is further improved by JBoss Data Grid's topology aware consistent hash, which locates entry owners across a variety of data centers, racks and nodes.
Programmatically configure the cache for distributed mode (either synchronous or asynchronous) as follows:
new ConfigurationBuilder()
.clustering()
.cacheMode(CacheMode.DIST_SYNC)
.hash().numOwners(2)
.build()
new ConfigurationBuilder()
.clustering()
.cacheMode(CacheMode.DIST_SYNC)
.hash().numOwners(2)
.build()
Edit the infinispan.xml file to include the following XML code to declaratively configure the cache for distributed mode (either synchronous or asynchronous):
Chapter 12. Monitor Red Hat JBoss Data Grid Applications in Red Hat JBoss EAP Copy linkLink copied to clipboard!
12.1. Prerequisites Copy linkLink copied to clipboard!
- Install and configure JBoss Enterprise Application Platform 6 (or better).
- Install and configure JBoss Operations Network 3.2.2 (or better).
- Install and configure JBoss Data Grid (6.3 or better) Library mode plug-in.
12.2. Monitor Red Hat JBoss Data Grid Applications in Red Hat JBoss EAP Copy linkLink copied to clipboard!
Procedure 12.1. Monitor JBoss Data Grid Applications in JBoss Enterprise Application Platform
Configure RHQ/JBoss Operations Network
Add an RHQ/JBoss Operations Network specific property (namedorg.rhq.resourceKey) to the/bin/standalone.conffile as follows:JAVA_OPTS="$JAVA_OPTS -Dorg.rhq.resourceKey=MyEAP"
JAVA_OPTS="$JAVA_OPTS -Dorg.rhq.resourceKey=MyEAP"Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command adds the property to the JBoss Enterprise Application Platform's command line indirectly.Check RHQ/JBoss Operations Network is Running Using a Full JDK
Ensure that the RHQ/JBoss Operations Network agent started using a full JDK instead of a JRE. This is because the agent requires access to the JDK'stools.jarfile.To configure your RHQ/JBoss Operations Network agent to use the JDK, follow the instructions relevant to your operating system:- For Linux users, set the
RHQ_AGENT_JAVA_HOMEenvironment variable to the JDK home directory in the agent'srhq-agent-env.shfile. - For Windows users, set the
RHQ_AGENT_JAVA_HOMEenvironment variable to the JDK home directory in the agent'srhq-agent-env.batfile.
Ensure the Agent is Local to the JBoss Enterprise Application Platform Instance
Ensure that the RHQ/JBoss Operations Network agent runs locally to and under the same user as the JBoss Application Platform instance. This is required for the Java Attach API to connect to the process.Import Resources to the Agent Inventory
RHQ/JBoss Operations Network can now discover resources. These resources can subsequently be imported into the agent inventory.When a JBoss Data Grid user deployment enables JMX statistics to expose JBoss Data Grid Cache Managers or caches, the resources appear as children resources of the JBoss Enterprise Application Platform instance.
Part V. Red Hat JBoss Data Grid Quickstarts Copy linkLink copied to clipboard!
Chapter 13. The Hello World Quickstart Copy linkLink copied to clipboard!
- from a servlet.
- from a JSF page using request scoped beans.
Important
JBoss Data Grid's Hello World quickstart is available at the following location: jboss-datagrid-{VERSION}-quickstarts/
13.1. Quickstart Prerequisites Copy linkLink copied to clipboard!
- Java 6.0 (Java SDK 1.6) or better
- JBoss Enterprise Application Platform 6.x or JBoss Enterprise Web Server 2.x
- Maven 3.0 or better
- Configure the Maven Repository. For details, see Chapter 3, Install and Use the Maven Repositories
13.2. Start Two Application Server Instances Copy linkLink copied to clipboard!
Procedure 13.1. Start the First Application Server Instance
Navigate to the Root Directory
In the command line terminal, navigate to the root for your JBoss server directory.Start the First Application Server
Depending on your operating system, use the appropriate command from the following to start the first instance of your selected application server:- For Linux:
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Windows:
$JBOSS_HOME\bin\standalone.bat
$JBOSS_HOME\bin\standalone.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 13.2. Start the Second Application Server Instance
Clone the Application Server
Create a copy of the selected JBoss Server to create a second instance.Navigate to the Root Directory
In the command line terminal, navigate to the root for your JBoss server directory.Start the Second Application Server
Use the appropriate command for your operating system from the following commands. This command starts the server with the provided port offset to ensure that both the server instances run on the same host.- For Linux:
$JBOSS_HOME2/bin/standalone.sh -Djboss.socket.binding.port-offset=100
$JBOSS_HOME2/bin/standalone.sh -Djboss.socket.binding.port-offset=100Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Windows:
$JBOSS_HOME2\bin\standalone.bat -Djboss.socket.binding.port-offset=100
$JBOSS_HOME2\bin\standalone.bat -Djboss.socket.binding.port-offset=100Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.3. Build and Deploy the Hello World Quickstart Copy linkLink copied to clipboard!
Procedure 13.3. Build and Deploy the Hello World Quickstart
Navigate to the Required Directory
In the command line terminal, navigate to the root directory of the quickstart on the command line interface.Build and Deploy to the First Application Server Instance
Use the following command to build and deploy the quickstart to the first application server instance as follows:mvn clean package jboss-as:deploy
# mvn clean package jboss-as:deployCopy to Clipboard Copied! Toggle word wrap Toggle overflow This command deploystarget/jboss-helloworld-jdg.warto the first running server instance.Build and Deploy to the Second Application Server Instance
Use the following command to build and deploy the quickstart to the second application server instance with the specified ports as follows:mvn clean package jboss-as:deploy -Djboss-as.port=10099
# mvn clean package jboss-as:deploy -Djboss-as.port=10099Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command deploystarget/jboss-helloworld-jdg.warto the second running server instance.
13.4. Access the Running Application Copy linkLink copied to clipboard!
- First Server Instance: http://localhost:8080/jboss-helloworld-jdg
- Second Server Instance: http://localhost:8180/jboss-helloworld-jdg
13.5. Test Replication on the Application Copy linkLink copied to clipboard!
Procedure 13.4. Test Replication on the Application
Access the First Server
Access the first application server and enter the key and value.- Access the first application server in a browser window using the following URL:
http://localhost:8080/jboss-helloworld-jdg
http://localhost:8080/jboss-helloworld-jdgCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Insert the key
foo. - Insert the value
bar.
Access the Second Server
Access the second application server and enter the key and value.- Access the second application server in a browser window using the following URL:
http://localhost:8180/jboss-helloworld-jdg
http://localhost:8180/jboss-helloworld-jdgCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Click .
- Get the key
foo. - Click .
- Insert the key
mykey. - Insert the value
myvalue.
Get All Keys and Values
Access the first server and request all keys.- Access the first application server in a browser window using the following URL:
http://localhost:8080/jboss-helloworld-jdg
http://localhost:8080/jboss-helloworld-jdgCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Click .
- Click to request all key and values.
As the results of the last step show, all the data added at each server has been replicated to the other server.
Note
60 seconds from the most recent update.
To interact with predefined servlets or to directly store and retrieve keys from the cache, use the following URLs:
http://localhost:8080/jboss-helloworld-jdg/TestServletPut
http://localhost:8080/jboss-helloworld-jdg/TestServletPut
http://localhost:8180/jboss-helloworld-jdg/TestServletGet
http://localhost:8180/jboss-helloworld-jdg/TestServletGet
13.6. Remove the Application Copy linkLink copied to clipboard!
Procedure 13.5. Remove the Application
Start the Application Servers
Ensure that both server instances are running.Navigate to the Root
In the command line terminal, navigate to the root directory of the quickstart.Remove the Archive
Use the following commands to remove the archive from both the server instances.- Remove the archive from the first server as follows:
mvn jboss-as:undeploy
mvn jboss-as:undeployCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the archive from the second server as follows:
mvn jboss-as:undeploy -Djboss-as.port=10099
mvn jboss-as:undeploy -Djboss-as.port=10099Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 14. The CarMart Quickstarts Copy linkLink copied to clipboard!
The CarMart quickstart offers the following features:
- List all cars
- Add new cars
- Remove cars
- View statistics for caches, such as hits, stores, and retrievals
The CarMart quickstart can be used in the following JBoss Data Grid usage modes:
- Remote Client-Server Mode, where the application includes the Hot Rod client to communicate with a remote JBoss Data Grid server.
- Library Mode, where all libraries are bundled with the application in the form of
jarfiles.
JBoss Data Grid's CarMart quickstart is available at the following location: jboss-datagrid-{VERSION}-quickstarts/
14.1. About the CarMart Transactional Quickstart Copy linkLink copied to clipboard!
The Transactional CarMart Quickstart offers the following features:
- List all cars
- Add new cars
- Add new cars with rollback
- Remove cars
- View statistics for caches, such as hits, stores, and retrievals
The Transactional CarMart Quickstart can only be used in JBoss Data Grid's Library mode. A standalone transaction manager from JBoss Transactions is used when the Transactional CarMart Quickstart is run in Red Hat JBoss Enterprise Web Server 2.x.
JBoss Data Grid's Transactional CarMart Quickstart can be found at the following location: jboss-datagrid-{VERSION}-quickstarts/carmart-tx
14.2. Differences Between the CarMart and Transactional Quickstarts Copy linkLink copied to clipboard!
- CarMart is available for both Remote Client-Server Mode and Library Mode. Transactional CarMart is only available in Library Mode because transactions are not available in Remote Client-Server Mode.
- The Transactional Quickstart also displays how a transaction rollback occurs. Use the button to view the rollback. The CarMart example has a simple button instead.
14.3. The (Non-transactional) CarMart Quickstart Using JBoss EAP Copy linkLink copied to clipboard!
14.3.1. Quickstart Prerequisites Copy linkLink copied to clipboard!
- Java 6.0 (Java SDK 1.6) or better
- JBoss Enterprise Application Platform 6.x or JBoss Enterprise Web Server 2.x
- Maven 3.0 or better
- Configure the Maven Repository. For details, see Chapter 3, Install and Use the Maven Repositories
14.3.2. Build and Deploy the CarMart Quickstart to JBoss EAP Copy linkLink copied to clipboard!
Prerequisites for this procedure are as follows:
- Obtain the supported JBoss Data Grid Library Mode distribution files.
- Ensure that the JBoss Data Grid and JBoss Enterprise Application Platform Maven repositories are installed and configured. For details, see Chapter 3, Install and Use the Maven Repositories
- Select a JBoss server to use (JBoss Enterprise Application Platform 6 (or better) or JBoss EAP 6 (or better).
Procedure 14.1. Build and Deploy CarMart to JBoss EAP
Start JBoss EAP
Navigate to the root of the JBoss EAP server directory in a terminal window and enter the following command:For Linux users:$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows users:$JBOSS_HOME\bin\standalone.bat
$JBOSS_HOME\bin\standalone.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow Build and Deploy the Application
Use the following command to build and deploy the application using Maven:mvn clean package jboss-as:deploy
$ mvn clean package jboss-as:deployCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The target war file (target/jboss-carmart.war) is deployed to the running instance of JBoss EAP.
14.3.3. View the CarMart Quickstart on JBoss EAP Copy linkLink copied to clipboard!
The CarMart quickstart must be built and deployed to be viewed.
Procedure 14.2. View the CarMart Quickstart on JBoss EAP
- To view the application, use your browser to navigate to the following link:
http://localhost:8080/jboss-carmart
http://localhost:8080/jboss-carmartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.3.4. Remove the CarMart Quickstart from JBoss EAP Copy linkLink copied to clipboard!
Procedure 14.3. Remove an Application from JBoss EAP
- To remove an application, use the following command:
mvn jboss-as:undeploy
$ mvn jboss-as:undeployCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.4. The (Non-transactional) CarMart Quickstart Using JBoss Enterprise Web Server Copy linkLink copied to clipboard!
14.4.1. Build and Deploy the CarMart Quickstart to JBoss Enterprise Web Server Copy linkLink copied to clipboard!
Prerequisites for this procedure are as follows:
- Ensure that the JBoss Data Grid and JBoss Enterprise Application Platform Maven repositories are installed and configured. For details, see Chapter 3, Install and Use the Maven Repositories
- Select JBoss Enterprise Web Server 2 (or better) for your application and install it.
Procedure 14.4. Build the CarMart Quickstart to the Server (Library Mode)
Start the Server
Run the selected server by navigating to the root directory in a terminal window and enter the following command:For Linux users:$JBOSS_EWS_HOME/tomcat7/bin/catalina.sh run
$JBOSS_EWS_HOME/tomcat7/bin/catalina.sh runCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows users:$JBOSS_EWS_HOME\tomcat7\bin\catalina.bat run
$JBOSS_EWS_HOME\tomcat7\bin\catalina.bat runCopy to Clipboard Copied! Toggle word wrap Toggle overflow Build and Deploy your Application
Use the following command to build and deploy your application using Maven:mvn -Plibrary-tomcat clean package tomcat:deploy
$ mvn -Plibrary-tomcat clean package tomcat:deployCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The target war file (target/jboss-carmart.war) is deployed to the running instance of the selected server.
14.4.2. View the CarMart Quickstart Using JBoss Enterprise Web Server Copy linkLink copied to clipboard!
The CarMart quickstart must be built and deployed to be viewed.
Procedure 14.5. View the CarMart Quickstart
- To view the application, use your browser to navigate to the following link:
http://localhost:8080/jboss-carmart
http://localhost:8080/jboss-carmartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.4.3. Remove the CarMart Quickstart from JBoss Enterprise Web Server Copy linkLink copied to clipboard!
Procedure 14.6. Remove an Application from JBoss Enterprise Web Server
- To remove an application, use the following command:
mvn tomcat:undeploy -Plibrary-tomcat
$ mvn tomcat:undeploy -Plibrary-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.5. The (Non-transactional) CarMart Quickstart in Remote Client-Server Mode (JBoss EAP) Copy linkLink copied to clipboard!
14.5.1. Build and Deploy the CarMart Quickstart in Remote Client-Server Mode Copy linkLink copied to clipboard!
Important
Prerequisites for this procedure are as follows:
- Obtain the most recent supported JBoss Data Grid Remote Client-Server Mode distribution files from Red Hat.
- Ensure that the JBoss Data Grid and JBoss Enterprise Application Platform Maven repositories are installed and configured. For details, see Chapter 3, Install and Use the Maven Repositories
- Select a JBoss server to use (JBoss Enterprise Application Platform 6 (or better). Navigate to the root of the JBoss server directory in a terminal window and enter the following command:For Linux users:
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows users:$JBOSS_HOME\bin\standalone.bat
$JBOSS_HOME\bin\standalone.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 14.7. Build and Deploy the CarMart Quickstart in Remote Client-Server Mode
Configure the Standalone File
Add the following configuration to thestandalone.xmlfile located in the$JDG_HOME/standalone/configuration/directory.- Add the following configuration within the infinispan subsystem tags:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
If thecarcacheelement already exists in your configuration, replace it with the provided configuration.
Start the JBoss Data Grid Server
Run the following script to start the JBoss Data Grid Server:$JDG_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=100
$JDG_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=100Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start the JBoss Server
Run the following script to start the JBoss server instance where your application will deploy:$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Specify the Host and Port Address
The application uses the values in thejboss-datagrid-{VERSION}-quickstarts/carmart/src/main/resources/META-INF/datagrid.propertiesfile to locate the JBoss Data Grid server. If your JBoss Data Grid server is not running using the default host and port values, edit the file and insert the correct host and port values, as follows:datagrid.host=localhost datagrid.hotrod.port=11322
datagrid.host=localhost datagrid.hotrod.port=11322Copy to Clipboard Copied! Toggle word wrap Toggle overflow Build and Deploy the Application
Use the following command to build and deploy your application in the relevant directory:mvn clean package jboss-as:deploy -Premote-jbossas
$ mvn clean package jboss-as:deploy -Premote-jbossasCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.5.2. View the CarMart Quickstart in Remote Client-Server Mode Copy linkLink copied to clipboard!
The CarMart quickstart must be built and deployed be viewed.
Procedure 14.8. View the CarMart Quickstart in Remote Client-Server Mode
- Visit the following link in a browser window to view the application:
http://localhost:8080/jboss-carmart
http://localhost:8080/jboss-carmartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.5.3. Remove the CarMart Quickstart in Remote Client-Server Mode Copy linkLink copied to clipboard!
Procedure 14.9. Remove an Application in Remote Client-Server Mode
- To remove an application, use the following command:
mvn jboss-as:undeploy -Premote-jbossas
$ mvn jboss-as:undeploy -Premote-jbossasCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.6. The (Non-Transactional) CarMart Quickstart in Remote Client-Server Mode (JBoss Enterprise Web Server) Copy linkLink copied to clipboard!
14.6.1. Build and Deploy the CarMart Quickstart in Remote Client-Server Mode Copy linkLink copied to clipboard!
Important
Prerequisites for this procedure are as follows:
- Obtain the most recent supported JBoss Data Grid Remote Client-Server Mode distribution files from Red Hat.
- Ensure that the JBoss Data Grid and JBoss Enterprise Application Platform Maven repositories are installed and configured. For details, see Chapter 3, Install and Use the Maven Repositories
- Add a
serverelement to the Mavensettings.xmlfile. In theidelements withinserver, add the appropriate tomcat credentials.<server> <id>tomcat</id> <username>admin</username> <password>admin</password> </server><server> <id>tomcat</id> <username>admin</username> <password>admin</password> </server>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 14.10. Build and Deploy the CarMart Quickstart in Remote Client-Server Mode
Configure the Standalone File
Add the following configuration to thestandalone.xmlfile located in the$JDG_HOME/standalone/configuration/directory.- Add the following configuration within the infinispan subsystem tags:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
If thecarcacheelement already exists in your configuration, replace it with the provided configuration.
Start the Container
Start the JBoss server instance where your application will deploy.For Linux:$JBOSS_EWS_HOME/tomcat7/bin/catalina.sh run
$JBOSS_EWS_HOME/tomcat7/bin/catalina.sh runCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows:$JBOSS_EWS_HOME\tomcat7\bin\catalina.bat run
$JBOSS_EWS_HOME\tomcat7\bin\catalina.bat runCopy to Clipboard Copied! Toggle word wrap Toggle overflow Build the Application
Use the following command to build your application in the relevant directory:mvn clean package -Premote-tomcat
$ mvn clean package -Premote-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow Deploy the Application
Use the following command to deploy the application in the relevant directory:mvn tomcat:deploy -Premote-tomcat
mvn tomcat:deploy -Premote-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.6.2. View the CarMart Quickstart in Remote Client-Server Mode Copy linkLink copied to clipboard!
The CarMart quickstart must be built and deployed be viewed.
Procedure 14.11. View the CarMart Quickstart in Remote Client-Server Mode
- Visit the following link in a browser window to view the application:
http://localhost:8080/jboss-carmart
http://localhost:8080/jboss-carmartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.6.3. Remove the CarMart Quickstart in Remote Client-Server Mode Copy linkLink copied to clipboard!
Procedure 14.12. Remove an Application in Remote Client-Server Mode
- To remove an application, use the following command:
mvn tomcat:undeploy -Premote-tomcat
$ mvn tomcat:undeploy -Premote-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.7. The (Transactional) CarMart Quickstart Using JBoss EAP Copy linkLink copied to clipboard!
JBossASCacheContainerProvider/TomcatCacheContainerProvider implementation classes for the CacheContainerProvider interface.
14.7.1. Quickstart Prerequisites Copy linkLink copied to clipboard!
- Java 6.0 (Java SDK 1.6) or better
- JBoss Enterprise Application Platform 6.x or JBoss Enterprise Web Server 2.x
- Maven 3.0 or better
- Configure the Maven Repository. For details, see Chapter 3, Install and Use the Maven Repositories
14.7.2. Build and Deploy the Transactional CarMart Quickstart Copy linkLink copied to clipboard!
Ensure that the following prerequisites are met before building and deploying the CarMart quickstart.
- Configure Maven (See Section 14.7.1, “Quickstart Prerequisites”)
- Start JBoss Enterprise Application Platform:
- In a command line terminal, navigate to the root of the JBoss EAP server directory.
- Use one of the following commands to start the server with a web profile:For Linux:
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows:%JBOSS_HOME%\bin\standalone.bat
%JBOSS_HOME%\bin\standalone.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 14.13. Build and Deploy the Transactional Quickstart
- In a command line terminal, navigate to the root of the JBoss EAP server directory.
- Enter the following command to build and deploy the archive:
mvn clean package jboss-as:deploy
mvn clean package jboss-as:deployCopy to Clipboard Copied! Toggle word wrap Toggle overflow - The
target/jboss-carmart-tx.warfile is deployed to the running instance of the server.
14.7.3. View the Transactional CarMart Quickstart Copy linkLink copied to clipboard!
The CarMart quickstart must be built and deployed to be viewed.
Procedure 14.14. View the CarMart Quickstart
- To view the application, use your browser to navigate to the following link:
http://localhost:8080/jboss-carmart-tx
http://localhost:8080/jboss-carmart-txCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.7.4. Undeploy The Transactional CarMart Quickstart Copy linkLink copied to clipboard!
- In a command line terminal, navigate to the root directory of the quickstart.
- Undeploy the archive as follows:
mvn jboss-as:undeploy
mvn jboss-as:undeployCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.7.5. Test the Transactional CarMart Quickstart Copy linkLink copied to clipboard!
- Stop JBoss EAP, if it is running.
- In a command line terminal, navigate to root directory for the quickstart.
- Build the quickstarts as follows:
mvn clean package
mvn clean packageCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the tests as follows:
mvn test -Puitests-jbossas -Das7home=/path/to/server
mvn test -Puitests-jbossas -Das7home=/path/to/serverCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.8. The (Transactional) CarMart Quickstart Using JBoss Enterprise Web Server Copy linkLink copied to clipboard!
library-tomcat profile can be used when running this quickstart with JBoss Enterprise Web Server because this profile enables library mode.
14.8.1. Quickstart Prerequisites Copy linkLink copied to clipboard!
- Java 6.0 (Java SDK 1.6) or better
- JBoss Enterprise Application Platform 6.x or JBoss Enterprise Web Server 2.x
- Maven 3.0 or better
- Configure the Maven Repository. For details, see Chapter 3, Install and Use the Maven Repositories
14.8.2. Build and Deploy the Transactional CarMart Quickstart Copy linkLink copied to clipboard!
Ensure that the following prerequisites are met before building and deploying the CarMart quickstart.
- Configure Maven (See Section 14.8.1, “Quickstart Prerequisites”)
- To configure JBoss Enterprise Web Server, add the following lines to the
conf/tomcat-users.xmlfile:<role rolename="manager-script"/> <user username="admin" password="admin" roles="manager-script"/><role rolename="manager-script"/> <user username="admin" password="admin" roles="manager-script"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure Maven by adding the following configuration information to the Maven
settings.xmlfile with the appropriate credentials:<server> <id>tomcat</id> <username>admin</username> <password>admin</password> </server>
<server> <id>tomcat</id> <username>admin</username> <password>admin</password> </server>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start JBoss Enterprise Web Server:
- In a command line terminal, navigate to the root of the JBoss Enterprise Web Server directory.
- Use one of the following commands to start the server with a web profile:For Linux:
$TOMCAT_HOME/bin/catalina.sh run
$TOMCAT_HOME/bin/catalina.sh runCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows:%TOMCAT_HOME%\bin\catalina.bat run
%TOMCAT_HOME%\bin\catalina.bat runCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 14.15. Build and Deploy the Transactional CarMart Quickstart
- In a command line terminal, navigate to the root directory for the quickstart.
- Enter the following command to build and deploy archive:
mvn -Plibrary-tomcat clean package tomcat:deploy
mvn -Plibrary-tomcat clean package tomcat:deployCopy to Clipboard Copied! Toggle word wrap Toggle overflow - The
target/jboss-carmart-tx.warfile is deployed to the running instance of JBoss Enterprise Web Server.
14.8.3. View the Transactional CarMart Quickstart Copy linkLink copied to clipboard!
The CarMart quickstart must be built and deployed to be viewed.
Procedure 14.16. View the CarMart Quickstart
- To view the application, use your browser to navigate to the following link:
http://localhost:8080/jboss-carmart-tx
http://localhost:8080/jboss-carmart-txCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.8.4. Undeploy The Transactional CarMart Quickstart Copy linkLink copied to clipboard!
- In a command line terminal, navigate to the root directory of the quickstart.
- Undeploy the archive as follows:
mvn -Plibrary-tomcat tomcat:undeploy
mvn -Plibrary-tomcat tomcat:undeployCopy to Clipboard Copied! Toggle word wrap Toggle overflow
14.8.5. Test the Transactional CarMart Quickstart Copy linkLink copied to clipboard!
- Undeploy the archive (see Section 14.8.4, “Undeploy The Transactional CarMart Quickstart”)
- Stop JBoss Enterprise Web Server, if it is running.
- In a command line terminal, navigate to root directory for the quickstart.
- Build the quickstarts as follows:
mvn clean package
mvn clean packageCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the tests as follows:
mvn test -Puitests-jbossas -Das7home=/path/to/server
mvn test -Puitests-jbossas -Das7home=/path/to/serverCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 15. The Football Quickstart Endpoint Examples Copy linkLink copied to clipboard!
The following features are available with the example Football Manager application:
- Add a team
- Add players
- Remove all entities (teams and players)
- Listing all teams and players
JBoss Data Grid's Football quickstart can be found at the following locations:
jboss-datagrid-{VERSION}-quickstarts/rest-endpointjboss-datagrid-{VERSION}-quickstarts/hotrod-endpointjboss-datagrid-{VERSION}-quickstarts/memcached-endpoint
15.1. Quickstart Prerequisites Copy linkLink copied to clipboard!
- Java 6.0 (Java SDK 1.6) or better
- JBoss Enterprise Application Platform 6.x or JBoss Enterprise Web Server 2.x
- Maven 3.0 or better
- Configure the Maven Repository. For details, see Chapter 3, Install and Use the Maven Repositories
15.2. Build the Football Application Copy linkLink copied to clipboard!
Important
Prerequisites for this procedure are as follows:
- Obtain the most recent supported JBoss Data Grid Remote Client-Server Mode distribution files from Red Hat.
- Ensure that the JBoss Data Grid and JBoss Enterprise Application Platform Maven repositories are installed and configured. For details, see Chapter 3, Install and Use the Maven Repositories
Procedure 15.1. Build the Football Application
Add Configurations
Edit thestandalone.xmlfile (located at$JDG_HOME/standalone/configuration/) to add definitions for the datasource and infinispan subsystems.- Add the following subsystem definition for the datasource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the following subsystem definition for infinispan:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Note
The Hot Rod and REST endpoints use the cache namedteamsand memcached endpoint usesmemcachedCacheas a default.Disable REST Security
As a default, thestandalone.xmlconfiguration file protects the REST endpoint withBASICauthentication. This quickstart cannot perform authentication, therefore the REST authentication must be disabled in the REST connector by removing thesecurity-domainandauth-methodparameters. The resulting configuration (with REST authentication disabled) is as follows:<rest-connector virtual-server="default-host" cache-container="local" /><rest-connector virtual-server="default-host" cache-container="local" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow For more details about security, see the REST Authentication Chapter in JBoss Data Grid's Developer Guide.Edit the Submodule Configuration File
Each submodule (specificallyhotrod-endpoint,rest-endpointandmemcached-endpoint) contains a configuration file (located at$JDG_QUICKSTART/src/main/resources/jdg.properties). Modify the default values in the configuration file to set the values required for your specific JBoss Data Grid installation.Build the Application
Use the following command to build the example application in its directory:mvn clean package
mvn clean packageCopy to Clipboard Copied! Toggle word wrap Toggle overflow This step results in the use of Maven's shade plugin, which bundles all dependencies into a single jar file for ease of use. This file is named{PROTOCOL}-endpoint-quickstart.jar, for examplerest-endpoint-quickstart.jarfor the REST version.Start JBoss Data Grid
Run the following script to run JBoss Data Grid:$JDG_HOME/bin/standalone.sh
$JDG_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the Application
Run the example application in its directory with the following command:mvn exec:java
mvn exec:javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 16. The Rapid Stock Market Quickstart Copy linkLink copied to clipboard!
16.1. Build and Run the Rapid Stock Market Quickstart Copy linkLink copied to clipboard!
Procedure 16.1. Rapid Stock Market Quickstart Server-side Configuration
- Build a server module for the JBoss Data Grid Server by packaging a class that is common for the client and server in a jar file:
mvn clean package -Pprepare-server-module
$ mvn clean package -Pprepare-server-moduleCopy to Clipboard Copied! Toggle word wrap Toggle overflow Place the new jar file in a directory structure that is similar to the server module. - Install the server module into the server.
- Copy the prepared module to the server:
cp -r target/modules ${JDG_SERVER_HOME}/$ cp -r target/modules ${JDG_SERVER_HOME}/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the new module as a dependency of the
org.infinispan.commonsmodule by adding the following into themodules/system/layers/base/org/infinispan/commons/mainmodule.xmlfile:<module name="org.infinispan.quickstart.compatibility.common"/>
<module name="org.infinispan.quickstart.compatibility.common"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Build the application:
mvn clean package
$ mvn clean packageCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the JBoss Data Grid to use the appropriate configuration file.
- Copy the example configuration file for compatibility mode to a location where the JBoss Data Grid Server can locate and use it:
cp ${JDG_SERVER_HOME}/docs/examples/configs/standalone-compatibility-mode.xml ${JDG_SERVER_HOME}/standalone/configuration$ cp ${JDG_SERVER_HOME}/docs/examples/configs/standalone-compatibility-mode.xml ${JDG_SERVER_HOME}/standalone/configurationCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the
security-domainandauth-methodattributes from therest-connectorelement to disable REST security.
- Start the JBoss Data Grid Server in compatibility mode:
${JDG_SERVER_HOME}/bin/standalone.sh -c standalone-compatibility-mode.xml$ ${JDG_SERVER_HOME}/bin/standalone.sh -c standalone-compatibility-mode.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 16.2. Rapid Stock Market Quickstart Client-side Configuration
- In a new command line terminal window, start the client-side application:
mvn exec:java -Pclient
$ mvn exec:java -PclientCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the instructions in the help menu for the client application.
Part VI. Uninstall Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
Chapter 17. Remove Red Hat JBoss Data Grid Copy linkLink copied to clipboard!
17.1. Remove Red Hat JBoss Data Grid from Your Linux System Copy linkLink copied to clipboard!
Warning
Procedure 17.1. Remove JBoss Data Grid from Your Linux System
Shut Down Server
Ensure that the JBoss Data Grid server is shut down.Navigate to the JBoss Data Grid Home Directory
Use the command line to change into the level above the$JDG_HOMEfolder.Delete the JBoss Data Grid Home Directory
Enter the following command in the terminal to remove JBoss Data Grid, replacing$JDG_HOMEwith the name of your JBoss Data Grid home directory:rm -Rf $JDG_HOME
$ rm -Rf $JDG_HOMECopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.2. Remove Red Hat JBoss Data Grid from Your Windows System Copy linkLink copied to clipboard!
Warning
Procedure 17.2. Remove JBoss Data Grid from Your Windows System
Shut Down Server
Ensure that the JBoss Data Grid server is shut down.Navigate to the JBoss Data Grid Home Directory
Use the Windows Explorer to navigate to the directory in which the$JDG_HOMEfolder is located.Delete the JBoss Data Grid Home Directory
Select the$JDG_HOMEfolder and delete it.
Appendix A. References Copy linkLink copied to clipboard!
A.1. About Key-Value Pairs Copy linkLink copied to clipboard!
- A key is unique to a particular data entry. It consists of entry data attributes from the related entry.
- A value is the data assigned to and identified by the key.
Appendix B. Maven Configuration Information Copy linkLink copied to clipboard!
B.1. Install the JBoss Enterprise Application Platform Repository Using Nexus Copy linkLink copied to clipboard!
Procedure B.1. Download the JBoss Enterprise Application Platform 6 Maven Repository ZIP archive
- Open a web browser and access the following URL: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=appplatform.
- Find Application Platform 6 Maven Repository in the list.
- Click to download a ZIP file that contains the repository.
- Unzip the files into the desired target directory.
Procedure B.2. Add the JBoss Enterprise Application Platform 6 Maven Repository using Nexus Maven Repository Manager
- Log into Nexus as an Administrator.
- Select the Repositories section from the → menu to the left of your repository manager.
- Click the Add... drop-down menu, then select Hosted Repository.
- Provide a name and ID for the new repository.
- Enter the unzipped repository path in the Override Local Storage Location field.
- Continue if the artifact must be available in a repository group. If not, do not continue with this procedure.
- Select the repository group.
- Click on the Configure tab.
- Drag the new JBoss Maven repository from the Available Repositories list to the Ordered Group Repositories list on the left.
Note
The order of this list determines the priority for searching Maven artifacts.
The repository is configured using Nexus Maven Repository Manager.
B.2. Maven Repository Configuration Example Copy linkLink copied to clipboard!
example-settings.xml is available in the root directory of the Maven repository folder after it is unzipped. The following is an excerpt that contains the relevant parts of the example-settings.xml file:
Example B.1. Sample Maven Repository Configuration
Appendix C. Revision History Copy linkLink copied to clipboard!
| Revision History | |||||
|---|---|---|---|---|---|
| Revision 6.4.0-11 | Wed Apr 1 2015 | ||||
| |||||
| Revision 6.4.0-10 | Fri Mar 27 2015 | ||||
| |||||
| Revision 6.4.0-9 | Tue Mar 17 2015 | ||||
| |||||
| Revision 6.4.0-8 | Fri Mar 13 2015 | ||||
| |||||
| Revision 6.4.0-7 | Wed Feb 18 2015 | ||||
| |||||
| Revision 6.4.0-6 | Tue Jan 27 2015 | ||||
| |||||
| Revision 6.4.0-5 | Fri Jan 23 2015 | ||||
| |||||
| Revision 6.4.0-4 | Mon Jan 05 2015 | ||||
| |||||
| Revision 6.4.0-3 | Tue Nov 18 2014 | ||||
| |||||
| Revision 6.4.0-2 | Thu Nov 13 2014 | ||||
| |||||
| Revision 6.4.0-1 | Wed Oct 22 2014 | ||||
| |||||
| Revision 6.4.0-0 | Wed Sep 24 2014 | ||||
| |||||