Este conteúdo não está disponível no idioma selecionado.

Chapter 3. Features


This chapter provides the necessary information about Camel on EAP features.

Camel Context Definitions

Camel Contexts can be configured in standalone-camel.xml and domain.xml as part of the subsystem definition like this

<subsystem xmlns="urn:jboss:domain:camel:1.0">
   <camelContext id="system-context-1">
     <![CDATA[
     <route>
       <from uri="direct:start"/>
       <transform>
         <simple>Hello #{body}</simple>
       </transform>
     </route>
     ]]>
   </camelContext>
</subsystem>

Camel Context Deployments

You can deploy camel contexts to JBoss EAP with a -camel-context.xml suffix as:

  • a standalone XML file
  • a part of another supported deployment

A deployment may contain multiple -camel-context.xml files.

A deployed Camel context is CDI injectable like this

@Resource(lookup = "java:jboss/camel/context/mycontext")
CamelContext camelContext;
[discrete]
### Management Console

By default, access to management consoles is secured. Therefore, you need to setup a Management User first.

$ bin/add-user.sh

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)

The Hawt.io console should show the camel context from subsystem configuration.

hawtio camel 01

Arquillian Test Support

The Camel on EAP test suite uses the WildFly Arquillian managed container. This can connect to an already running JBoss EAP instance or alternatively start up a standalone server instance when needed.

A number of test enrichers have been implemented that allow you to have these Camel on EAP specific types injected into your Arquillian test cases.

@ArquillianResource
CamelContextFactory contextFactory;

@ArquillianResource
CamelContextRegistry contextRegistry;
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.