Re: Seeking to understand properties

2016-11-16 Thread Brad Johnson
Steve, The unfortunate part is there are a few different properties. The propertyplaceholder is a global set of properties and is really how you configure your bundle/jar from defaults and external properties. These are different from the properties in the camel context and different from the

Re: Split, aggregate, then wait for completionTimeout before continuing

2016-11-04 Thread Brad Johnson
wrote: > That’s correct > > On 11/4/16, 4:13 PM, "Brad Johnson" <brad.john...@mediadriver.com> wrote: > > It appears that the splitter is exiting while your aggregator is still > stuck waiting for the time out if I'm groking the code right.

Re: Split, aggregate, then wait for completionTimeout before continuing

2016-11-04 Thread Brad Johnson
t; better way that > I’m missing. > > On 11/4/16, 8:54 AM, "Brad Johnson" <brad.john...@mediadriver.com> wrote: > > @Craig, > > This may or may not be appropriate to your situation depending on your > situation, but I recently ran into a situat

Re: Best way to build a wait/retry loop with Camel?

2016-11-04 Thread Brad Johnson
get processed and therefore the delay is multiplied for > these messages). > > To delay messages individually (fixed delay applied per message) #2 works > with the mentioned problems and Quinns AMQ scheduler suggestion is probably > the best way to do it. > > Thanks a lot

Re: Split, aggregate, then wait for completionTimeout before continuing

2016-11-04 Thread Brad Johnson
@Craig, This may or may not be appropriate to your situation depending on your situation, but I recently ran into a situation where I was parallel processing and making external REST calls to another company so one couldn't count on uniform transaction speed and an exception absolutely bogged a

Re: Best way to build a wait/retry loop with Camel?

2016-11-03 Thread Brad Johnson
Owain, That's why my preference would be to use the chron job he mentioned and just check my own timestamp in millis in a header or even putting the items in a map and putting that on the queue. The map would have number of retries, timestamp, and the actual data model he's working with. That

Re: Best way to build a wait/retry loop with Camel?

2016-11-03 Thread Brad Johnson
is greater than that. Obviously if it is and your update fails, then when you increment the max retries you'd also update the timestamp so that it will not reprocess until the next day. On Thu, Nov 3, 2016 at 1:17 PM, Brad Johnson <brad.john...@mediadriver.com> wrote: > On number 3, you

Re: Best way to build a wait/retry loop with Camel?

2016-11-03 Thread Brad Johnson
On number 3, you might add a timestamp in millis in addition to the max retries. When you pull the object off the queue do a quick addition of the timestamp on the object (or header) and the number of millis in a day. The current time in millis should exceed that number or a day has not passed

Re: AMQ Camel assembly

2016-11-02 Thread Brad Johnson
7:20 PM, Souciance Eqdam Rashti < > souciance.eqdam.ras...@gmail.com> wrote: > > > Hi Brad, that's not what I meant, will send you an example later to > see. > > > > Den 2 nov. 2016 6:10 em skrev "Brad Johnson [via Camel]" < > > ml-node+s465427n57896

Re: AMQ Camel assembly

2016-11-02 Thread Brad Johnson
fter doing a clean install you get a zip and tar.gz file. > You can then upload that to your server, unzip and run karaf. > > On Wed, Nov 2, 2016 at 4:09 PM, Brad Johnson [via Camel] < > ml-node+s465427n5789652...@n5.nabble.com> wrote: > > > Are there any good examples

Re: Camel-REST vs Cxfrs

2016-11-02 Thread Brad Johnson
I supposed that's a matter of preference. I've used CXF in blueprint and am very comfortable with it. I'll usually us a single bundle and commonly setup up both SOAP and REST endpoints in there using annotated interfaces. Then I'll use the operationName in a recipient list to route the requests

AMQ Camel assembly

2016-11-02 Thread Brad Johnson
Are there any good examples of creating an assembly to install my bundles into a standalone karaf/AMQ instance. I'm used to working with the Fuse stack where creating a features file, adding the url via mvn:install, and then doing the mvn:install installs all my requirements and cfg files. So

Re: Polling consumer poll period

