apache-camel

Apache camel send a simple message

眉间皱痕 提交于 2019-12-13 06:24:21
问题 I have a simply camel MINA server using the JAVA DSL, and I am running like the example documented here: Running Camel standalone and have it keep running in JAVA MINA 2 Component I am trying to create a sample application hosted at "mina:tcp://localhost:9991" (aka MyApp_B) that sends a very simple message to a server hosted at "mina:tcp://localhost:9990" (aka MyApp_A). I want is to send a simple message containing a String in the header (which is "Hellow World!") and with the address in the

Reading enviroment variable in osgi blueprint

谁都会走 提交于 2019-12-13 06:07:02
问题 I'm building some camel routes deployed in OSGi (JBoss Fuse) I'm reading my properties file using this: <ext:property-placeholder id="propiedades"> <ext:location>file:/C:/TestBed/sucursal.propiedades</ext:location> </ext:property-placeholder> But now I want change "file:/C:TestBed/" for some placeholder with some path (like KARAF_ETC). I know this enviroment variable exists because when I use it in the route, it works ok from(URI_IN) .log("{{env:KARAF_ETC}}") //Output is: C:\jboss-fuse-6.2.0

ServiceMix / Blueprint / JPA Integration

江枫思渺然 提交于 2019-12-13 05:51:51
问题 I have been spending the week attempting to integrate JPA / ServiceMix 4.5.1 / camel-jpa 2.10.4 / Blueprint together. I'm currently using OpenJPA, but am not tied to it. The version of aries jpa used by servicemix is 0.3.0. The stack trace I cannot get past is: org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instanciating bean workoutEntity of class class [...].WorkoutEntity at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:271)[10

Camel + MyBatis + Apache Aries

孤人 提交于 2019-12-13 05:24:44
问题 I'm following the setup guide located at: Camel MyBatis Integration Guide. I am using Service Mix 5.0.1. I used features-install spring-mybatis which pulled in 3.2.4.RELEASE. My SqlMapConfig file only contains information about the typeHandlers and typeAliases. When I start service mix and then start my app I receive the following stack trace: org.osgi.service.blueprint.container.ComponentDefinitionException: Errorsetting property: PropertyDescriptor <name: configLocation, getter: null,

How to call Rest API DELETE operation with BODY content from Apache Camel?

浪尽此生 提交于 2019-12-13 05:05:44
问题 I need to call rest DELETE operation with body content. I have alternative way to do this but this is our requirement. I have tried the following way but unable to get an output. Can you give me an IDEA to achieve this? Here's my code : from("direct:start") .setHeader(Exchange.HTTP_METHOD, simple("DELETE")) .setHeader(Exchange.CONTENT_LENGTH, simple("64")) .setBody(simple("<stundent>...</student>"))) .to("http://10.1.1.1:8080/rest/student/delete/1029"); 回答1: As I stated in your other SO, do

Apache Camel Java and XPath

一个人想着一个人 提交于 2019-12-13 04:57:36
问题 So I have a web service with several namespaces that I would like to route through a bean to do some checking of user credentials. Its been a long time since I used XPATH so I might just be having a PICNIC(Problem In Chair Not In Computer Moment) error. The web service message will always have the following structure/pattern : <Operation> <header with the head name space where the user credentials are stored> <record control> <objXX> </Operation> Here is a example message(SOAP UI): <soapenv

Logs of multiple servers in hawtio dashboard

有些话、适合烂在心里 提交于 2019-12-13 04:25:20
问题 I've a hawtio 1.4.45 running in Jetty Server A where my camel application is also deployed. There is another camel application and jolokia web agent running on Jetty Server B. I'm able to get basic camel MBean details from both Server A and Server B. However I get to see the logs of only Server A and NOT Server B's. Is there any JMX settings to bring up the logs of Server B to hawtio Dashboard? 来源: https://stackoverflow.com/questions/28238101/logs-of-multiple-servers-in-hawtio-dashboard

CamelRedeliveryCounter not increasing after 2, no matter what's the value of maximumRedeliveries, is it bug?

本秂侑毒 提交于 2019-12-13 04:07:44
问题 Though it seems like sort of bug, but would like to confirm if somebody came across this situation in Apache Camel version 2.18.1.redhat-000021 , No matter what's the value for maximumRedeliveries, route on failure is only being tried twice. errorHandler(deadLetterChannel("amq:queue:ENTDLQ").maximumRedeliveries(5).useOriginalMessage() .onRedelivery((Exchange e) ->{ log.info("--------------- Re-delivered..." + e.getIn().getHeaders()); }) .redeliveryDelay(2000).retryAttemptedLogLevel

Apache Camel LRUCacheFactory deadlocks in Weblogic 12.2

旧巷老猫 提交于 2019-12-13 04:07:29
问题 I'm trying to create a (Weblogic) WAR deployment for a Apache Camel based project which runs fine on tomcat embedded. However when I start the server, I'm noticing a deadlock in LRUCacheFactory. The reported error is shown below: Found one Java-level deadlock: ============================= "Camel Thread #0 - LRUCacheFactory": waiting to lock monitor 0x85ec85a8 (object 0xb30c5c28, a weblogic.utils.classloaders.ChangeAwareClassLoader), which is held by "[STANDBY] ExecuteThread: '43' for queue:

camel split/aggregate and merge List<A> that contains List<B> that contains List<C>

余生颓废 提交于 2019-12-13 03:47:38
问题 Given a structure similar to this one: @Data public class A { //..other fields.. private List<B> bs; } @Data public class B { //..other fields.. private List<C> cs; } I have to process a list of type A in multiple steps/routes. Some operation are in the A level, others in other levels like C. The problem I'm trying to solve is to process every single C given an A and then some logic afterwards have to work with the updated A model. I can successfully split and aggregate back the list<C> but