Este contenido no está disponible en el idioma seleccionado.

Chapter 10. Creating a New Camel XML file


Overview

Apache Camel stores routes in an XML file that contains a camelContext element. When you create a new Fuse Integration project, the tooling provides an Apache Camel context (XML) file as part of the project by default.

You can also add a new Camel XML file that includes all of the required namespaces preconfigured and a template camelContext element.

Procedure

To add a new Apache Camel context file to your project:

  1. Select File New Camel XML File from the main menu to open the Camel XML File wizard, as shown in Figure 10.1, “Camel XML File wizard”.

    Figure 10.1. Camel XML File wizard

    Camel XML file wizard
  2. In RouteContainer, enter the location for the new file, or accept the default.

    You can click Browse…​ button to search for an appropriate location.

    Important

    The Spring framework and the OSGi Blueprint framework require that all Apache Camel files be placed in specific locations under the project’s META-INF or OSGI-INF folder:

    • Spring - projectName/src/main/resources/META-INF/spring/
    • OSGi Blueprint - projectName/src/main/resources/OSGI-INF/blueprint/
  3. In File Name, enter a name for the new context file, or accept the default (camelContext.xml).

    The file’s name cannot contain spaces or special characters, and it must be unique within the JVM.

  4. In Framework, accept the default, or select which framework the routes will use:

    • Spring — [default] for routes that will be deployed in Spring containers, non-OSGi containers, or as standalone applications
    • OSGi Blueprint — for routes that will be deployed in OSGi containers
    • Routes — for routes that you can load and add into existing camelContexts
  5. Click Finish.

    The new context file is added to the project and opened in the route editor.

Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.