2016-11-02 Thread Brad Johnson
Kasim, Have you tried polling a local resource just to see if the results are the same? For example, if you poll file://foo.txt with a few lines of text in it do you still see the 1 minute timeout? Also, what is happening your Bean class? I assume there isn't some long lived process in there.

Re: Conditional Polling Consumer

2016-11-02 Thread Brad Johnson
Have you thought about using different prime numbers as your polling times? On Wed, Nov 2, 2016 at 7:59 AM, Quinn Stevenson wrote: > Sorry - yes, you’re using the right thing. The enrich DSL would use a > producer, which isn’t what you were looking for -

Re: Question on multicast to pipelines

2016-11-01 Thread Brad Johnson
Edoardo, I missed the second set of logging statements, sorry. I thought you'd said they were outputting the same thing. And, yes, that's a bit counter-intuitive. Personally I almost always do it with just to routes in the mulitcast and then any further routing or changes I put in those. And I

Re: Java DSL: How to inject object endpoint?

2016-11-01 Thread Brad Johnson
You may also want to look at @EndpointInject with uri of the route you want to invoke. That depends on the specific needs. You might use that in the case where you want to iterate over items in a list, mutate some data or filter items and find it easier to do in a Java POJO than in the route

Re: Question on multicast to pipelines

2016-11-01 Thread Brad Johnson
That's what you should see unless you change the data in A or in C. A and C should both receive START. It is a multicast. If you change the value in A you'll see that change in B but that will not be shown in C since C is at the root of the multicast. If you change the data in C you'll see it in

Re: AW: Dynamic routing based on collection values

2016-10-29 Thread Brad Johnson
@Steve I'm fairly certain the ProducerTemplate is simply an object and doesn't have its own separate thread. That would create a lot of different problems given the nature of the methods on the ProducerTemplate and the @EndpointInject. Even when you make async calls using it the PT uses an

Re: Question on multicast to pipelines

2016-10-29 Thread Brad Johnson
"...yet they all fail (in the sense that they all receive the original START incoming payload. Can anyone explain how this is expected behavior?" All or just A and C receive the same message. I'd expect A and C to receive the same message but not for B and D to (unless you don't change the

Re: Alternative to Spring Boot websocket/stomp support in OSGI

2016-10-28 Thread Brad Johnson
I'm not sure exactly what you're looking for here but will give it a shot. If you use a it should do what you are after. amq:queue::${header.destinationVariable} I don't know if that destinationVariable is what is in the header or if you send another name. But effectively that EIP is used to

Re: Question on multicast to pipelines

2016-10-28 Thread Brad Johnson
The multicast sends the same message to all the to or pipeline elements it finds in its definition. That's why it is a "multicast". What is it you are trying to accomplish here and don't focus so much on the mechanics of doing it. Without knowing what your business case/problem definition is

Re: Losing mi sanity on pipeline testing

2016-10-27 Thread Brad Johnson
Try putting in .log(${body}) in between each of the lines and see what you get. It appears you are using the SimpleDataSet which takes a single String. What behavior are you expecting from ti? Is it throwing an exception? Have you tried sending in a List with a ListDataSet to see what behavior

Re: Authentication Header Missing from CXF Endpoint

2016-10-25 Thread Brad Johnson
When i receive the exchange in my processor am getting both my > Exchange.AUTHENTICATION header and SecurityContext Null. > > I am not able to retrieve and test the Security role because of which > everything else fails down the stream. > > IS there anything else am missing?. > > &g

Re: Authentication Header Missing from CXF Endpoint

2016-10-24 Thread Brad Johnson
In addition to trying the requestBodyHeader (or whatever the request name is) have you tried looking the results of the Exchange you get back by calling getException? On Mon, Oct 24, 2016 at 3:25 PM, Brad Johnson <brad.john...@mediadriver.com> wrote: > Are you sending a Processor acro

Re: Authentication Header Missing from CXF Endpoint

2016-10-24 Thread Brad Johnson
Are you sending a Processor across? I've really no idea if that would work or not. It's an object so I suppose if you cast the object on the other side you'd end up with the Processor back(?) Have you tried on of the methods like producerTemplate.request(endpointURI,body, Map)

