Este conteúdo não está disponível no idioma selecionado.
5.7. Red Hat JBoss Data Grid and Red Hat JBoss EAP
5.7.1. Installing camel-jbossdatagrid for Red Hat JBoss Enterprise Application Platform Copiar o linkLink copiado para a área de transferência!
- 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.7.2. Deploy Camel with EAP: Copiar o linkLink copiado para a área de transferência!
5.7.2.1. Add development and runtime dependencies Copiar o linkLink copiado para a área de transferência!
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.7.2.2. Optionally: Add runtime dependencies as a JBoss EAP Module Copiar o linkLink copiado para a área de transferência!
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.5.1 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: