Re: rest dsl not working with restlet: "Component restlet is not a RestApiConsumerFactory"

2017-01-01 Thread dermoritz
i found similar problem: http://stackoverflow.com/questions/35987688/using-the-camel-jetty-component-with-the-rest-dsl-component-jetty-is-not-a-re updating (>2.16.1) camel solved this problem -- View this message in context: http://camel.465427.n5.nabble.com/rest-dsl-not-working-with-restlet-

Re: Camel isMockEndpointsAndSkip doesn't skip jdbc endpoint

2016-09-27 Thread dermoritz
I found a solution. First overriding "isMockEndpointsAndSkip()" isn't working at all (using every pattern including "jdbc:*"). Implementing an AdviceRoutBuilder by my self is working: But only by using weaveById. The interceptSend... is not working! Using interceptSend... is showing a routedefin

Camel isMockEndpointsAndSkip doesn't skip jdbc endpoint

2016-09-26 Thread dermoritz
I have a route that end on a jdbc endpoint: The jdbc Endpoint is created this way: In my unit test i want "mock and skip" the database: I also tried other patterns: "jdbc:db", "jdbc://db" (this string is shown in log and is the output of toString) But no matter what pattern used the

camel-jpa “no transaction is in progress”

2016-09-19 Thread dermoritz
i am trying to write an entity to database with camel jpa component. The problem is that i get javax.persistence.TransactionRequiredException: no transaction is in progress at org.hibernate.internal.SessionImpl.checkTransactionNeeded(SessionImpl.java:3428) at org.hibernate.inte

How to set not string properties in rest dsl

2015-11-20 Thread dermoritz
I am using restlet component and want to set the property "restletRealm" on it. My problem is that all set Property methods only take a string as value. So i get an exception that string can not be converted to map if i set: restConfiguration().component("restlet").port(port).endpointProp

Rest with basic auth

2015-11-18 Thread dermoritz
i created a little app that provides some services via rest. I am using rest dsl with restlet component (i hav no problem if i have to switch). No i want to secure it with basic auth so that i can provide the credentials in url: http://user:p...@myservice.com/getsome I tried it to set it up as de

rest dsl not working with restlet: "Component restlet is not a RestApiConsumerFactory"

