Questions tagged [apache-camel-cdi]

The Apache Camel CDI component provides auto-configuration for Apache Camel using CDI as dependency injection framework based on convention-over-configuration.

The Apache Camel CDI component provides auto-configuration for Apache Camel using CDI as dependency injection framework based on convention-over-configuration. It auto-detects Camel routes available in the application and provides beans for common Camel primitives like Endpoint, ProducerTemplate or TypeConverter. It implements standard Camel bean integration so that Camel annotations like @Consume, @Produce and @PropertyInject can be used seamlessly in CDI beans. Besides, it bridges Camel events (e.g. RouteAddedEvent, CamelContextStartedEvent, ExchangeCompletedEvent, ...) as CDI events and provides a CDI events endpoint that can be used to consume / produce CDI events from / to Camel routes.

Site: http://camel.apache.org/cdi.html

24 questions
3
votes
2 answers

Camel-Cdi not injecting CamelContext with Registery

I am using camel-cdi and it is injecting the CamelContext, detecting all the routes in project. But I want a CamelContext with a registry because I have some components that I use in camel routes like shown below. SimpleRegistry registry = new…
2
votes
1 answer

Apache Camel in Payara: Lookup failed for 'java:/TransactionManager'

I want to use Apache Camel in a war project that is deployed to a Payara server, but once I add the camel-cdi jar to the project, deploying the application fails with Exception while deploying the app [TheProject-1.0-SNAPSHOT] : JNDI lookup failed…
Cephalopod
  • 14,632
  • 7
  • 51
  • 70
2
votes
1 answer

Asynchronous events in camel-cdi

According to http://camel.apache.org/cdi.html @Inject @Uri("direct:event") ProducerTemplate producer; void observeCdiEvents(@Observes String event) { producer.sendBody(event); } from("direct:event") .log("CDI event received: ${body}"); is…
JoshOvi
  • 88
  • 7
2
votes
1 answer

CamelContext camelContext = SpringCamelContext.springCamelContext(appContext, false); deprecated in camel version 2.17.3

I'm using Spring + Apache Camel example. In this example earlier I was using camel-core version 2.15.1. Now I just updated dependency to 2.17.3 When I updated dependency I see that below method gets deprecated: CamelContext camelContext =…
user4821194
1
vote
1 answer

WELD-001408: Unsatisfied dependencies for type CdiCamelExtension with qualifiers @Default

We are migrating from EAP 6 to EAP 7 one project that uses Apache Camel. In this project, we are using dependency injection using the CDI 2.0 specification provided by EAP 7. We are migrating from EAP 6.4 which is using CDI 1.X specification. The…
1
vote
2 answers

Cant inject bean in Processor

I'm trying to use @BeanInject in a processor but it is always null. I can access the bean in a RouteBuilder, and also in a Processor if it is defined in the RouteBuilder but not if the Processor class is in its own file. Is this not supported or am…
Johan E
  • 95
  • 1
  • 8
1
vote
1 answer

camel-cdi how to not auto start CamelContext and not auto discover RouteBuilder

In previous projects i often used Guice also in conjunction with camel. My approach was to extend Camel's Main class and inject my preconfigured context there. I needed to control start of the context. Before start of context i did some preperation…
dermoritz
  • 12,519
  • 25
  • 97
  • 185
1
vote
0 answers

widlfly Apache Camel Installation and run

Does not understand how to run wildfly 10 Apache Camel/CDI project and how to install widlfly camel pack. getting started guide does not show where to unpack downloaded subsystem . https://wildflyext.gitbooks.io/wildfly-camel/content/start/ What…
Armen Arzumanyan
  • 1,939
  • 3
  • 30
  • 56
0
votes
1 answer

Apache Camel Custom Component Migration Endpoint Exception

Hi I write my custom camel component and it is working until I upgrade the version. I uprade my version 3.1 to 3.2 but I got error Resolved [org.apache.camel.NoSuchEndpointException: No endpoint could be found for: my-rest-client, please check…
Bilgehan
  • 1,135
  • 1
  • 14
  • 41
0
votes
0 answers

Why is CAMEL-CDI not working with camel 3, could it be an issue with POM dependencies?

I am facing an issue with loading the Camel-CDI Project. I am Facing an issue while using camel 3. Camel 2.18.1 works fine. it Could be a POM Dependency error. But I don't know what's causing it.I am Attaching my POM file. [INFO] Starting Camel…
Dinesh Ghanta
  • 23
  • 1
  • 6
0
votes
1 answer

How to setHeader in Camel Test

I am working with the task in which, I have set header in one of the processor. exchange.getIn().setHeader("ResourceSpec", equipmentSpec.getSpec()); While writing the test cases, it was expecting for value.because of that test cases getting…
Kavin
  • 43
  • 8
0
votes
1 answer

Apache Camel: Is creating multiple Routes costly operation?

Following is just requirement: Read from DB Create 3 files from data with only small setter addition on if statement Deliever 3 to same sftp Coding: 1 Route Timer which to(direct) 1 Route trigger which call same (direct) 1 ROUTE - from(direct)…
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
1 answer

Apache Camel - exchange.getIn().getBody(ZipFile.class) returns NULL but exchange.getOut().setBody(zipfile) works fine

I'm trying to zip a message (String) into a zip file, and then set it as the body of the exchange object in Apache Camel, so that one of the downstream services (also using Apache Camel) is able to extract the zip file using the…
GopherGopher
  • 376
  • 1
  • 2
  • 16
0
votes
0 answers

How to perform Arquillian Testing with Apache Camel Routes

I'm new to Apache Camel. I have written simple program to place a file to another Location using camel routes. And I have written Junit and Mock Tests for that. This is my simpleCamelRoute.java @Component public class SimpleCamelRoute extends…
0
votes
0 answers

Exchange header data from sub-route is not available in the camel main-route

This is my main-route, .process(startOperation(DISTRIBUTION, GET_HOTEL_AGGREGATOR_RATES_API_MOM)) .log("Calling CredentialRoute") .bean(AggrHelper.class, "getCredential") .log("Making parallel calls to…
Raghavan
  • 401
  • 6
  • 21
1
2