Re: AW: Dynamic routing based on collection values

2016-10-24 Thread Brad Johnson
entation than i would > prefer. > > On Oct 24, 2016 9:21 AM, "Brad Johnson" <brad.john...@mediadriver.com> > wrote: > > > This is also one of those fuzzy areas where sometimes it is easier to > > simply pass the message body into a bean and then use ProducerT

Re: AW: Dynamic routing based on collection values

2016-10-24 Thread Brad Johnson
This is also one of those fuzzy areas where sometimes it is easier to simply pass the message body into a bean and then use ProducerTemplate instances to send values us different routes. Under normal circumstances I wouldn't do it that way as Camel does a great job of heavy lifting. But in some

Re: SEDA with Aggregation

2016-10-21 Thread Brad Johnson
SEDA will queue messages. So you are basically taking messages off one queue and dropping them on to another as fast as possible. I'm pretty sure that isn't the behavior you are after. It is more for queuing and asynchronous operations. Try changing route B to direct which is request response.

Re: file component polling files

2016-10-15 Thread Brad Johnson
I'm not quite sure what you are attempting to do here. You poll every 30 seconds and seem to only want to pick up 1 file but then say you want it to pick up a "large amount of files every poll". Are you trying to pick up just 1 file every 30 seconds or are you trying to read all the files when

Re: Looping in routes using Direct Component - Performance impact?

