Re: processing data based on the metadata in the file using apache camel

2014-06-26 Thread kraythe .
Sounds like a pretty specialized use case. You could always write your own component or a processor that handles the output of the file2 consumer (which will be a stream) . However when I hear of such specialized use cases I always wonder if the person is not going about it the wrong way. What is t

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-26 Thread kraythe .
You generally don't want to use the OUT part of the exchange except in very rare circumstances. I don't know why you felt the need to set the headers and information on the out part of the exchange but that is almost always an error. The rest of the route will continue processing the IN part of the

Re: How to secure camel proxy project

2014-06-26 Thread kraythe .
Remember Camel run as a war is just a servlet so any of the standard means for securing a servlet will also be applicable to the camel servlet. Most of these involve changes to the web.xml. When it comes to running it in Karaf or ServiceMix, again the configurations of those host platforms are wher

Re: Dynamic camel routing

2014-06-26 Thread kraythe .
There are some out of the box route policies with Camel but keep in mind that you can always implement your own. If you have a specific use case that requires special logic then implement your own route policy. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Maintainable Java (Kin

Re: Consuming messages from multiple AMQ queues and forward it to single AMQ queue concern

2014-06-26 Thread kraythe .
Careful with the word "easily" :) As long as you can establish some kind of order a resequenced can put things back in order even though they may be processed in parallel and that is an important distinction. If, on the other hand you truly need to process them in a specific order whereby each me

Re: Consuming messages from multiple AMQ queues and forward it to single AMQ queue concern

2014-06-18 Thread kraythe .
Enforcing order in synch programming is not an easy order. Why do they have to be consumed in a particular order? There are ways to handle such things but they won't be simple. Different queues behave at different speeds potentially. I think I would need more information to suggest a strategy. For

Re: Why do I get so many "external redeliveries" when using Camel with JMS topics?

2014-06-17 Thread kraythe .
; failed. Caused by: [org.apache.camel.RuntimeCamelException - > org.apache.camel.RollbackExchangeException: Intended rollback. > Exchange[JmsMessage[JmsMessageID: > ID:TS-0007-jbischoff-2.local-50312-1403019963746-1:2:3:1:1]]] > > > > Best, > > Jeff > > > > On 6

Re: Why do I get so many "external redeliveries" when using Camel with JMS topics?

2014-06-17 Thread kraythe .
ompete with each other. It seems like the non-Camel > consumer can only process the message if I do a "rollback" in Camel. > > I'm building JUnit tests to try to figure out what I'm doing wrong, but > any further insight would be greatly appreciated. > > > Bes

Re: Unit testing from jms endpoint

2014-06-17 Thread kraythe .
Two possibilities. 1) Use an embedded JMS server and a direct: route to feed the embedded server. 2) Use adviceWith() on the route and the replaceFrom(). The second is the less desirable because you will have a heck of a time simulating all of the headers that the JMS system sets. It can be done b

Re: Request for Contribution: Camel-Extra ASF 2.0 Compliant Components

2014-06-17 Thread kraythe .
Contributions are welcome. You know the technologies and writing a component isn't that hard. ;) *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Maintainable Java (Kindle )(iTunes

Re: Disable auto redirect

2014-06-17 Thread kraythe .
Looking at the route the exception will be caught but you haven't marked it as handled so after it runs your onException call, the exception will be propagated back to the caller, which is a timer component. Im not sure what the timer component will do with an exception. Id have to check the docume

Re: Why do I get so many "external redeliveries" when using Camel with JMS topics?

2014-06-17 Thread kraythe .
Good suggestions but you will need to check the JMS server config if you are getting external redeliveries. Those happen when an external system to the camel route performs a redelivery. As for your original route, there must always be a place for an exchange to go or it will stop routing. In the

Re: How to rename the file using spring DSL processed through FTP ?

2014-06-12 Thread kraythe .
There is a file name header you can set. CamelFileName. See http://camel.apache.org/ftp2.html *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Logical Units of Work

2014-06-12 Thread kraythe .
You could use an aggregator to group the rows or use scatter gather (well gather since you are already scattered) EIP in order to correlate the rows. As for failing "in error" that rather depends on the error. If an exception is thrown that is not that hard. Gather all of the rows, split, process,

Re: autostart routes not working correctly.

2014-06-12 Thread kraythe .
First of all you are using a REALLY old version of Camel. So if it was a bug it has probably been long since fixed. Then next question is what is your route and how are you starting the context? *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable

