Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Getting started with Fuse on JBoss EAP

download PDF

This chapter introduces Fuse on JBoss EAP, and explains how to install, develop, and build your first Fuse application on a JBoss EAP container.

See the following topics for details:

1.1. About Fuse on JBoss EAP

JBoss Enterprise Application Platform (EAP), based on Jakarta EE technology (previously, Java EE) from the Eclipse Foundation, was originally created to address use cases for developing enterprise applications. JBoss EAP is characterized by well-defined patterns for implementing services and standardized Java APIs (for example, for persistence, messaging, security, and so on). In recent years, this technology has evolved to be more lightweight, with the introduction of CDI for dependency injection and simplified annotations for enterprise Java beans.

Distinctive features of this container technology are:

  • Particularly suited to running in standalone mode.
  • Many standard services (for example, persistence, messaging, security, and so on) pre-configured and provided out-of the-box.
  • Application WARs typically small and lightweight (because many dependencies are pre-installed in the container).
  • Standardized, backward-compatible Java APIs.

1.2. Installing Fuse on JBoss EAP

The standard installation package for Fuse 7.13 on JBoss EAP is available for download from the Red Hat Customer Portal. It installs the standard assembly of the JBoss EAP container, and provides the full Fuse technology stack.

Prerequisites

Procedure

  1. Run the JBoss EAP installer from a shell prompt, as follows:

    java -jar DOWNLOAD_LOCATION/jboss-eap-7.4.16-installer.jar
  2. During installation:

    1. Accept the terms and conditions.
    2. Choose your preferred installation path, EAP_INSTALL, for the JBoss EAP runtime.
    3. Create an administrative user and make a careful note of these administrative user credentials for later.
    4. You can accept the default settings on the remaining screens.
  3. Open a shell prompt and change directory to EAP_INSTALL.
  4. From the EAP_INSTALL directory, run the Fuse on EAP installer, as follows:

    java -jar DOWNLOAD_LOCATION/fuse-eap-installer-7.13.0.jar
  5. (Optional) In order to use Apache Maven from the command line, you need to install and configure Maven as described in as described in Setting up Maven locally).
  6. Apply the Fuse on JBoss EAP Update 16 patch.

    For full instructions, see Red Hat JBoss EAP Patching and Upgrading Guide.

1.3. Building your first Fuse application on JBoss EAP

This set of instructions assists you in building your first Fuse application on JBoss EAP.

Prerequisites

Procedure

  1. In your IDE environment, create a new project, as follows:

    1. Select File→New→Fuse Integration Project.
    2. In the Project Name field, enter eap-camel.
    3. Click Next.
    4. In the Select a Target Environment pane, choose the following settings:

      • Select Standalone as the deployment platform.
      • Select Wildfly/Fuse on EAP as the runtime environment and use the Runtime (optional) dropdown menu to select the JBoss EAP 7.x Runtime server as the target runtime.
    5. After selecting the target runtime, the Camel Version is automatically selected for you and the field is grayed out.
    6. Click Next.
    7. In the Advanced Project Setup pane, select the Spring Bean - Spring DSL template.
    8. Click Finish.

      Important

      If this is the first time you are building a Fuse project, it will take several minutes for the wizard to finish generating the project. This is because it downloads dependencies from remote Maven repositories. Do not interrupt the wizard or close the window while the project is building in the background.

    9. If prompted to open the associated Fuse Integration perspective, click Yes.
    10. Wait while JBoss Tools downloads required artifacts and builds the project in the background.
  2. Deploy the project to the server, as follows:

    1. In the Servers view (bottom right corner of the Fuse Integration perspective), if the server is not already started, select the Red Hat JBoss EAP 7.4 Runtime server and click the green arrow to start it.
    2. Wait until you see a message like the following in the Console view:

      14:47:07,283 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.4.0.GA (WildFly Core 10.1.11.Final-redhat-00001) started in 3301ms - Started 314 of 576 services (369 services are lazy, passive or on-demand)
    3. After the server has started, switch back to the Servers view, right-click the server and select Add and Remove from the context menu.
    4. In the Add and Remove dialog, select the eap-camel project and click Add >.
    5. Click Finish.
  3. Verify that the project is working, as follows:

    1. Browse to the following URL to access the service running in the eap-camel project: http://localhost:8080/camel-test-spring?name=Kermit
    2. The browser window should show the response Hello Kermit.
  4. Undeploy the project, as follows:

    1. In the Servers view, select the Red Hat JBoss EAP 7.4 Runtime server.
    2. Right-click the server and select Add and Remove from the context menu.
    3. In the Add and Remove dialog, select your eap-camel project and click < Remove.
    4. Click Finish.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.