2016-10-14 Thread Brad Johnson
et / get camel exchange property (so far single) > - saw annotation ExchangeProperty, but it has String type return > value. Whereas on exchange we are setting Objects. > > Regards, > Arpit. > > > -Original Message- > From: Brad Johnson [mailto:brad.john...

Re: Looping in routes using Direct Component - Performance impact?

2016-10-14 Thread Brad Johnson
Have you looked at splitter/tokenizer/streaming for this instead of having route 1 call route 2 which calls route 1? Interesting route setup as I've never used routes in a recursive fashion like that. When using direct the return doesn't happen until the end of the last route in the chain. In

Re: Access header in camel route

2016-10-05 Thread Brad Johnson
@axdz To amplify what Jonas said, you don't need to use a Processor. Just use a regular Pojo. public class MyHandler { public void modify(@Headers Map headers) { headers.put("filedname", "value"); } } On Wed, Oct 5, 2016 at 6:25 AM, Jonas Koperdraat

Re: Limit Concurrent Access

2016-10-04 Thread Brad Johnson
ent calls with others waiting > (similar to database connection pool). > Netty4 component has limits to set, but it starts to fail when limit is > reached instead of waiting. It would be very useful to have a generic > module to help in such cases. > > Best regards, Vitalii Tymchys

Re: Splitting a Body and losting old informations

2016-10-03 Thread Brad Johnson
What do you mean the "file had been rewriting"? Do you mean it had already been written to? Are you always writing to the same file name? When a new transaction starts you can change the file name it is writing to or you can move the existing file somewhere else. At some point I assume that you

Re: Limit Concurrent Access

2016-10-03 Thread Brad Johnson
@Debraj, Until you can accurately characterize the request/response that users are sending as input it's hard to give good advice on this. If they are sending a bunch of data and just expecting an acknowledgement back that you've receive it and are processing it then there are fairly simple ways

Re: Limit Concurrent Access

2016-10-02 Thread Brad Johnson
to external services using a thread > pool. But I was thinking if it is possible to limit when receiving the > request, so that we can fail fast rather than limit while making the > external call. If request is crossing the limit sending error to the > caller is fine. > >

Re: Limit Concurrent Access

2016-10-01 Thread Brad Johnson
The first question I'd have is "are you sure you have a problem with the number of incoming requests?" One of the biggest problems I find in the field is premature optimization. If you have a fairly good characterization of the problem, the number of requests anticipated, the length of time to

Re: Splitting a Body and losting old informations

2016-10-01 Thread Brad Johnson
This a rather nebulous question. Can you post the routes you are using? I suspect you are not setting the append flag on the file writer. But without seeing the code you are using it is impossible to tell. fileExists=append Look up the specifics on the syntax here:

Re: Parse Json inside RecipientList

2016-09-30 Thread Brad Johnson
OK, cool. Glad that worked for you. I usually use a header simply because it passes from route to route while the properties do not. But in this case, the use of the properties is probably better since you don't need the property to go anywhere else. But glad you got it working. On Thu, Sep 29,

Re: Parse Json inside RecipientList

2016-09-28 Thread Brad Johnson
There are a number of ways but perhaps the simplest would be something like: .setHeader("customerId","${body.id}") right before the marshaling. Then in the http statement where the ID goes you can fish it out of the header with something like ${header.customerId}. I wrote all that free hand

Re: Parse Json inside RecipientList

2016-09-28 Thread Brad Johnson
To amplify on sparekh's answer I think with a POJO you could simply use: "https4://x/api/customer/${body.id}" On Wed, Sep 28, 2016 at 11:49 AM, sparekh wrote: > How about a custom processor that parses the JSON string (via GSON) into a > JSON object and sets up the HTTP

Re: Help with JSON to POJO using XML Routes

2016-09-28 Thread Brad Johnson
I didn't see in your initial code anything that set up the dataFormat. That along with the unmarsal/marshal are what you need to get it to work correctly, not just using a bean. Then in your route, right after your call* to* http4 you put: On Wed, Sep 28, 2016 at 11:56 AM, Brad

Re: Help with JSON to POJO using XML Routes

2016-09-28 Thread Brad Johnson
Jackson works fine and I've used it many times. So does JAXB for JSON. Just remember to put the @XmlRootElement annotation on your bean in that case (yeah, even it if is only being used for JSON). I really wouldn't fool with the gapping of strings to a hashmap. You'll just create headaches. You

Re: Help with JSON to POJO using XML Routes

2016-09-27 Thread Brad Johnson
By the way, I think I used to use: < bean ref="StoreLoadBean" method="loadRetailStoreDataFromMap"/> On Tue, Sep 27, 2016 at 6:26 PM, Brad Johnson <brad.john...@mediadriver.com> wrote: > I'm going to assume that the method named there is on the bean. The lo

Re: Help with JSON to POJO using XML Routes

2016-09-27 Thread Brad Johnson
I'm going to assume that the method named there is on the bean. The log messages may be getting ignored due to the logger not being set up correctly. You can temporarily replace with System.out until you have time to go back and make sure the logger is setup up correctly. As for the loading of

Re: Help with JSON to POJO using XML Routes

2016-09-27 Thread Brad Johnson
ding something over activemq and your route is receiving it (from) but that is followed by another (from) which would sit and wait for someone to call it. That doesn't really do much with the incoming activemq message then. On Tue, Sep 27, 2016 at 4:38 PM, Brad Johnson <brad.john...@mediadriver.com

Re: Help with JSON to POJO using XML Routes

2016-09-27 Thread Brad Johnson
By the way, which version of Camel are you using? And maybe I'm not quite understanding what you're trying to do but it sound like you want to call *to *an http endpoint and aren't waiting to receive from the endpoint. On Tue, Sep 27, 2016 at 4:04 PM, jeffz wrote: > I'm

Re: Help with JSON to POJO using XML Routes

2016-09-27 Thread Brad Johnson
If you put a log message right after the Netty call what does it show? On Sep 27, 2016 4:04 PM, "jeffz" wrote: > I'm using Camel - through ServiceMix - to retrieve data from a web service, > read the response and pass the data to another application. This code was >

Re: Camel Netty could not process on heavy load

2016-09-27 Thread Brad Johnson
You could send the incoming message off to another component(s) with their own thread pools. Also, is there anyway to upgrade your version of Camel? There's a newer version of the Netty component released as of 2.14. On Tue, Sep 27, 2016 at 1:20 AM, jshankarc wrote: > Hi

Re: Can't understand what inOnly is doing

2016-09-27 Thread Brad Johnson
@Sim Also if you look a little farther down in the SEDA page you'll notice a section called Use of Request/Reply. On Tue, Sep 27, 2016 at 11:40 AM, sim085 wrote: > Thanks :) > > I had a quick look at the seda component. I can see that it has a check on > if the exchange

Re: Can't understand what inOnly is doing

2016-09-27 Thread Brad Johnson
@sim That's what I see as well. Which is why I decided to see if the short circuit using inOnly to call the seda queue would change behavior and it does. On Tue, Sep 27, 2016 at 10:28 AM, Brad Johnson <brad.john...@mediadriver.com > wrote: > Going back to this unit test I added anot

Re: Can't understand what inOnly is doing

2016-09-27 Thread Brad Johnson
Going back to this unit test I added another route so I could comment it in or out for different tests. If the inOnly is used to call the seda route then it operates exactly the same regardless of whether the sendBody (fire/forget) is used or the requestBody (request/reply) is used to initiate the

Re: Can't understand what inOnly is doing

2016-09-27 Thread Brad Johnson
I'm not sure on point 3 either and the tests didn't appear that way. If you look at the Unit test I posted earlier on that thread or even copy/paste it into a test class and run it you'll notice that the sub-route invocation behavior changes depending on whether the initial invocation of the very

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-27 Thread Brad Johnson
Excellent! Congratulations. On Tue, Sep 27, 2016 at 1:18 AM, ncsibra wrote: > Yes, changed the method call order. :D > We are doing several weave* calls, just put a weaveById first, then it > works > fine. > Actually, in our case, we have to put it last to be sure that

Re: Can't understand what inOnly is doing

2016-09-26 Thread Brad Johnson
On point 5. from the tests I did it appears that direct:xyz is not necessarily InOut/InOnly. Since the producer template with sendBody was an InOnly the behavior of the routes downstream behaved differently than when I used the requestBody which starts as an InOut. Most of the time when using a

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-26 Thread Brad Johnson
Were you able to finally get it to work correctly? On Mon, Sep 26, 2016 at 1:10 AM, ncsibra wrote: > Yes, weaveById works fine, but in my case I use it in a base class, used by > almost every integration test and those tests are able to modify the route > too before

Re: Can't understand what inOnly is doing

2016-09-26 Thread Brad Johnson
The ExchangePattern appears to have more scope than I'd initially believed. Just haven't had much need to delve into it that deep as most of my use cases are for request/response we services or file unmarshaling or even request/response with a pass of to seda or JMS and a quick response back to

Re: Can't understand what inOnly is doing

2016-09-25 Thread Brad Johnson
a mina endpoint in to get the results of the SEDA queue back. On Sun, Sep 25, 2016 at 11:04 PM, Sashika <sashik...@gmail.com> wrote: > I've noticed the fire and forget only works with seda end point called with > inOnly. > > On Sep 26, 2016 02:31, "Brad Johnson" <brad.j

Re: Can't understand what inOnly is doing

2016-09-25 Thread Brad Johnson
est public void fireAndForget() { producer.sendBody("aaa"); } @Test public void requestReply() { String result = (String) producer.requestBody("aaa"); System.out.println("Result: "+ result); } } On Sun, Sep 25, 2016 at 4:01 PM, Brad Johnson <brad.john...@mediadriver.com