Re: Dynamic DataSource for SQL

2014-06-11 Thread kraythe .
I think you have a problem because the URI is wrong. I don't think you can create a URI without URLEncoding the URI. Furthermore, I have never been a fan of embedding SQL in the URI which is why I prefer the SQL component over the JDBC one. What I would try is something like: .setHeader(SqlConstan

Re: Broker definition - activemq.xml - Fuse 6

2014-06-11 Thread kraythe .
I would go take a look at the activemq.xml in the standard distribution. Download it and unpack it and compare it line by line. It will probably turn out to be something small. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *Link

Re: Async and UnitOfWork

2014-06-06 Thread kraythe .
;). How would use > futures be different from wire tapping? > > Thanks a lot. > > > On Fri, Jun 6, 2014 at 3:21 PM, kraythe . wrote: > > > It would be interesting to implement asynch and share unit of work by way > > of futures in the ... well ... future. :) But current

Re: Async and UnitOfWork

2014-06-06 Thread kraythe .
It would be interesting to implement asynch and share unit of work by way of futures in the ... well ... future. :) But currently you cant really do that. What you need are transactions. The problem is SEDA doesn't support transactions. So what you need is JMS. *Robert Simmons Jr. MSc. - Lead Java

Re: Loop - saving responses

2014-06-05 Thread kraythe .
Take a look at the scatter - gather EIP.and Splittier That should solve your problem. If you are using Loop, you are probably already doing something wrong. Scatter-gather with seda or jms is a better solution. The number of legit use cases for loops are small. Remember you can create a custom spli

Re: Missing Important Use Case in Camel - Enrich current exchange using Consumer

2014-06-05 Thread kraythe .
t. > > > > > > > Yeah see the content enricher eip page, about pollEnrich, and the red > > box on that page. > > And we got a JIRA ticket to improved this. But requires an API change > > for Camel 3.0. > > > > > > > Anyway, it would be a great

Re: Transacted Apache Camel Route with CDI in AS7 ?

