Camel CXF with Netty4

2019-05-24 Thread ranx
https://github.com/apache/camel/tree/master/examples/camel-example-netty-htt p I've used that example and have injected in Camel REST routes and it works perfectly. I wonder if there's a way to do that with SOAP/CXF/Camel in any combination?

Mocking Bean...

2019-01-18 Thread ranx
in your route. You can then add it to the registry via the JNDI registry in Camel Test Support or via Camel Blueprint Test Support. Mockito is about as simple as it gets and it let's you do some rather powerful testing of your routes. Ranx Does Camel have some built in functionality

Implications of Netty vs REST configuration?

2019-01-09 Thread ranx
I have a bundle with a shared Netty server configured for port and it works fine from a unit test or curl call. However, if I add the Swagger API and then hit it with a browser, it doesn't show the port and the call from the plugin in fails. If I add the .host().port() shown below, it all

Netty with REST DSL...

2018-12-18 Thread ranx
I've been looking at some of the documentation and samples with Netty. I'm especially interested in the fact that the Netty server can be set up in a bundle and exported as a service and then used in other bundles. In the past I've used CXF and CXFRS for web services but I'm interested in the

Re: Need help in processing comma seperated text file

2016-10-14 Thread Ranx
You can use Bindy though I've had better luck with the mapping in Beanio. Start with that first and then look at using a splitter/tokenizer to process your files or write them out in the new format you require. Just create a mapping file and a sample with a few records in it and run a unit test

Re: In which way to provide http:component Exchange.HTTP_QUERY

2016-10-01 Thread Ranx
Do you have any more specifics like code? Sometimes folks know the answer but it makes it easier if it is in context. -- View this message in context: http://camel.465427.n5.nabble.com/In-which-way-to-provide-http-component-Exchange-HTTP-QUERY-tp5788106p5788283.html Sent from the Camel -

Re: Netty Server vs Jetty Server

2016-09-02 Thread Ranx
I think maybe a better explanation of what I'd like to accomplish is in order. The first is about CXF itself and the second is about Netty. The following is an example of a service I've set up that uses a single interface called PaymentServicesAPI which is nothing more than an interface that

Netty Server vs Jetty Server

2016-09-02 Thread Ranx
When I look at this how the shared netty server works it seems very much like what I'd want for microservice bundles in an OSGi environment. http://camel.apache.org/netty-http-server-example.html Can it be used with CXF? Are there any examples of using this with CXF? If not, can one create

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-30 Thread Ranx
Why are you trying to handle the error? There are a couple of settings with BeanIO that permit you to ignore exceptions or to skip unknown record types. That may not be what you want though if you are sending the bad things to a DLQ. Brad -- View this message in context:

Re: http 415 error in cxf rest service

2016-08-29 Thread Ranx
I assume you have a JSONProvider configured? That usually causes the error you are seeing. Does your Book class have an @XmlRootElement at its top? If you're using JAXB that is required even for JSON. Brad -- View this message in context:

Re: Exception when suspending splitter

2016-08-29 Thread Ranx
You may want to put this in instead of the static log message. This will show you what you are actually getting out of your splitter. .log("${body") How are you trying to suspend/stop the route? I'm not positive and would have to test it but you've specified streaming and that's going to have

Re: File2 Consumer - Multiple file problem

2016-06-01 Thread Ranx
That depends on a lot of other processing issues. Are you actually reading the contents of the text files or just ftp'ing them to a remote location? Do you have any control over the remote location? The reason I ask is you could have two routes set up. The first might look for *.txt files and

Re: Beanio stream...

2016-04-07 Thread Ranx
Claus, Please forgive all the @ in here as that was the only way I could post this to get around the spam filter. Just to get this working for me so I can start refactoring my code to accept and process individual items from the unmarshaling of the multi-line beanio beans I hacked this bit of

Re: EventNotifierSupport and Threads

2016-04-03 Thread Ranx
One thing you might consider is to use a DTO or "shopping cart" as the body of your messages to store the state and not use the Exchange itself. I'm fairly certain Claus isn't at odds with your impulse to use beans independent of Camel as I think he even writes about that in his book. So at

Re: How to return early from a direct: subroute?

2016-04-03 Thread Ranx
You can also throw an exception in a processor to short circuit. From the use case it does sound like a runtime exception of some sort. Part of the answer to that question depends on why the processors want to short circuit. Can you put a validator at the beginning of the route? If the