Re: Can't understand what inOnly is doing

2016-09-25 Thread Brad Johnson
I'd actually have to sit down and code it out and run it 100 times. On Sun, Sep 25, 2016 at 2:38 PM, Brad Johnson <brad.john...@mediadriver.com> wrote: > The direct is going to return a message regardless of what the upstream > components say because at that point you are indicat

Re: Can't understand what inOnly is doing

2016-09-25 Thread Brad Johnson
The direct is going to return a message regardless of what the upstream components say because at that point you are indicating that you *do *want that route to return something to you. Much like a method with a void return calling a second method that returns a String. Just because the calling

Re: Designing many service routes

2016-09-25 Thread Brad Johnson
Look at using. The transport can be anything of course but direct-vm usually works pretty well. direct-vm:${header.operationName} On Fri, Sep 23, 2016 at 4:30 PM, Kasim Sert (Ibtech-Software Infrastructure) wrote: > Hi, > > I have more than 2 thousands web

Re: Can't understand what inOnly is doing

2016-09-24 Thread Brad Johnson
InOnly is a fire-and-forget, asynchronous style of messaging. InOut is a synchronous or pseudo-synchronous* request-reply messaging as Matt points out. Part of the confusion is about the pattern set on the exchange to indicate whether the data flow is InOut or InOnly. The other In/Out on the

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread Brad Johnson
I don't using weaving in my tests so can't be of a whole lot of help. Personally I'd try separating the single weave and double into two separate test files and see if there's any difference. It isn't too surprising that it fails with multiples especially with exception handling given the