2014-06-04 Thread kraythe .
public static JtaTransactionManager configureJTATxnMgr(final JndiRegistry registry) { if (null == registry) throw new NullPointerException("registry"); // -- Set Transaction manager because we will be using transacted(); note that this will find the correct one on the host platform. f

Re: How could I post a Map to my restful api by camel?

2014-06-04 Thread kraythe .
All params passed in a HTTP Query string are converted to headers in the exchange. And of course the actual URL the user used would be available in a header as well. So you don't even need to go to the extent you have here. Most of the time you are actually trying to remove headers or transform the

Re: Pls Help - Wiretap Pattern

2014-06-04 Thread kraythe .
Why would wire taps be dependent on order? I think you may be trying to use wiretap for the wrong use case. Wiretaps make a copy of the exchange and then send that asynchronously to the endpoint. They are used for listening in on exchanges not ordered firing. *Robert Simmons Jr. MSc. - Lead Java A

Re: I found a bug

2014-06-04 Thread kraythe .
To be clear the third route is superfluous to your argument. Your argument is that auto-generated route IDs can use the same route ID as an explicit route ID set to be the same as the auto-generated one. You could propose the route builder core check if a route id is used before generating a new

Missing Important Use Case in Camel - Enrich current exchange using Consumer

2014-06-04 Thread kraythe .
I am working on some routes which use servlet: endpoints to create a REST api for a Ajax UI application. While working on it I am constantly plagued by the thought that there is a missing use case, a massive one in camel. Suppose you want to serve a file to a user. They send you some parameter and

Re: How to Implment Informative Transactional Error Handling?

2014-05-28 Thread kraythe .
of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Sat, May 24, 2014 at 1:16 AM, Claus Ibsen wrote: > On Fri, May 23, 2014 at 6:52 PM, kraythe . wrote:

Re: How to Implment Informative Transactional Error Handling?

2014-05-23 Thread kraythe .
hat reads from the DLQ > and then enrich that message with the other message from the queue > which has the exception details, and move to a final DQL, so you have > all details in the same JMS message. > > > > On Fri, May 23, 2014 at 4:10 PM, kraythe . wrote: > >

Re: How to Implment Informative Transactional Error Handling?

2014-05-23 Thread kraythe .
record this somewhere else if you want to use that. > Or do your own kind of TX rollback. > > On Thu, May 22, 2014 at 11:00 PM, kraythe . > > wrote: > > Greetings, I have many routes that read from AMQ queues and write to > other > > AMQ queues. For error handling I ha

How to Implment Informative Transactional Error Handling?

2014-05-22 Thread kraythe .
Greetings, I have many routes that read from AMQ queues and write to other AMQ queues. For error handling I have been using the following paradigm: from("activemq:queue:inbox") .onException(Exception.class).useOriginalMessage().handled(handled).maximumRedeliveries(0) .setHeader(Exchange.FAILURE

Re: JMS as Dead Letter Channel in Transaction?

2014-05-02 Thread kraythe .
ou have sent, > should not be sent, and so they must look like a "rollback" - and you > cannot do both. > > So what you try to do is not possible. > > Let AMQ do the DLQ handling, then there is no problems. > > > > On Thu, May 1, 2014 at 7:00 PM, kraythe . wrot

Re: Fallback exception returned by camel 2.12

2014-05-01 Thread kraythe .
mvn dependency:tree is your friend. :) *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 * On Thu, May 1, 20

Re: Fastest Data Holder

2014-05-01 Thread kraythe .
The question of efficiency should be thought of in an overall manner. Sure, the map is faster but when we add on all the serialization, is it really faster? JSON might be slower on access but the lack of needing to serialize it all the time has its benefits. This is important if the message will be

JMS as Dead Letter Channel in Transaction?

2014-05-01 Thread kraythe .
Anyone know how to configure JMS as a dead letter channel but in a transaction? Should be a simple issue I would think but its not working. final String fromURI = String.format("activemq:queue:%s?concurrentConsumers=%d", config.basicRouteInboxQueue(), config.concurrentConsumers()); er

Re: Transactions: Rollback Destination but Not Dead Letter Queue or Source

2014-04-29 Thread kraythe .
Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Tue, Apr 29, 2014 at 10:44 AM, Claus Ibsen wrote: > On Tue, Apr 29, 2014 at 5:37 PM, kraythe . wrote: > > Thats what I thought

Re: Transactions: Rollback Destination but Not Dead Letter Queue or Source

2014-04-29 Thread kraythe .
://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Tue, Apr 29, 2014 at 4:11 AM, Claus Ibsen wrote: > On Tue, Apr 29, 2014 at 10:59 AM, kraythe . wrote: > > Yeah no problem. I was just hoping someone would have the answer. I ke

Re: Mocking Camel Route Elements in JUnits

2014-04-29 Thread kraythe .
Mock the endpoints you want to replace and then use: MockEndpoint mock = getMockEndpoint(... uri ...); mock.whenAnyExchangeReceived(new Processor { and so on. } Use adviceWith to replace the real endpoints with the mocks. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Har

Re: conditional route without dequeuing all messages

2014-04-29 Thread kraythe .
Using selectors, I believe, will only cause the message to not be consumed by anyone, not put back on the queue. If this is really necessary (and Id like to see a use case), then the i'd try an idimpotent consumer and putting the message back on the queue yourself in an otherwise clause. Of course

Re: Transactions: Rollback Destination but Not Dead Letter Queue or Source

2014-04-29 Thread kraythe .
a39>* On Tue, Apr 29, 2014 at 2:55 AM, Claus Ibsen wrote: > On Mon, Apr 28, 2014 at 8:48 PM, kraythe . wrote: > > No one has any idea on this? It would be really great if I could find the > > formula to get this to work. > > > > I dont think people always have the

Re: Transactions: Rollback Destination but Not Dead Letter Queue or Source

2014-04-28 Thread kraythe .
ttp://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Tue, Apr 15, 2014 at 5:15 PM, kraythe . wrote: > So I think there is a problem with the way rollback is implemented in > relation to Camel. As far as I can tell there is no way to get the > following worki

Re: Need to write correct Spring XML DSL

2014-04-28 Thread kraythe .
https://www.google.com/search?q=camel+spring+DSL&oq=camel+spring+DSL&aqs=chrome..69i57j0l5.3157j0j4&sourceid=chrome&es_sm=91&ie=UTF-8 That should get you started. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http:

Re: Aggregate Error

2014-04-28 Thread kraythe .
Your correlation expression is clearly returning a "" when it is expecting a value that can be converted to an integer. The question would be what does the xpath person/firstName/text() resolve to for each of the files. The easiest way to debug things like this is to turn on a tracer in camel and

Re: Out of Memory For huge Json Response

2014-04-23 Thread kraythe .
Holy moses! A 1 gig JSON doc? Isn't that a criminal offense somewhere? Seriously though, you are hitting a JVM issue more than a camel one. I would see if I could brew up something to shatter the document and have it streamed in and read it piecemeal. You need something like SAX but for JSON. My t

Re: HA of Camel

2014-04-22 Thread kraythe .
This isn't so much of a camel question but an ActiveMQ and platform question. Camel doesn't implement things like clustering and failover. That is outside the scope of the camel framework. Something like asking a Coffee table what it does to facilitate keeping water out of the basement. Typically

Re: Aggregate Error

2014-04-22 Thread kraythe .
Thats a little piecemeal friend. Hard to tell what is going on from what you posted. Can you try again with the actual XML route code? *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert

Custom Properties Placeholder Implementations?

2014-04-22 Thread kraythe .
Greetings, I am currently using java DSL and have been investigating Fuse and Fabric8 as possible alternatives. Currently I have a route that does something like the following: final String cron = this.config.automationCasesDBMonitorCron().replaceAll(" ", "+"); final String quartzURI = "q

Re: Transactions: Rollback Destination but Not Dead Letter Queue or Source

2014-04-15 Thread kraythe .
nnel. I have tried a dozen combinations so if anyone has one that works I would be grateful. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linked

Re: Camel transaction handler forces reconnecting to ActiveMQ

2014-04-15 Thread kraythe .
Interestingly i found something similar but using Atomikos JTA in a test environment. My logs show the creation and commit of transactions constantly (see below) but that wasn't a high priority because it was a test environment. It especially occurs if a test has to wait a while for the mocks to be

Re: Camel + Java DSL Fluent builder with real ActiveMQ Broker

2014-04-14 Thread kraythe .
(2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Mon, Apr 14, 2014 at 2:24 PM, kraythe . wrote: > activemq:queue:fdmCaptureQueue > > *Robert Simmons Jr. MSc. - Lead Java

Re: Camel + Java DSL Fluent builder with real ActiveMQ Broker

2014-04-14 Thread kraythe .
activemq:queue:fdmCaptureQueue *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 * On Mon, Apr 14, 2014 at 1

Transactions: Rollback Destination but Not Dead Letter Queue or Source

2014-04-14 Thread kraythe .
So, in the ongoing perfect transaction configuration we have an interesting use case: Consider the following route in a test: @Override protected RouteBuilder createRouteBuilder() { System.out.println("createRouteBuilder"); return new RouteBuilder(this.context) { @Override

Re: JTA Transactions Rollback of Routes using Directs?

2014-04-14 Thread kraythe .
) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Mon, Apr 14, 2014 at 9:10 AM, kraythe . wrote: > Yeah I know that the end() is missing. That was a copy paste error, the > cod

Re: JTA Transactions Rollback of Routes using Directs?

2014-04-14 Thread kraythe .
hout "end()" and actually you > have no real exception handlers (tried this on Camel-2.13.0). > > regards > Grzegorz Grzybek > > > 2014-04-10 18:42 GMT+02:00 kraythe . : > > > Greetings, I have an interesting use case I was wondering if anyone had > > ide

Re: Camel with ActiveMQ

2014-04-10 Thread kraythe .
We run it standalone. That way you can cluster AMQ servers to increase fault tolerance and throughput. With the Zookeeper based database of AMQ 5.9.0 this is even more powerful. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *Lin

JTA Transactions Rollback of Routes using Directs?

2014-04-10 Thread kraythe .
Greetings, I have an interesting use case I was wondering if anyone had ideas on. Essentially there is a notifications table in a database that has essentially the following structure: CREATE TABLE "etl_case_notification" ( "process_id" int(11) NOT NULL DEFAULT '0', "table_name" varchar(100)

Re: Help Understanding Apache Camel main concepts!

2014-04-04 Thread kraythe .
Endpoints are locations from which input data is consumed or output data is sent to. So if you call to(endpoint) then you are sending data to that endpoint. If you have a from(endpoint) you are consuming data produced by that endpoint. The confusion can be magnified by the fact that we configure th

AMQ Partially Transacted Client?

2014-04-04 Thread kraythe .
Greetings, I have an odd need. Basically I need to have a transactional client that only is transacted on sending messages but not consuming them. I have a route that polls a database on a quartz timer and then makes a SQL call. If the call returns any records, they get split up and put on an eve

Re: How to ignore all error on some parts in a route

2014-04-04 Thread kraythe .
Check out this page https://camel.apache.org/exception-clause.html Specifically look for the section: *Handle and continue exceptions* *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/rober

Re: Looking for ideas to reduce code volume and duplication

2014-04-03 Thread kraythe .
eExceptionHandlerEnhancer.enhance(route); > > } > > } > > Regards, > > *Raúl Kripalani* > Apache Camel PMC Member & Committer | Enterprise Architect, Open Source > Integration specialist > http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani &

Looking for ideas to reduce code volume and duplication

2014-04-01 Thread kraythe .
Greetings: I have dozens of routes currently in our system and they have one of two variants of the following code: .onException(Exception.class).useOriginalMessage().handled(true) // catch exceptions .setHeader(Exchange.FAILURE_ROUTE_ID, property(Exchange.FAILURE_ROUTE_ID)) // set route

Re: Camel routing based on an xpath value in an XML message.

2014-04-01 Thread kraythe .
I think your xpath is wrong, try: /Header1/Dest/text() The easiest way to diagnose issues like these is split into two steps. First store the value from the xpath in a header and then pass the header to recipient list. That will allow you to use tracer to follow the flow. *Robert Simmons Jr. MSc

Re: whenAnyExchangeReceived is never called

2014-03-31 Thread kraythe .
Your code is odd. You are replacing "mock:http" with the same thing? Why? I think you should post your whole test case. I don't think you are getting the right mock endpoint so the mock endpoint you are accessing is not actually in the route. Try assertNotNull("mock:http"); before you get the mock

Re: File Consumer getting blocked

2014-03-28 Thread kraythe .
Hmm the options I use on my file reader (which works flawlessly) are: final String FILE_READER_OPTIONS = "?include=.*\\.xlsx&readLock=changed&delay=" + this.config.fileReadDelay() + "&moveFailed=Errors&move=Processed"; I use the file2 component to accompli

Re: Route Parameters Bean

2014-03-28 Thread kraythe .
That won't work. Might be an interesting enhancement though. you will have to do good old fashioned string concatenation. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/8

Re: Excelfile import in java and transfer in a Database

2014-03-28 Thread kraythe .
I wrote a custom data format for EA using POI. Im afraid I don't know of an out of the box one. Excel is so temperamental that each solution is heavily customized to the user. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *Linke

Re: Abstracting out route parts without DIRECT?

2014-03-27 Thread kraythe .
efine route as a foo variable > ProcessorDef foo = from().to(); > > // call method with foo > appendStuff(foo); > > // continue routing on foo > foo.to(x).to(y); > > > On Mon, Mar 24, 2014 at 8:41 PM, kraythe . wrote: > > I have a number of situations where i have diffe

Abstracting out route parts without DIRECT?

2014-03-24 Thread kraythe .
I have a number of situations where i have different parts of a route that repeat consistently but Id rather not create separate routes or direct calls because I want avoid a bottleneck. If i create 50 routes concurrently consuming off of one queue and route them all through the same direct, the di

Re: using CSV Bindy data format

2014-03-03 Thread kraythe .
Check out the camel bind page. It has information on how to accomplish that. :) Apache Camel: Bindy

Re: Is apache-camel supports nested route

2014-03-03 Thread kraythe .
You need to look into an aggregator to combine different exchanges into one. One of the most valuable references you will find in the camel world is the EIP reference. http://camel.apache.org/enterprise-integration-patterns.html That page gives you a mapping as to how many, if not most, problems ar

Re: Is apache-camel supports nested route

2014-03-02 Thread kraythe .
That won't work the way you want. There are much better ways of doing this. Specifically you can use a to("direct:xxx") to do some processing that is abstracted out of the route. The other comment I have on your route is that you seem to be heavy in writing processors for things that can be done in

JTA Transactions using Atomikos not rolling Back in Test

2014-03-02 Thread kraythe .
I am encountering a problem in my unit test that I was hoping i could get help on. Basically I am building a unit test of a JTA transacted route and the transactions are not rolling back as expected. I would be grateful of any assistance in the matter. Please be aware that I am unable to use spring

Re: Is there an alternative to request-reply when you want to use JMS transactions?

2014-02-25 Thread kraythe .
I don't see adding a custom header to be a big deal. You have to remember when you are doing multi route processing with JMS in between everything is happening asynchronously. The old semantics you are used to of request-reply are not necessarily appropriate. Asynch programming is much more powerfu

Re: Use activemq connection pool without spring?

2014-02-25 Thread kraythe .
Remember spring is just an XML way to call setters and getters. But here is how I do it in JBoss: camelContext, final JndiRegistry registry) { log.info("Using AMQ Connection factory with JNDI Name: " + config.activeMQConnectionFactoryJNDIName()); final ConnectionFactory amqcf = registry.lo

Re: How to aggregate all messages into a single message?

2014-02-25 Thread kraythe .
Its easy to use a custom aggregator than try to do with DSL. See http://camel.apache.org/aggregator2 As an example: public class ListAggregationStrategy implements AggregationStrategy { /** The comparator used to keep the list sorted if any. */ final Comparator comparator; /** * @param

Re: Camel logging with log4j.properties not working

2014-02-25 Thread kraythe .
Camel uses SLF4J internally for logging. Just download an SLF4j to LOG4J Bridge Jar and put it in the class path and you should be in business. RE: http://www.slf4j.org/legacy.html *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)*

Suggestions to work around JNDI Problem in Test Case

2014-02-25 Thread kraythe .
I am having a problem that i hope people can help me with a workaround. The options not available to me are patching Camel code, using pre-released versions or beta versions. I have to work around the problem with the existing camel software. The problem is fairly simple but takes a bit to explain.

Re: Bug in 2.12.2 class org.apache.camel.impl.JNDIRegistry

2014-02-21 Thread kraythe .
.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Feb 21, 2014 at 5:55 PM, kraythe . wrote: > And incidentally it also fails to find derived type. I put in > JTATransactionManager which is an implementation of the > PlatformT

Re: Bug in 2.12.2 class org.apache.camel.impl.JNDIRegistry

2014-02-21 Thread kraythe .
On Fri, Feb 21, 2014 at 5:44 PM, kraythe . wrote: > I was debugging an issue in a test case where I use Atomikos for JTA > transaction management support and the app uses the JNDIRegistry. When the > registry imll from camel is used and the lookupByType is called, it invokes >

Bug in 2.12.2 class org.apache.camel.impl.JNDIRegistry

2014-02-21 Thread kraythe .
I was debugging an issue in a test case where I use Atomikos for JTA transaction management support and the app uses the JNDIRegistry. When the registry imll from camel is used and the lookupByType is called, it invokes the following code: public Map findByTypeWithName(Class type) { Ma

Spring Registry Question

2014-02-19 Thread kraythe .
Greetings, I am using camel without spring configuration to plug into a JBoss web app and someone asked me a question I couldn't answer so I was hoping someone here could. The thing is I needed to have configuration objects bound in the camel registry BEFORE my route builder came up so I had to su

Re: CamelContextLifecycle Has a Glaring Deficiency

2014-02-14 Thread kraythe .
ons/40/852/a39>* On Fri, Feb 14, 2014 at 4:39 PM, kraythe . wrote: > Sorry it has taken a while to get back to the list on this one. I have a > fix for the issue discussed in thread: > http://camel.465427.n5.nabble.com/CamelContextLifecycle-Has-a-Glaring-Deficiency-td5742904.html &g

Re: CamelContextLifecycle Has a Glaring Deficiency

2014-02-14 Thread kraythe .
Sorry it has taken a while to get back to the list on this one. I have a fix for the issue discussed in thread: http://camel.465427.n5.nabble.com/CamelContextLifecycle-Has-a-Glaring-Deficiency-td5742904.html The files are attached. I changed the package name because I wanted to not have to do java

Re: Question About JNDI Registry when Running Camel in JBoss Application Server

2014-02-13 Thread kraythe .
rt Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Nov 8, 2013 at 8:44 AM, kraythe . wrote: > So

Re: routing with camel

2014-02-13 Thread kraythe .
Look at the HTTP4 component. Jut call it inline: .when(xpath("//oprncode = 'ATM'")) .setHeader(Exchange.HTTPQuery, simple(". stuff here . ")) .to("http4://www.myhost.org:8020").endChoice() Generally with camel if your task is not unique to your process or unique to your domain, then ther

Re: errorHandler for activemq component example configuration

2014-02-13 Thread kraythe .
With any JMS system if you send a message using request-reply the broker will utilize one of many options for replying to you. Either a temporary queue just for you or a community topic by which you can use your correlation ID to pluck out the reply. There are other options as well. >From the poin

Re: Adding Routes at the runtime-cannot add multiple consumer to the same endpoint

2014-02-12 Thread kraythe .
What claus said. Also, you have to use a concurrentConsumers option on a FROM uri to consume with multiple instances of the same route from an endpoint. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linke

Re: Duplicate JMS messages are getting piled up with redelivery of messages

2014-02-12 Thread kraythe .
The first thing I observe is that exception handlers really should be the first thing in the route. I dont think the spring DSL enforces this. As to your question, when you have the message in the transaction and the transaction fails, the message will end up back in the queue, having never left it

Re: Java Route Not Finishing

2014-02-11 Thread kraythe .
I would attach a tracer to the route and walk through its execution. Just google "apache Camel tracer" *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Consuming messages with casting problems

2014-02-06 Thread kraythe .
Its always best to serialize objects going through AMQ into JSON, XML or some other means. Not only does it reduce the problems of compatible JAR files (because they would have to be the SAME jar files on both sides), it also makes messages in the queue easier to read when that becomes necessary. A

Can I use a Servlet 3.0 Web.xml with camel-servletlistener 2.12.1

2014-02-05 Thread kraythe .
Greetings, We are using servletlistener to bootstrap camel into a web app deployed on JBoss EAP 6.2 and I was wondering if I could use a servlet 3.0 spec web.xml with the servletlistener even though the listener is only compiled against geronimo 2.5 spec? Thanks in advance. *Robert Simmons Jr. M

Re: Consuming multiple JMS messages in one single transaction

2014-02-01 Thread kraythe .
This question gets asked enough that perhaps there should be some text added to the JMS documentation on the matter. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a3

Re: 2.12 Incompatible with Camel Restlet Component?

2014-01-17 Thread kraythe .
-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Jan 17, 2014 at 10:31 AM, Claus Ibsen wrote: > what do you need restlet-spring for? What does it bring to the table? > > On Fri, Jan 17, 2014 at 5:25 PM, kraythe . wrote: > > Actually that di

Re: 2.12 Incompatible with Camel Restlet Component?

2014-01-17 Thread kraythe .
dcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Jan 17, 2014 at 8:57 AM, kraythe . wrote: > I will give that a shot and let you know how it turns ou

Re: JVM is running out of memory during full Camel build

2014-01-17 Thread kraythe .
Make sure, also, in your maven pom that i you are forking the VM for testing that you provide the forked VM with enough memory. The Maven opts will not be propagated to the forked VM so beware of that. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Mainta

Re: Unit Testing Question

2014-01-17 Thread kraythe .
There are a number of examples on the camel testing page. However I can provide perhaps some information. Mock endpoints are just recorders of information the previous poster used in example. Normally an endpoint doesn't keep track of what exchanges go through it but mock ones do. You can also mock

Re: 2.12 Incompatible with Camel Restlet Component?

2014-01-17 Thread kraythe .
a39>* On Fri, Jan 17, 2014 at 1:41 AM, Claus Ibsen wrote: > Try excluding those old spring jars in the restlet-spring dependency > and make sure to run with only the newer and same spring version. > > On Thu, Jan 16, 2014 at 11:23 PM, kraythe . wrote: > > Greetings, >

2.12 Incompatible with Camel Restlet Component?

2014-01-16 Thread kraythe .
Greetings, I wanted to create a little rest let demo but when I tried to run it I got an odd spring exception. It seems that rest let depends on older spring jars than Camel does and this causes confusion. Anyone have an idea how to work around this? The exception and the maven dependency tree ar

Re: ActiveMQ processing

2014-01-07 Thread kraythe .
Write two routes: one that writes to a JMS queue and one that picks up data off the queue and processes it: from("direct:input").to("activemq:queue:inbox"); from("activemq:queue:inbox"). . to("activemq:queue:results"); This manner you can shove data in as fast as you want and even have concurren

Re: Stream consuming in Camel

2014-01-07 Thread kraythe .
You could write your own consumer to do this if you wanted and nothing else fit. Camel is very extensible so it allows you to do custom things and transparently marry those things with EIP and camel routes. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and M

Re: What organizations are using Camel?

2014-01-07 Thread kraythe .
EA uses Camel for a number of things I am not at liberty to discuss. Some things I can talk about in general terms though. We process several thousand customer support cases using Camel routes. Also Comcast cable uses it to process Streaming Video On Demand (SVOD) content and is working to replace

  1   2   3   >