Re: Best Strategy to process a large number of rows in File

2016-03-31 Thread Ranx
Cool. It's good to see you're able to chip away at the problem. This is another section you may want to look at as well. Christian has good explanation of it: https://dzone.com/articles/activemq-understanding-memory This is why when I'm starting on proof of concepts, spikes or protos I tend

Re: Camel on OSGi - Get Bundle Name?

2016-03-30 Thread Ranx
If you're trying to the get the bundle symbolic name when in your processor you can inject it at start up. The ref to the blueprintBundleContext is provided by default. You can get the bundle and symbolic name (and pretty much anything else) from it. I'm not sure if that's what you

Re: Best Strategy to process a large number of rows in File

2016-03-30 Thread Ranx
Are you eventually going to separate these queues in different locations? One thing that's happening when you use JMS this way is you read the records in, and then you immediately write them back out over a socket and then read them back in. Those all involve duplication of memory. Since you

Re: Camel on OSGi - Get Bundle Name?

2016-03-30 Thread Ranx
There are a variety of ways to do that but what is it you are after actually? There may be easier ways to accomplish what you are after. Are you using Blueprint? One mechanism is the BlueprintListener. You can also get the information and inject it during instantiation and I think the

Re: Best Strategy to process a large number of rows in File

2016-03-29 Thread Ranx
I think you're hitting a lot of good points there. I'm not used to CSVs with 100 columns of data but can see why that could get huge. If she starts with SEDA and just sets a queue size of something like 100 or 200 and then sets blockWhenFull to true her streaming will halt until the queue can

Re: Best Strategy to process a large number of rows in File

2016-03-29 Thread Ranx
Jens, That's why I suggested setting the limit on the queue size. She has streaming turned on already so I believe that will block when the queue (SEDA or JMS) gets full. But 50,000 objects isn't usually that much memory so there may be something else in the JMS settings that is actually

Re: Best Strategy to process a large number of rows in File

2016-03-29 Thread Ranx
There are a number of answers to that question but this should be relatively easy to fix. Since you are running out of memory you should probably bump the max memory in the karaf startup batch file. But you will also want to limit the number of rows that you bring into memory. You already have

Re: Best Strategy to process a large number of rows in File

2016-03-28 Thread Ranx
Michelle, There are a number of ways you can do that and it will depend on what is constraining your REST API. Is it limited on the number of concurrent connections? Is it limited to the number of transactions/minute? There are at least two components you'll want after the JMS queue. One will

Bean properties/vaargs

2016-03-27 Thread Ranx
I have a bean in my blueprint that looks like this: ... I'd like that to be a bit terser. I'm sure there -- View this message in context:

Re: camel CxfRsProducer not returning appropriate error status codes

2016-03-19 Thread Ranx
The comment seems to indicate that the code thinks it is dealing with a 500 but I don't see a conversion of the response code there. Obviously it must be converting it since that's exactly the behavior your seeing. Great catch. Brad -- View this message in context:

Re: How to validate Body Content in Map Object

2016-03-15 Thread Ranx
How do you want to validate that map's contents? Do you want to validate specific fields or key/values? There are a number of options. You could invoke a Java bean or even the Java class you are in if you are using the Java DSL (which it looks like you are.) If you use a POJO you might do

Re: CXF cross cutting concerns

2016-03-15 Thread Ranx
I'll either go with DOSGi or stick with my current mechanism using an OSGi whiteboard and will leave the CXF bus alone for now. I haven't had enough time to evaluate DOSGi yet so can't comment on its suitability for my use but using the registration listener mechanism works well since it lets

Re: CXF cross cutting concerns

2016-03-14 Thread Ranx
Raul, That was initially what I was trying to find. I figured if there was a bus there must be a way to use it like that but couldn't find any good information. What I ended up with is something works in the other direction now. When I install my service bundle it registers a service

Re: CXF cross cutting concerns

2016-03-14 Thread Ranx
I'll have to check out the Aires remote services project. The only real work in this for me was the JAXRS/JAXWS server set ups. I didn't really want to replicate hardened code in Camel. But it went it fairly painlessly. The service discovery is pretty straightforward and I'm aiming to keep

Re: CXF cross cutting concerns

