Hi

Yeah it does look very cool. Good work.

Would be great if the StaxComponent could also cater for non file
based inputs. You may have the message body as a Source already. But
that can always be improved.

And yes as Richard mention the class loading should use the
ClassResolver. You can get it from the CamelContext. exchange -> camel
context -> class resolver.

And the stuff that finds the annotations. We may have some common code
for that. Or later refactor that into a util class.

Anyway keep it up.


On Fri, May 13, 2011 at 1:29 AM, Richard Kettelerij
<[email protected]> wrote:
> Hi Romain,
>
> Nice work. I've taken a look at your component. A few minor suggestions for
> improvement, in case you want to contribute it to Apache:
>
> - The component currently uses getContextClassLoader().loadClass() for
> classloading. Camel actually has a abstraction to make this portable across
> various runtime environments. You can just replace it with
> org.apache.camel.spi.ClassResolver().resolveClass().
>
> - Avoid catching the NullPointException in the StAXJAXBIteratorExpression.
>
> - Do you plan to add a DSL method for the StAXJAXBIteratorExpression
> (requires patching camel-core)? So you can write for example
> "split(stax(Record.class))" in your route.
>
> Regards,
> Richard
>
> On Thu, May 12, 2011 at 5:55 PM, Romain Manni-Bucau
> <[email protected]>wrote:
>
>> Hi all,
>>
>> i worked a bit around stax (thanks to claus for its advices).
>>
>> You can find what i've done here:
>> http://code.google.com/p/rmannibucau/source/browse/camel/camel-stax/
>>
>> The test show what can be done with it:
>>
>> http://code.google.com/p/rmannibucau/source/browse/camel/camel-stax/src/test/java/org/apache/camel/stax/test/StAXRouteTest.java
>>
>>   - validation using sax (just need a converter)
>>   - parsing using a sax contenthandler and a stax stream reader (a simple
>>   component)
>>   - parsing of sub tree to get jaxb objects using a stax event reader for
>>   the whole tree and jaxb for the sub objects
>>
>>
>> - Romain
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to