Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

2014-06-26 Thread dermoritz
In my camel app i am creating cxf endpoints in java dsl: CxfEndpoint cxf = new CxfEndpoint(rtdmUrl, new CxfComponent(this.getContext())); cxf.setServiceClass(EventPortType.class); process.process(rtdmSetNameFactory.get(eventName)).to(cxf).process(handleRtdmAnswer); If try to run this route i get:

Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

2014-06-26 Thread dermoritz
Here it is: [INFO] com.sas:cep-adapter-java:jar:1.0-SNAPSHOT [INFO] +- com.sas:dfESP-component:jar:1.0-SNAPSHOT:compile [INFO] | \- dfx-esp-api:api:jar:2.2-post:compile [INFO] +- com.sas.o2:RTDM_general_client:jar:0.0.1-SNAPSHOT:compile [INFO] +- com.google.inject:guice:jar:3.0:compile [INFO] |

Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

2014-06-27 Thread dermoritz
Thanks for quick reply. My main looks as follows: public static void main(final String... args) throws Exception { Injector i; if (args.length < 1 || Strings.isNullOrEmpty(args[0])) { i = Guice.createInjector(new CepModule()); } else { i = Guice.

Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

2014-06-30 Thread dermoritz
i created an minimal example that reproduces the problem: cxfTests.zip or https://bitbucket.org/moritz_loeser/cxftests/src To reproduce change the route to a folder that exists on your machine and contains at least one file (one exch

How to create a central route controller

2014-06-30 Thread dermoritz
in my java based camel app i want create a central class that controls all routes (starting, stopping) but i don't want any route be aware of this class. routes should keep untouched on any changes of route control, like refactoring. My app uses guice (DI) and at the moment i began with a simple cl

Re: How to create a central route controller

2014-07-02 Thread dermoritz
Thanks Claus for this hint, but what about my code - is it wrong? Or why it is not working? (probably it helps to understand camel) -- View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-central-route-controller-tp5753118p5753203.html Sent from the Camel - Users mai

parallelProcessing seems to change semantic of route

2014-07-02 Thread dermoritz
i defined a route in java: RouteDefinition rtdmProcess = from(cepOutputWindow).process(rtdmProcessor); MulticastDefinition multicast = rtdmProcess.multicast(); //.parallelProcessing() not working log.info("Configuring route from cep window " + cepOut

CamelTestSupport doesn't run @Test method

2014-07-03 Thread dermoritz
I wrote a test where a route is setup within @Test. So i overrode isUseRoutebulde to return false but now not even the first line of @Test method is reached. The log looks lke that: [ main] OcsFtpTest INFO **

Camel ftp consumer ignores idempotent file repository on start

2014-07-09 Thread dermoritz
I have created a route that consumes from ftp: private RouteDefinition ftpRouteOcs() { IdempotentRepository fileRep = FileIdempotentRepository.fileIdempotentRepository(new File("./downLoadedOcs"), A_MILLION, TEN_MB); // from endpoint FtpEndpoint ftpEndpoint = getContext

Problem injecting CamelContext within RouteBuilder - using guice

2014-07-11 Thread dermoritz
I created an camel standalone app that is using google guice. i am not using camel-guice (found it to late) so this is how i use it: I extended org.apache.camel.main.Main: public final class OurMain extends Main { /** * Context to be injected - contains complete setup. */ @Injec

Throughput logger logs every message - how to configure properly?

2014-07-14 Thread dermoritz
I created a utility class that provides getter for a throughput logger. this is the method: public LogEndpoint getTpLogger(final String name) { LogEndpoint endpoint = context.getEndpoint("log:" + name, LogEndpoint.class); //endpoint.setGroupSize(0); endpoint.setGroupInt

Re: Throughput logger logs every message - how to configure properly?

2014-07-15 Thread dermoritz
This is beeing fixed in 2.14: https://issues.apache.org/jira/browse/CAMEL-7599 Thanks for that! -- View this message in context: http://camel.465427.n5.nabble.com/Throughput-logger-logs-every-message-how-to-configure-properly-tp5753784p5753827.html Sent from the Camel - Users mailing list arc

About acquiring endpoints and using setters on them

2014-07-15 Thread dermoritz
I just stumbled across a problem: https://issues.apache.org/jira/browse/CAMEL-7599 (i created it) It took me hours to figure out that setters on an endpoint acquired like this LogEndpoint endpoint = context.getEndpoint("log:tplogger", LogEndpoint.class); won't work a call of endpoint.setGroupSize

Re: Camel ftp consumer ignores idempotent file repository on start

2014-07-15 Thread dermoritz
Thanks for this hint! This should be mentioned in docs. In my case i didn't saw this log entry but i saw a log entry for each file name being added to repository - so i didn't came to the idea that repository must be started. Now i am working with ".idempotentConsumer(header("CamelFileName"), fileR

How to expose camel producer with jmx

2014-07-15 Thread dermoritz
same as here: http://stackoverflow.com/questions/24755796/how-to-expose-camel-producer-with-jmx (if you want points ;-)) I read the documentation about camel jmx. In my case i want to expose some attributes and operations of a Producer (made a custom component). There seems to be no example for jm

Re: Camel ftp consumer ignores idempotent file repository on start

2014-07-15 Thread dermoritz
Thanks again Claus, it's not the first issue i've got on using java to set things up. I think the documentation should consequently use java on java examples and not mix it up with uri-based setup (not compiler checked, error prone). In my case i have to set up routes based on very simple propert

Re: How to expose camel producer with jmx

2014-07-15 Thread dermoritz
Thanks but what this means exactly (""as part of a" send processor mbean under the processor folder")? I have many "processors" with prefix "to", "unmarshal", "process", "multicast" and "log". I guess my producer should be found under "to", right? I clicked through all "to" processor and on firs

Rename/ categorize a custom mbean

2014-07-16 Thread dermoritz
I annotated (@ManagedResource, @ManagedAttribute...) the consumer and producer of my custom component. While i see the consumer under "consumers" in jconsole i can't find the producer (http://stackoverflow.com/questions/24755796/how-to-expose-camel-producer-with-jmx) Is there a way to give an anno

Re: How to expose camel producer with jmx

2014-07-16 Thread dermoritz
I think i identified the "producer" in question. It is the one of the "to" processors. The problem is that this one seems to completely ignore the annotations. The processor exposes same attributes and other stuff like all other "to" processors while my annotated consumer only exposes those stuff i

Re: How to expose camel producer with jmx

2014-07-16 Thread dermoritz
Thanks for clarification. "But as its just JMX you could manually enlist it in JMX." Does this mean i can't use the provided annotations and do jmx completely manual? Or is there a way to use the annotations and do just the "enlist" manual? -- View this message in context: http://camel.465427

Re: About acquiring endpoints and using setters on them

2014-07-16 Thread dermoritz
Thanks Claus, So "If you mix url and then mutate the endpoint, then those changes are on the same instance. " means that this is normal behavior and should work on all Endpoints (using setters on an endpoint should work and overwrite setting done by uri). So the only exception should be the LogE

How to emit jmx events (with JmxNotificationEventNotifier?)

2014-07-17 Thread dermoritz
I can't find an example how to emit Jmx events. I found examples how to create the notifier and how to listen to events but i just want to emit events within a "@ManagedResource". (Seeing attributes and operations is working fine) -- View this message in context: http://camel.465427.n5.nabble.c

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

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
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

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

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.

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

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-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: 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.

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: 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

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

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: 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

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: 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

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

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

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

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

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
>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
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
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-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-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

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-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

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

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();

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

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

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

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

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

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-

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: 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

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

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

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

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 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 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

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

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

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

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

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.

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

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.)? --

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:

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

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

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

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

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: 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/

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-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

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

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

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

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

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: 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

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: 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

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.

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

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")

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 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 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

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.

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: 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

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

  1   2   >