7.9. Adding beans and configuration


Overview

Many routing patterns rely on references to Java objects (beans) for configuration or for implementation details. You add the beans into the routing context file using the route editor's Source tab.

Procedure

To add beans to your routing context file:
  1. Open your routing context file in the route editor.
  2. Click the Source tab at the bottom of the route editor's canvas to switch to Source view, so you can edit the XML that defines the route.
  3. Enter the bean elements needed by your route before the camelContext element.
    Note
    Use the id attribute to identify the bean, not the name attribute.
    Important
    Do not edit the contents of the camelContext element. Red Hat JBoss Fuse Tooling overwrites the camelContext element when changes are made to the route diagram in Design view.
  4. Save your changes by selecting File Save on the menu bar.
  5. Click the Design tab at the bottom of the route editor's canvas to return to Design view and the route diagram.

Related topics

Chapter 9, The Source View
Apache Camel Development Guide, Part IV Programming EIP Components
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.