Re: Camel in Action Book

2016-09-23 Thread Brad Johnson
Hear, hear! My one hope for the new book is that the emphasis is on using POJOs for most message processing in lieu of using Processors. I've found that once my clients understand how Camel can select a method for invocation on a bean for a route and how easy that makes unit testing for

Re: Convert Flat File to XML using a XSD Schema

2016-09-22 Thread Brad Johnson
Specifically see the section in their documentation: http://www.beanio.org/2.0/docs/reference/index.html#MappingXmlStreams On Thu, Sep 22, 2016 at 7:06 AM, Vitalii Tymchyshyn wrote: > Try camel-beanio. > > Ср, 21 вер. 2016 10:04 користувач Daniel P22 пише:

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-21 Thread Brad Johnson
{* > *System.out.println("We threw an exception in the weaving".* > * }* > *} catch(Excepion e)* > *System.out.println("We caught an error in the route builder."* > *}* > }); > > On Tue, Sep 20, 2016 at 12:15 PM, Brad Johnson <[[hidden > emai

Re: Blueprint and property placeholder

2016-09-21 Thread Brad Johnson
I don't believe the same properties can be used by multiple bundles yet. I think it's in the specification but isn't implemented in Aries yet. Anyone out there that knows otherwise please correct. On Tue, Sep 20, 2016 at 12:43 PM, dpravin wrote: > Hello All, > > We

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-20 Thread Brad Johnson
the weaving".* * }* *} catch(Excepion e)* *System.out.println("We caught an error in the route builder."* *}* }); On Tue, Sep 20, 2016 at 12:15 PM, Brad Johnson <brad.john...@mediadriver.com > wrote: > Too bootstrap a route from the Java DSL you only need to d

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-20 Thread Brad Johnson
Too bootstrap a route from the Java DSL you only need to do something like this: http://camel.apache.org/schema/blueprint;> my.routes.internal And in the my.routes.internal package (or whatever you want to call it) you would have route builder. You could put mock:out instead of

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-19 Thread Brad Johnson
PS I've likely missed something in that XML sample because I don't see a direct:in nor the increment route. It's more just how I end up backing out until I can figure out the source of my problems - other than visiting a shrink. On Mon, Sep 19, 2016 at 1:21 PM, Brad Johnson <brad.j

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-19 Thread Brad Johnson
That's one of the downsides to using the blueprint XML. I used to use it exclusively but have started the change to using the Java DSL and route builders and using blueprint just to bootstrap it. That keeps the blueprint headers very clean then - just blueprint itself and the cm for properties

Re: Camel in Action Book

2016-09-17 Thread Brad Johnson
boa...@gmail.com> wrote: > Claus always mentions it in the release vote threads. It's a good code > sample that's easy to test against without having to test out some overly > complicated enterprise app to find every nook and cranny. > > On 17 September 2016 at 12:05, Br

Re: Camel in Action Book

2016-09-17 Thread Brad Johnson
Matt, That's interesting. I didn't know the code was tested against each new release. Makes sense though. Most of what I've seen over the years has been (a) added features, (b) bug fixes, and (c) performance enhancements. And of course the ever growing library of components. On Sat, Sep 17,

Re: Camel in Action Book

2016-09-17 Thread Brad Johnson
There are significant differences between 2.5 and 2.17. The principles are the same and EIPs are as well so the important concepts will be there for you. But details will vary some. On Sat, Sep 17, 2016 at 11:59 AM, medali_k wrote: > I am trying to learn Camel from the

Re: Transaction management when multicasting within a route

2016-09-17 Thread Brad Johnson
The multi-threading has a couple of aspects to it and I'm not sure of what your use case is exactly. Is it that the single set of 5 writes is so slow or is it that you have 10 sets of 5 writes and that is getting backed up? If it is the last case then you can use:

Re: Fuse Blueprint properties override

2016-09-16 Thread Brad Johnson
As for the sensitive settings in the properties XML/cfg files, I'd probably go this way: http://camel.apache.org/jasypt.html On Fri, Sep 16, 2016 at 12:34 PM, Brad Johnson <brad.john...@mediadriver.com > wrote: > I've tried to find ways to override the values of a pid, though have

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-16 Thread Brad Johnson
fairly certain that the mechanism used by CBTS is not the same as the one used karaf/felix. Brad On Fri, Sep 16, 2016 at 1:00 PM, Brad Johnson <brad.john...@mediadriver.com> wrote: > Yeah those kinds of errors are an irritation. One of the downsides to > Blueprint and I think OSG

Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-16 Thread Brad Johnson
Yeah those kinds of errors are an irritation. One of the downsides to Blueprint and I think OSGi in general is the somewhat obscure error messages. I haven't written my CBTS in quite the way you have it so there may be things I'm missing. But if you have the properties for testing already

Re: Fuse Blueprint properties override

2016-09-16 Thread Brad Johnson
I've tried to find ways to override the values of a pid, though haven't dug into it in depth. Also the possibility of using multiple pids in a single blueprint (achieving much the same.) Theoretically it is possible and I think it is in DS but I'm not a big user of DS so don't take that as

Re: Fuse Blueprint properties override

2016-09-15 Thread Brad Johnson
or harried (and really is there any other mode of operation for a developer?) On Thu, Sep 15, 2016 at 9:50 AM, Brad Johnson <brad.john...@mediadriver.com> wrote: > Owain, > > Cool. If you made that header change I think you'll see what you are > after. Incidentally I

Re: Fuse Blueprint properties override

2016-09-15 Thread Brad Johnson
Owain, Cool. If you made that header change I think you'll see what you are after. Incidentally I'll commonly use the groupId and artifactId as my PID name. Commonly then I can keep a standard file called config.cfg in the filtered-resources of the project and in the features file have it

Re: camel seda queue log

2016-09-15 Thread Brad Johnson
Akram, The fact that you are tokenizing to a String may make the shallow copy vs deep copy less of a concern since String is immutable. Normally. But if the Exchange itself is being shared and modifications to String resulting in a new String and are shared via the Exchange then it is critical.

Re: camel seda queue log

2016-09-14 Thread Brad Johnson
https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java By the way if you look in there you can see where the log statement comes from in the createQueue method. On Wed, Sep 14, 2016 at 3:40 PM, Akram wrote: >

Re: camel seda queue log

2016-09-14 Thread Brad Johnson
I'm not sure what is happening inside your queueFactory but is there a particular reason you need a queue factory and not just use the default queue? There could be, obviously, if you need to create some sort of priority queue or other mechanism but it isn't necessary otherwise. Brad On Wed,

Re: Fuse Blueprint properties override

2016-09-14 Thread Brad Johnson
As Grzegorz pointed out you have to have the reload flag in to hot swap values. And it's important that you make sure you specify the 1.1.0 of cm in your header as the reload doesn't work earlier. Having said that, if you change the value in the .cfg file and then start you Fuse instance it

Re: split, tokenize, unmarshal puts objects into ArrayList

2016-09-13 Thread Brad Johnson
What does your mapping file look like and what does the sample data look like? On Tue, Sep 13, 2016 at 8:11 AM, spurcell wrote: > Hello > > I am pulling in a StringBuffer into a exchange, splitting it on newlines > and > then converting each line into a dto with

Re: ProducerTemplate creates too much threads

2016-09-12 Thread Brad Johnson
It's extremely important to learn the EIPs available to you in Camel and leverage them to the greatest extent possible. They'll do a lot of the heavy lifting. You can use a CBR to send data to various routes or beans based on some value in the data header or body, for example. I handle SOAP

Re: ProducerTemplate creates too much threads

2016-09-10 Thread Brad Johnson
Normally you don't want to shut it down until the application is shutting down. And then it should happen of its own accord. Another question is why are you using the Processor interface? Unless there's a compelling reason just use a regular old Java bean. In a lot of these cases you don't even

Re: ProducerTemplate creates too much threads

2016-09-09 Thread Brad Johnson
OK, but that doesn't apply to an inject ProducerTemplate in a bean, only to ones created on the incoming thread. If you have something like. It is an *instance *variable. It is not created on the incoming thread but is only created at start up time. public class FooHandler {

Re: Should i start/stop producer templates often

2016-09-09 Thread Brad Johnson
I'm not sure this is the problem but you don't need to create a singleton for the ProducerTemplate. You won't end up spinning one up for ever request. Is there a syncrhonized anywhere on the singleton that accesses the ProducerTemplate you are creating? Brad On Thu, Sep 8, 2016 at 10:49 PM,

Re: CamelBlueprintTestSupport doesn't like 6 directories deep

2016-09-08 Thread Brad Johnson
Ah, that makes sense, I almost mentioned that CBTS uses PojoSR and not a real OSGi container but thought that was probably irrelevant. From what you say here though it does sound relevant. Just like you can't test with multiple camel contexts in CBTS. On Wed, Sep 7, 2016 at 6:45 PM, sohrab

Re: Cut a file into multiple files

2016-09-07 Thread Brad Johnson
t should just dump the internal StringBuffer you have inside it. There are lot of ways to do this in Camel. That's its beauty and sometimes its frustration. But if you find yourself doing all the heavy lifting and I/O in a Processor you are almost always doing it in a way that isn't using the framework

Re: CamelBlueprintTestSupport doesn't like 6 directories deep

2016-09-07 Thread Brad Johnson
That's odd. I've never run into that problem and I have blueprint-properties.xml in almost all my bundles. Are your blueprint files all in the bundles? Also I have run into problems with the cm-property place holder name creating problems if the PID has character it doesn't expect. I think "-"

Re: CamelBlueprintTestSupport doesn't like 6 directories deep

2016-09-06 Thread Brad Johnson
By the way, which version of CBTS are you using. There were definitely flaky issues with it in earlier versions. Even if you are using earlier versions of Camel I've found that you can use the later version of CBTS (like 2.17.3) and it will fix a lot of the problems. In some of the earliest

Re: Cut a file into multiple files

2016-09-06 Thread Brad Johnson
I'd definitely look at Beanio and the Camel bundle/library for it. It's relatively easy to create identifiers in that way and segregate those out as beans. So every bean class might have a header (or not since it seems static and throwaway) and then 0...M lines that could be mapped into the

Re: CamelBlueprintTestSupport doesn't like 6 directories deep

2016-09-06 Thread Brad Johnson
Wish I knew Gradle's better but unfortunately don't. **If anyone else encountered this, the work-around is to use "target"directory as the Gradle's buildDir; then the test passes in any directory!** So no matter what setting the buildDir will work whether you are 5 levels deep or 15 levels

Re: CXFRS swagger integration

2016-09-03 Thread Brad Johnson
Cool. Thanks, Brad On Sat, Sep 3, 2016 at 11:55 AM, jfx wrote: > Hi there, > > I added a few features to the CXF code generator in Swagger-Codegen > (bean-validation-api support, CXF3 Swagger2Feature for complimentary code > first support, generate test classes, added pom.xml

Re: downloading large files in chunks

2016-09-02 Thread Brad Johnson
consumer (downloading), the file can be anywhere like s3 or > centos.org! > > > > On Fri, Sep 2, 2016 at 11:09 AM, Brad Johnson < > brad.john...@mediadriver.com> > wrote: > > > By the way S. Ahmed, do you have control of both ends of this I mean > > client

Re: downloading large files in chunks

2016-09-02 Thread Brad Johnson
By the way S. Ahmed, do you have control of both ends of this I mean client/server or are you just on the client/consumer side? On Fri, Sep 2, 2016 at 10:01 AM, Brad Johnson <brad.john...@mediadriver.com> wrote: > Absolutely. Love to set up a VM for my server. I just had a "duh&

  1   2   3   >