2016-03-14 Thread Ranx
Christian, I'll take a look at that. The nice thing about using the white board as a webservice registration mechanism is that I can define all my interceptors, handlers, and security in a single project. Then when a bundle is installed it registers itself for exposure. My new server project

Re: CXF cross cutting concerns

2016-03-11 Thread Ranx
So I tried a little different approach which works but requires that I create my own JAXWS/JAXRS factory which is OK. As a basic outline I have a factory for setting up SOAP/REST services that will the interface/implementation it finds. Right now that basic Microservice interface just has

Re: Camel dozer component unable to map custom function on field with null value

2016-03-11 Thread Ranx
Not being a real JSON expert I can't help much. I don't find the behavior too surprising though as when JSON is marshaled/unmarshaled nulls aren't usually passed from what I've seen. I have a lot more experience with SOAP and XML in Java than with REST/JSON and I'd have a better idea of how to

Re: CXF cross cutting concerns

2016-03-10 Thread Ranx
Sergey, I could do it on CXF except I'm using Camel Blueprint and the CXF implementations there. All the XML schemas and components are Camel specific as are the binding to the camel bean. In fact, that's one of the distinct downsides to using Camel/blueprint. One gets a lot of magic but

Re: CXF cross cutting concerns

2016-03-10 Thread Ranx
Christian, Thanks. I'll look into that. Right now all my services are defined in separate bundles and exported to the registry and have interfaces with REST/SOAP annotations that I expose via an API gateway. That works fairly well but it obviously couples the deployment. Part of the problem

Re: Camel reference property files with and without OSGI

2016-03-09 Thread Ranx
What version are you using? You shouldn't have to replicate the definition into Camel context like that anymore. http://localhost; /> You can use the default properties for your testing and

Re: Cross cutting concern for microservices

2016-03-09 Thread Ranx
I'm going to bump this as I'm getting farther in the project now and this sort of replication is getting to be more critical. -- View this message in context: http://camel.465427.n5.nabble.com/Cross-cutting-concern-for-microservices-tp5776981p5778800.html Sent from the Camel - Users mailing

CXF cross cutting concerns

2016-03-09 Thread Ranx
I have a client who wants to use deployable microservice bundles with REST/SOAP APIs. Not a problem of course as it works very well. The issue is that I'm getting a lot of boilerplate replication across the project which is only getting to get bigger and more difficult to manage with time. This

Camel-Braintree

2016-02-29 Thread Ranx
I noticed there's a snapshot version of the camel-braintree as of 2.17 but do not see it in the snapshot repo. Where would I find that? Brad -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Braintree-tp5778454.html Sent from the Camel - Users mailing list archive at

Re: CXF server versus endpoints

2016-02-26 Thread Ranx
And is there a way to set that up so that the service interfaces/endpoints are just a list? -- View this message in context: http://camel.465427.n5.nabble.com/CXF-server-versus-endpoints-tp5778342p5778343.html Sent from the Camel - Users mailing list archive at Nabble.com.

CXF server versus endpoints

2016-02-26 Thread Ranx
We are in the process of creating a number of services that will share many characteristics such as security, logging and so on and it would be great if we didn't have to replicate a lot of it. Things like the SOAP binding version, logging interceptors, etc. will be common

ServiceFactory

2016-02-26 Thread Ranx
If I create a service factory instantiated in blueprint like this: And inside the factory just do a Class.forName to instantiate and return it, will the service reference itself be proxied? -- View this message in context:

Re: CamelBlueprintTestSupport version

2016-02-16 Thread Ranx
Overall I like the design of CBTS. I like the veracity of Pax Exam but don't care for all the moving parts. I'm sure it would be quite a headache to fork CBTS and replace PojoSR with Karaf but to me that would be the best of both worlds. By definition any Camel testing is really integration

Re: CamelBlueprintTestSupport version

2016-02-16 Thread Ranx
what was the original problem > - how it was fixed in newer versions (and in which versions) > - how the solution evolved over time and what were the timing issues > you've hit > > You're right, it *was* thread race/deadlock problem. > > regards > Grzegorz Grzybek >

Re: CamelBlueprintTestSupport version

2016-02-15 Thread Ranx
For whatever it's worth for whomever might run into a similar problem, I think I've identified at least one trigger. My blueprint-properties.xml is defined with: By creating a test-blueprint-properties.xml with the same information in it but no reload strategy the intermittent hang seems to

CamelBlueprintTestSupport version