2015-11-10 Thread dermoritz
I am trying to use Restlet component with rest dsl but i get "Component restlet is not a RestApiConsumerFactory" This route is working fine (camel 2.16): public void configure() throws Exception { restConfiguration().component("restlet").apiContextPath("/").port(port); from(r

Re: Rest with restlet works within eclipse but fails on command line

2015-11-04 Thread dermoritz
i solved this problem by not packaging an über-jar with maven-shade or maven-assembly (jar with all dependencies inside). Now i pack all dependencies in separate lib folder and it is working - don't ask why. -- View this message in context: http://camel.465427.n5.nabble.com/Rest-with-restlet-wo

Rest with restlet works within eclipse but fails on command line

2015-11-03 Thread dermoritz
I created a little camel app that creates some rest endpoints. If i run the main method from within eclipse all is fine: [main] INFO org.apache.camel.impl.DefaultCamelContext - Route: route3 started and consuming from: Endpoint[http://localhost:8082/hello/(para)?restletMethods=GET] [main] INFO org

Re: trying to use Rest with restlet component still getting "Cannot find RestConsumerFactory in Registry"

2015-10-29 Thread dermoritz
i am using camels main.run() -- View this message in context: http://camel.465427.n5.nabble.com/trying-to-use-Rest-with-restlet-component-still-getting-Cannot-find-RestConsumerFactory-in-Registry-tp5773162p5773195.html Sent from the Camel - Users mailing list archive at Nabble.com.

trying to use Rest with restlet component still getting "Cannot find RestConsumerFactory in Registry"

2015-10-28 Thread dermoritz
I am trying to get a simple rest service to work: restConfiguration().component("restlet"); from(rest:get:hello).process(answer) I added org.apache.camel camel-restlet 2.16.0 " to my pom. But i still get "java.lang.IllegalStateException: Cannot find RestConsumerFactor

AllowUseOriginalMessage do i need it?

2015-10-22 Thread dermoritz
I am not sure about "AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance." In my route the original message is not used in error handler but i attached a RoutePolicy that implements onExchan

Re: [camel-jdbc] opens one thread per update query until db error

2015-10-19 Thread dermoritz
fixed it myself: the problem was that i used the same endpoint to read and write data (both jdbc). The endpoint was set to use streamlist as output type that caused the problem. Now i am using 2 different endpoint (cumbersome to create 2 distinct endpoints for endpoints that are singleton) and the

Re: When original exchange "isDone" - with aggregator?

2015-10-15 Thread dermoritz
The solution is very simple: if i substitute "exectutorService(...)" or "parallelProcessing()" by "thread(validationThreads)" all works fine! So i think there is a bug in aggregators implementation of multithreading. -- View this message in

.parallelProcessing vs .thread(i)

2015-10-14 Thread dermoritz
I just found out about .thread(numberOfThreads) but until now i only used "parallelProcessing()" (on splitter, aggregator). Since i have got a problem with parallelProcessing on aggregator (https://issues.apache.org/jira/browse/CAMEL-9222), i tried it with "thread" and this is working! What is the

How detect finish in Composed Message Processor EIP?

2015-10-13 Thread dermoritz
I have a route (triggered manually) that looks like this (pseudo code) from( trigger ) .routePolicy( new FinishNotifier( onFinsh ) ) .to( JDBCEndpoint ).split().body() .streaming() .process( setIdAndHeaderCount ) .aggregate( heade

Re: When original exchange "isDone" - with aggregator?

2015-10-13 Thread dermoritz
but where to put ".process( aggregationHeaderProcessor ) " into "composed eip pattern with the splitter only example "? -- View this message in context: http://camel.465427.n5.nabble.com/When-original-exchange-isDone-with-aggregator-tp5772577p5772603.html Sent from the Camel - Users mailing lis

Re: When original exchange "isDone" - with aggregator?

2015-10-13 Thread dermoritz
Probably it does fit very well... Thanks Claus! sorry for too fast reply -- View this message in context: http://camel.465427.n5.nabble.com/When-original-exchange-isDone-with-aggregator-tp5772577p5772602.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: When original exchange "isDone" - with aggregator?

2015-10-13 Thread dermoritz
I am not sure if this pattern matches. In my case i have to aggregate a data base result set (aggregating same primary key due to a 1:n relation). After this aggregation a need parallelProcessing. The route worked fine without the aggregator and parallelProcessing and it works fine with aggregato

Re: When original exchange "isDone" - with aggregator?

2015-10-12 Thread dermoritz
Same problem with onCompletion. If i turn of exectutorService/parallelProcessing all works fine! But the main feature of the app is the parallel validation (validationProcessor) -- View this message in context: http://camel.465427.n5.nabble.com/When-original-exchange-isDone-with-aggregator-tp

When original exchange "isDone" - with aggregator?

2015-10-12 Thread dermoritz
My route looks like this from( trigger ) .routePolicy( new FinishNotifier( onFinsh ) ) .to( in ).split().body() .streaming() .process( aggregationHeaderProcessor ) .aggregate( header( AggregationHeaderProcessor.ORDER_ID_HEADER ),

Re: does executorService implies parallelProcessing?

2015-10-07 Thread dermoritz
Thanks! you are providing the best support i have ever got (including many expensive commercial products) -- View this message in context: http://camel.465427.n5.nabble.com/does-executorService-implies-parallelProcessing-tp5772375p5772377.html Sent from the Camel - Users mailing list archive a

does executorService implies parallelProcessing?

2015-10-07 Thread dermoritz
I am using split and aggregator both provide "parallelProcessing". In my case i want to configure the number of threads, so i use executorService to set an executor with configured number of threads. My question is do i need to explicitly set parallelProcessing or does setting executorService doe

Re: aggreagator completion based on correlation key

2015-10-06 Thread dermoritz
Ok i made some mistakes. The predicate with eagerCheckCompletion isn't working. It is very hard to test stuff that uses timeout (e.g. completion) with the debugger :-P So how to implement completion here? I know that the last group is complete if the correlation key changed. But where/how to impl

Re: Problem with custom aggregation/ custom correlation (data base rows)

2015-10-06 Thread dermoritz
Thanks to input from here I created a working solution. Please comment if you have suggestion (especially about: is it possible to get rid of the processor thats sets correlation header, is there

Re: aggreagator completion based on correlation key

2015-10-06 Thread dermoritz
thanks, i did this, but it only works in conjunction with ".eagerCheckCompletion()". So in my processor that sets the correlation id i store the last id and if the id changes (the exchange will start a new group) i set an complete header. i will give a complete solution here: http://camel.465427.

aggreagator completion based on correlation key

2015-10-06 Thread dermoritz
in my route i want to aggregate exchanges based on a header value (a processor extracts it from the body and sets the header) the route looks like this: from(direct).process(new SetCorrelationHeader).aggregate(header("id"), new CustomAggregator).completion.to(mock) I want to aggregate all messag

Re: Problem with custom aggregation/ custom correlation (data base rows)

2015-10-06 Thread dermoritz
I feared that - we just migrated to 2.14.3 (not easy in the current project). So going to 1.16 (is it released yet?) is no option at the moment. How would you achieve this with 2.14? Within aggregator or with custom correlation predicate and aggregator? -- View this message in context: http

Problem with custom aggregation/ custom correlation (data base rows)

2015-10-06 Thread dermoritz
I am fetching data from data base (jdbc component) that contains 1:n relations. That means that i have multiple entries with same id: id1,childId1, childFieldValue1, id1,childId2, childFieldValue2, id2,childId3, childFieldValue1, id2,childId4, childFieldValue2, id2,childId5, childFieldValue3,

Re: Camel ExchangeCompletedEvent vs. RoutePolicy.onExchangeDone

2015-10-01 Thread dermoritz
Thanks, that makes many things much clearer :-) -- View this message in context: http://camel.465427.n5.nabble.com/Camel-ExchangeCompletedEvent-vs-RoutePolicy-onExchangeDone-tp5772140p5772146.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel ExchangeCompletedEvent vs. RoutePolicy.onExchangeDone

2015-10-01 Thread dermoritz
Thanks for your quick reply Claus, my problem is that from inside ExchangeCompletedEvent or onExchangeDone i don't know if it is the original exchange or a split exchange. Or: How to know if an exchange is the "original exchange"? (i know how to detect if a splitter is done, but in my case i only

Camel ExchangeCompletedEvent vs. RoutePolicy.onExchangeDone

2015-09-30 Thread dermoritz
My camel route is configured like this (pseudocode) from(direct:in).to(jdbc:db).split().body().streaming().parallelProcessing() .process(doSomething).process(createDBquery).out(jdbc:db) The jdbc endpoint is configured to put out JdbcOutputType.StreamList. The route is triggered by sending a selec

Re: camel jdbc component detect end of streamlist

2015-04-23 Thread dermoritz
Thanks for fast reply Claus, no no parallel processing is enabled. the complete route is this: from(cronTriggerEndpoint) .setBody(simple(selectQuery(tableName))) .to(dataBase).id("dbEndpoint"+isOnceAtStart).split().body()

camel jdbc component detect end of streamlist

2015-04-23 Thread dermoritz
I am using camels jdbc component to load big tables into another system. Because i need to start other routes after loading table is finished i need to detect when all table entries are passed. Because the size of the table i am using this setup () .to("jdbc:testdb?outputType=StreamList")

getMBeanServer() returns null on DefaultCamelContext - why?

2015-04-09 Thread dermoritz
I want to register an own MBean (dynamic MBean) in my Camel application. For this i use context.getManagementStrategy().getManagementAgent().getMBeanServer().registerMBean(dMBean, null); The problem is that "getMBeanServer()" returns null. Javadoc says: "Notice: If the JMXEnabled configuration is

Re: Setting up CamelContext with Guice

2015-03-26 Thread dermoritz
i just created an ticket with a suggestion: https://issues.apache.org/jira/browse/CAMEL-8555 -- View this message in context: http://camel.465427.n5.nabble.com/Setting-up-CamelContext-with-Guice-tp5764709p5764818.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Setting up CamelContext with Guice

2015-03-26 Thread dermoritz
My problem with camels built in guice was, i could not control the start of the context. This happens as soon as guice begins - within the module you are extending (calling run is not necessary). So my alternate solution to use guice is: I extended org.apache.camel.main.Main and injected my bound c

how to create "@ManagedOperations" at runtime

2015-03-26 Thread dermoritz
The use case is: I want expose a number of methods via jmx but the number of methods is known at runtime - given by user settings (constant after start). An alternate solution would be to expose a method that returns a list of strings (the relevant user settings) and another method that has a stri

Re: StackOverflowException for route (using cxf component) sending to soap endpoint

2015-03-23 Thread dermoritz
Thanks for the hints, you are right here are the cxf part/ to-part of route: rtdmProcess.to(rtdmEndpoint).to(tpLoggerToRtdm).process(handleRtdmAnswer).to(tpLoggerFromRtdm) rtdmEndpoint is cxf it is created this way: CxfEndpoint endpoint = new CxfEndpoint(rtdmUrl, new CxfComponent(c

StackOverflowException for route (using cxf component) sending to soap endpoint

2015-03-19 Thread dermoritz
e see here for those errors (first few lines) and exception: https://gist.github.com/dermoritz/209e7158e41e02849843 The only hints to our code are: " [bufferToRtdm file:] [process18 ] [com.example.cep.beans.GenerateInputForRtdm@2d16aa9e ] [ 0] [bu

Re: Names of custom MBeans contain hex-number at the end

2015-03-17 Thread dermoritz
Thanks, that was easy. In my case i use Guice and bound my Serviceimplementations as Singletons - so i am quite sure there is only one. -- View this message in context: http://camel.465427.n5.nabble.com/Names-of-custom-MBeans-contain-hex-number-at-the-end-tp5764226p5764252.html Sent from the C

Names of custom MBeans contain hex-number at the end

2015-03-16 Thread dermoritz
I created some custom MBeans (implementing Service). they work as they should but for some reason their names have some hexadecimal number at the end e.g. "JmxController (0x32e652b6)". Is there a way to get rid of this number? What does this number mean - only my custom "Services" have such a numbe

Dynamic MBeans/ dynamically create MBeans in Camel

2015-03-16 Thread dermoritz
Thanks to this mailing list i know how to create custom mbeans by implementing Service and adding them to CamelContext. But is there also such an easy way to create/add dynamic MBeans and or dynamically create Mbeans - Attributes/Operation and or MBeans are defined on Runtime? In my case i read us

custom service to expose jmx methods - Exception: no security manager: RMI class loader disabled

2015-01-27 Thread dermoritz
i successfully added a custom class that implements org.apache.camel.Service to expose some functionality. All methods returning void work fine. Now i added a method that returns a String (multiple lines). Calling this with jconsole or MissionControl yields: java.rmi.UnmarshalException: Er

Re: jmx- annotated RouteBuilder not showing up in JConsole

2014-12-15 Thread dermoritz
Thanks for the hint that helped much - i tried both. on first site there is no different in extending ServiceSupport (onStart, onStop mus be added) or implementing Service (start, stop methods must be added). -- View this message in context: http://camel.465427.n5.nabble.com/jmx-annotated-Route

Re: Lately (2.14) NullPointerExceptions instead of TypeConversionExceptions

2014-12-15 Thread dermoritz
Probably the stacktrace will not help: the npe is thrown on the line where i use the object returned from getBody(Some.class); The problem ist that no exception is thrown by getBody(Some.class) but null is returned. So there must be a path that returns null. -- View this message in context: ht

Re: jmx- annotated RouteBuilder not showing up in JConsole

2014-12-11 Thread dermoritz
Thanks for this hints. i will try this. In my case i would need an separate class (my RouteBuilder is extending RouteBuilder) but that's no problem. in long term it is probably better to have an separate class for jmx controls. -- View this message in context: http://camel.465427.n5.nabble.com/

jmx- annotated RouteBuilder not showing up in JConsole

2014-12-10 Thread dermoritz
I tried to annotate a RouteBuilder with @ManagedResource and a method from it with @ManagedOperation but i can't find it in JConsole. The other classes including my annotated custom endpoint is showing up fine. I am not sure if these annotations work with all kinds of classes within camel?! In my

Re: jdbc component streamList, last row

2014-12-03 Thread dermoritz
Thanks Claus, i found a solution for the moment: The stream list is an Iterator and i use hasNext(). If this is false it is probably the last entry. BUT the problem is that there are multiple threads with those lists. In my tests i always got 2 times hasNext()=false. -- View this message in c

Re: Starting a rout once on start and then always at 3am

2014-12-03 Thread dermoritz
thanks in meanwhile i took the 2 routes way. it's working fine and fits well. but i 'll think about your three route approach. -- View this message in context: http://camel.465427.n5.nabble.com/Starting-a-rout-once-on-start-and-then-always-at-3am-tp5759767p5760018.html Sent from the Camel - U

jdbc component streamList, last row

2014-12-01 Thread dermoritz
I am using jdbc component with streamList as output type. Is there a way to know when last row arrived? (probably there is a special exchange property?!) -- View this message in context: http://camel.465427.n5.nabble.com/jdbc-component-streamList-last-row-tp5759876.html Sent from the Camel - Us

need "CamelSplitComplete" in RoutePolicy.onExchangeDone but get original exchange

2014-12-01 Thread dermoritz
I have a route that streams big lists of db data to target: from(onceAtStartTrigger).setBody(simple(selectQuery())).to(dataBase).split().body().streaming() .aggregate(constant(true), rowAggregator).completionSize(CHUNK_SIZE) .completionTimeout(COMPLETION_TIMEOUT).p

Re: Starting a rout once on start and then always at 3am

2014-11-28 Thread dermoritz
you mean i should create 2 routes: from(timer:repeateOnce).to(jdbc) and from(timer:cronExpr).to(jdbc) ? thats not very beautiful but a good option. What about (came to mind in meanwhile): from(timer:cronExpr).to(direct:startNow).to(jdbc:) does this work? -- View this message in context:

Starting a rout once on start and then always at 3am

2014-11-28 Thread dermoritz
I have a route using jdbc component to fetch some data from db. so my idea is: from("quartz:").to(jdbc:...) My problem is that "fireNow" seems only to work for simple timer. Is there an easy way to fire the route once at start (after first run this route triggers start of other routes.)? --

Lately (2.14) NullPointerExceptions instead of TypeConversionExceptions

2014-11-28 Thread dermoritz
Some day ago i switched to camel 2.14 (mainly because of RoutePolicyFactory - a great idea!). But i also noticed on creating new routes with new processors/ aggregators i see many NullPointerExceptions in lines that use object from exchange.getIn().getBody(Some.class). In those cases the body was n

Re: split big sql result in smaller chunks

2014-11-27 Thread dermoritz
Thanks, with a normal split i have one row per exchange. So i would need an aggregator to create bigger chunks. But what is the difference to sql-components "useIterator=true" with this i also get one exchange per row but with no need to split. -- View this message in context: http://camel.

Re: split big sql result in smaller chunks

2014-11-27 Thread dermoritz
Thanks for quick reply, but what is the difference between sql-component's "consumer.useIterator = false" (this creates List>) and jdbc-component's "streamList"? In both cases i need to write a custom splitter right? -- View this message in context: http://camel.465427.n5.nabble.com/split-big

split big sql result in smaller chunks

2014-11-27 Thread dermoritz
Because of memory limitation i need to split a result from sql-component (List>) into smaller chunks (some thousand). I know about from(sql:...).split(body()).streaming().to(...) and i also know .split().tokenize("\n", 1000).streaming() but the latter is not working with List> and is also return

Where to do context setup stuff in a guice enabled camel app

2014-11-25 Thread dermoritz
i am using guice in conjunction with "CamelModule" in my camel application (standalone using Main). In my case i need to do some things on the context before starting it: context.addRoutePolicyFactory(startUpLogic); context.getRegistry(JndiRegistry.class).bind(CepModule.LOOKUP_DATASOURCE, ds); Bu

How to implement special start up logic using RoutePolicyFactory

2014-11-21 Thread dermoritz
I have a standalone guice camel app using CamelModul/GuiceCamelContext. Now i need to implement a special start-up logic: If application is started make sure that no route is started (set all to autostart false) but start 2 certain routes (from("sql...")). If both routes finished start all other ro

Re: camel sql, select is returning many exchanges of type map instead of one List>

2014-11-20 Thread dermoritz
I just can say thanks! (by the way all in all camel i the best api i ever worked with) -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-select-is-returning-many-exchanges-of-type-map-instead-of-one-List-Map-tp5759374p5759406.html Sent from the Camel - Users mailing

camel sql, select is returning many exchanges of type map instead of one List>

2014-11-20 Thread dermoritz
I just tried out camel-sql component (with mysql datasource). The documentation states that select queries should return one Exchange with List> with the given test: List received = assertIsInstanceOf(List.class, mock.getReceivedExchanges().get(0).getIn().getBody()); I created a simple table with

Re: camel cxf convert comma separated string to one parameter - how to escape comma

2014-11-18 Thread dermoritz
Thanks this is working! List is working too, i use Arrays.asList("one,parameter"). In meanwhile i tried to send the real payload object (used the generated code), this is working on another CxfProducer in our project (no data mode set!). But in this case camel tries to convert the xml-object back

camel cxf convert comma separated string to one parameter - how to escape comma

2014-11-18 Thread dermoritz
I want to send a comma separated string to simple web service (cxf based). Without comma all works fine. Camel's type converters and magic take the string and find the only method that takes a string in wsdl and generate the xml (the wsdl has only one method at all). If i send a comma separated str

How to aggregate many marshalled (json) objects to one file

2014-11-17 Thread dermoritz
I created a route to buffer/store marshaled objects (json) into files. This route (and the other route to read the buffer) work fine. storing in buffer: from(DIRECT_IN).marshal().json().marshal().gzip().to(fileTarget()); reading from buffer: from(fileTarget()).unmars

problem/glitch/bug in file component?

2014-11-11 Thread dermoritz
in my camel app (standalone jar, guice) i have 2 routes that use/create a file buffer. So there are routes like this from(someEndpoint)..to("file:/bufferFolder") from("file:/bufferFolder").to(otherEndpoint) In many cases i want to set the file name. In one case i include the time stamp in an other

Re: guice-maven-plugin documentation down?

2014-11-07 Thread dermoritz
Thanks for the info Claus, so there is no current Documentation at the moment? I think i can't contribute to guice-maven-plugin doc, cause i don't know anything about it. all goals i tried yield errors (embedded) or did nothing (dot). But probably i can contribute a little thing to GuiceDoc: I wo

guice-maven-plugin documentation down?

2014-11-07 Thread dermoritz
Hi there, since some time i am using camel with guice. Now i want to try the guice-maven-plugin . But on this site i get many errors and the examples are not shown. On linked site

Re: How to split to files and add number to output file names (not overwrite)

2014-10-28 Thread dermoritz
Thx claus, but i read those sites already. The problem was i couldn't find any hint on adding a number or count on the files. But Stackoverflow helped: http://stackoverflow.com/questions/26593037/how-to-split-to-files-and-add-number-to-output-file-names-not-overwrite/26595652#26595652 i set the

How to split to files and add number to output file names (not overwrite)

2014-10-27 Thread dermoritz
I have a route that splits large files into smaller ones. All split files should be written to same directory. The default behavior of file endpoint (producer) seem to overwrite always. Is there an easy way to let the file producer do a simple rename by adding a counter to file name? Like in OS if

sending nearly same message multiple times to same endpoint

2014-09-29 Thread dermoritz
i have to create a route that sends a message (SOAP) multiple times to same endpoint. The only difference in message is that one attribute (xml, set) is different. At the moment i am using multicast for this: MulticastDefinition multicast = rtdmProcess.multicast();

Re: How to relay different parts of message to different endpoints

2014-08-26 Thread dermoritz
shit happens here the link: http://stackoverflow.com/questions/25488026/split-csv-file-by-number-of-fields-each-line-different-to-different-target-end -- View this message in context: http://camel.465427.n5.nabble.com/How-to-relay-different-parts-of-message-to-different-endpoints-tp5754836p5755

Re: How to relay different parts of message to different endpoints

2014-08-26 Thread dermoritz
for sake of completeness here a link to stackoverflow, my answer is based on pkmcculloch's solution the accepted answer is another way. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-relay-different-parts-of-message-to-different-endpoints-tp5754836p5755679.html Sent

combining split().choice()...

2014-08-25 Thread dermoritz
At the end i want to solve this problem http://camel.465427.n5.nabble.com/How-to-relay-different-parts-of-message-to-different-endpoints-td5754836.html the suggestion there is to use split but i need to send the split parts to different sets of endpoints - based on a special attribute. So with the

Re: How to relay different parts of message to different endpoints

2014-08-25 Thread dermoritz
Thanks, the problem with this solution is i need a 2nd processor or a custom predicate that could be used in choice().when(). Since each "pair" must be routed to a different set of endpoints i need the "when" to use the integer. I think it would be much better to let the first producer just send

Re: How to relay different parts of message to different endpoints

2014-08-07 Thread dermoritz
Thanks but please tell what this is "List of pairs (fieldcount,byte[])" or how to create it and use with splitter? -- View this message in context: http://camel.465427.n5.nabble.com/How-to-relay-different-parts-of-message-to-different-endpoints-tp5754836p5754882.html Sent from the Camel - User

Re: How to relay different parts of message to different endpoints

2014-08-06 Thread dermoritz
process() is a void method but do you mean instead of a byte[] i just List into "exchange.getOut().setBody(returnVal)? The split would then automatically split into 2 byte[]? but how to know the number of fields in each one? -- View this message in context: http://camel.465427.n5.nabble.com/Ho

Re: How to relay different parts of message to different endpoints

2014-08-06 Thread dermoritz
How to do this? The 2 byte[] are created into a processor. I have to create 2 byte[] from one byte[] and i don't want to read the input byte[] twice. In meantime i found: http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html with this i think i can create 2

Re: How to relay different parts of message to different endpoints

2014-08-06 Thread dermoritz
>From unmarshal().gzip() comes a byte[] (with mixed number of fields in each line). My processor scans the byte[] line by line some lines have 35 ',' some have 65 ',' and i want to scan each byte[] only once. So i create 2 byte arrays one with 35er lines and one with 65er lines. My question is wha

Re: How to relay different parts of message to different endpoints

2014-08-06 Thread dermoritz
Thanks, in my case i don't want to use unmarchal().csv() because i don't need the lines to be split (complet csv lines will be sent to "to"). So my route i something like this: from("file:src/test/resources/?fileName=foo.csv&noop=true"). unmarshal().gz(). // body is byte[] at the moment my

Re: How to relay different parts of message to different endpoints

2014-08-06 Thread dermoritz
Thanks for this hint but how to implement the processor that splits to 2 types: if i scan through the file i'll end up with 2 messages/blocks (1 for each content type). So how to implement the splitting - create 2 exchanges (for each content type) from on exchange (1 csv file). Is there a way that

How to relay different parts of message to different endpoints

2014-08-06 Thread dermoritz
I have to handle csv (gz compressed) files that contain lines with different number of fields. at the moment i am only interested in lines with 35 fields (contain 34 ','). I wrote a processor that filters those lines. after the processor the exchange is multicasted to some endpoints. Now i also ne

How to release lock of file to move it on exception (corrupted gz file)

2014-08-06 Thread dermoritz
I need to implement a handler that reacts on ZipException to move away corrupted gz files, otherwise the route will endlessly retry to unmarshal the gz. The problem is that at the moment the exception is thrown there is a lock on this file (on linux "canWrite()" returns fals) and ther is the camel

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
ok i found the solution: the problem was - the config on production was slightly diferent - without throttle. Calling setId on a ThrottleDefinition simply doesn't work (or at least does not set the route id). So i changed the code to set the id before doing "routeDef = routeDef.throttle" (How to

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
on which class i can found "setRouteId"? It seems not part of RouteDefinition (http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinition.html) - i can't put it within route definition (from...to)?! but why to use another method here, until now this is work

naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
We encountered a very strange behavior. In our camel app we set the id of all routes via "setId(id)". This is working fine so far. One of our route builders generates n routes in a for loop and uses + as route id. Here set Route is called on a ThrottleDefinition. This is working fin on mot of our

Re: Exception on adding throttle "Definition has no children on Throttle"

2014-07-22 Thread dermoritz
Thanks for quick reply (it is working), the only downside on this is i can't call autoStartup(false) on ProcessorDefinition. The only workaround i see is to use another variable for ThrottleDefinition or set autoStartup on RouteDefinition and then cast to ProcessorDefinition? -- View this mes

Exception on adding throttle "Definition has no children on Throttle"

2014-07-22 Thread dermoritz
i am creating some routes with jave in a for loop (all is working fine). now i need to add "throttle" to the outer route definition" but with it i get: Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route cepToRtdmdfESP://192.168.154.128:5/TEST/TEST/P

Re: Log out sent xml data for cxf producer

2014-07-22 Thread dermoritz
found "loggingFeatureEnabled" if set to true all in- and outbound messages are logged. The only problem with it is: it is logging as "info" what is not appropriate. -- View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245p5754251.html

Re: Log out sent xml data for cxf producer

2014-07-22 Thread dermoritz
Thanks this was fast, in meanwhile i found this from (http://stackoverflow.com/questions/23339650/capturing-apache-camel-route-cxf-web-response) http://localhost:8181/cxf/webservice?wsdlURL=src/main/resources/META-INF/webservice.wsdl&serviceName={http://carose.com/}EchoServiceImplSe

Log out sent xml data for cxf producer

2014-07-22 Thread dermoritz
Is there an easy way to log the xml data sent to a web service? We need this only for debugging. So if this could be switched with loglevel would be great. -- View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245.html Sent from the Came

Re: Usage of interface NotificationSender and @ManagedNotification

2014-07-21 Thread dermoritz
Thanks for the hint Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Usage-of-interface-NotificationSender-and-ManagedNotification-tp5753980p5754186.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Setting jmx object name (...name=myName)

2014-07-21 Thread dermoritz
I looked into DefaultManagementNameStrategy and DefaultManagementNamingStrategy. The first one can be set on camel context and the last one is used to inject beans. At the end no one helped here but on looking into their code i found that the endoints method "getEndpointKey()" is used to create

Re: Setting jmx object name (...name=myName)

2014-07-19 Thread dermoritz
sorry for stupid question, this should be sufficient: http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/DefaultManagementNamingStrategy.html (as you said) -- View this message in context: http://camel.465427.n5.nabble.com/Setting-jmx-object-name-name-myName-tp

Re: Setting jmx object name (...name=myName)

2014-07-19 Thread dermoritz
Thanks Claus, 'Til now i tried it one time to implement Namingstrategy (i let Eclipse show me all methods to be implemented). On first glance i could not see how to get the default name but only change the last part. Are there any examples or what is the name of the default implementation camel u

Setting jmx object name (...name=myName)

2014-07-18 Thread dermoritz
I annotated an endpoint with @ManagedResource. I noticed that per default the endpoints uri ist part of object name (the last part after name). Is there a way to change this part? I tried getCamelContext().getManagementNameStrategy().setNamePattern("myName"); But this changes the wrong part.

Usage of interface NotificationSender and @ManagedNotification

2014-07-17 Thread dermoritz
I love the way to use jmx in camel (just use annotations). In one of my @ManagedResources i want to publish notifications. I think camel is shipped with support for that too: I found the interface "NotificationSender": " /** * To be implemented by classes that can send out notifications */ publi

Re: How to emit jmx events (with JmxNotificationEventNotifier?)

2014-07-17 Thread dermoritz
i found this http://docs.oracle.com/javase/tutorial/jmx/notifs/ (some time ago i created self made jmx), but my question is how to integrate it with camel context's mbean server. I want to use as much as possible from camel. -- View this message in context: http://camel.465427.n5.nabble.com/H

Re: How to expose camel producer with jmx

2014-07-17 Thread dermoritz
Thanks Claus! -- View this message in context: http://camel.465427.n5.nabble.com/How-to-expose-camel-producer-with-jmx-tp5753833p5753976.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to emit jmx events (with JmxNotificationEventNotifier?)

2014-07-17 Thread dermoritz
Thanks, does this mean i don't need "JmxNotificationEventNotifier"? If i use those standard classes to emit notifications: can i found them under "notification" in same subtree as my "operations"/"Attributes" of my "@ManagedResource"? A @ManagedNotifier would be great. Annotation for method that

  1   2   >