2016-02-15 Thread Ranx
I believe Quinn mentioned that a new snapshot version of CBTS is out that fixes a race problem. I'm getting errors in 2.15 that definitely have the smell of a threading problem. Most of the time my tests run fine but then, every once in awhile, it will just hang when I go to call getOSGiService.

Pax Exam

2016-02-13 Thread Ranx
Is there a good archetype or template to use with Camel/Fuse? What I've found so far seem to be fairly old. I've had a working version before but I'm starting a new project and trying to start with the old project isn't working well and it has been awhile since I worked with it. I've already

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-05 Thread Ranx
E. Nigma, Did that solution resonate for you? Are you still stuck? -- View this message in context: http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-No-bean-could-be-found-in-the-registry-tp5777228p5777294.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-04 Thread Ranx
How are you setting up the service in the first bundle? How are you referring to it in the second bundle? If you are actually using the bundle during your test then as Quinn pointed out you needn't use the override method. I suspect it is the service declaration in the first bundle that is off

Dear Santa Claus

2016-02-04 Thread Ranx
My Camel in Action book pages are worn, torn and the the edges of the pages are blackened from the many times the book has been thumbed through. Sticky notes and bookmarks adorn the book in answer to long forgotten questions. But my children are starting to complain that when we curl up by the

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-01 Thread Ranx
By the way, while I realize this is in there for older JBI constructs this is what I meant when asking if there is a way that a "strict" flag could be added. Perhaps that's a question I should post on the developers forum. Even if by default the flag was false, being able to set it to true and

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-01 Thread Ranx
I think in my case the problem was with how the package scan is working but I'm not positive. In the Camel Core OSGi package scanner class there is a section. If it can find it in OSGi it shrugs, throws up its hands and resorts to brute force classloading. Instead of getting hard error Camel

Class substitution in bean?

2016-01-30 Thread Ranx
I'm currently creating test stubs for use with my blueprint tests and for use in deployment and testing. I've tried various methods with varying degrees of luck. Is there a way to substitute a class name at start up? I could create a factory class to do a class for name on it but would prefer

Cross cutting concern for microservices

2016-01-29 Thread Ranx
The current design I use for services is to create an OSGi bundle for each API interface and then aggregate them in a gateway bundle for exposure via CXF. During testing I have separate test blueprint files that bootstrap each bundle with its specific interface and test them via REST and SOAP.

Re: Camel SCR

2016-01-29 Thread Ranx
Thud? Opinions, thoughts, wild gesticulating, futurism, and keen technical insight are all welcome. Is this still so new that it isn't being used by many folks? How about the developers of the SCR bundle? What are your thoughts about it? How do you like it compared with Blueprint? --

Re: Camel SCR

2016-01-29 Thread Ranx
Thanks for the insights. It sounds as if the cfg files would need a form of semantic versioning then like bundles use. Obviously my insights are limited. Do you create your configuration files via the maven plugin and install them in etc with a feature? That might obviate some of the pain.

Camel SCR

2016-01-28 Thread Ranx
Having worked with blueprint and CamelBlueprintTestSupport for a couple of years now at different clients I'm trying to find a better alternative. I go into clients who usually have a lot of Java developers so staying in the familiar Java world is something they appreciate. As of 2.16 the SCR is

Re: Camel SCR

2016-01-28 Thread Ranx
I want to follow this up with a quick question and observation. I've noticed quite a bit of difference in the examples created by the archetype for 2.15 and 2.16 with 2.16 being far more stripped down. But both of them use a a deprecated API for part of their testing. That's something of a

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Ranx
I've reverted to using blueprint.xml for any service reference calls and limiting the routebuilders for now. The part I found most disconcerting about this was that the implementation class was being found since it should be hidden. That means the classloader is pulling it from a bundle and

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Ranx
This is serendipitous as I've recently run into this as well. I switched from straight Blueprint routes and instantiation to using blueprint to bootstrap the routebuilder(s). But the injection of the reference to the service from blueprint doesn't appear to be proxied as I see the concrete class

Re: Proxy BeanInvocations turning into first-class payloads?

2016-01-21 Thread Ranx
I noted that this was closed as "not a problem". I think it is a serious glitch when the framework isn't respecting something as fundamental as the contract specified by the interface. I'm putting in a Fuse installation for clients right now and showing a bunch of seasoned Java developers how to