Re: Split using tokenize on header

2009-05-10 Thread Willem Jiang
How about return a List from the POJO bean method? Then we can check the List Object in the Splitter's createProcessorExchangePairsList() and createProcessorExchangePairsIterable(), if the object in the list is Message, we can set the Exchange's InMessage with the Message object that we get from th

Re: Custom XPath Annotation

2009-05-10 Thread Willem Jiang
Hi After checking the Camel code, I think the MyXPath need to be extended from XPath. That is because the XPathAnnotationExpressionFactory will check if the annotation is the instance of XPath, before it adds the namespace into the XPathBuilder. public class XPathAnnotationExpressionFactory exte

Re: Split using tokenize on header

2009-05-10 Thread Willem Jiang
Hi, I just created JIAR[1] and did a quick fix for this issue both Camel 2.0 and Camel 1.x branch. Please check out the latest SNPASHOT[2] or the coming up Camel 1.6.1 for it. [1]https://issues.apache.org/activemq/browse/CAMEL-1597 [2]https://repository.apache.org/content/repositories/snapshots/or

Re: Split using tokenize on header

2009-05-10 Thread Claus Ibsen
On Mon, May 11, 2009 at 2:34 AM, Willem Jiang wrote: > How about return a List from the POJO bean method? > Then we can check the List Object in the Splitter's > createProcessorExchangePairsList() and > createProcessorExchangePairsIterable(), if the object in the list is > Message, we can set the

Re: Custom XPath Annotation

2009-05-10 Thread Claus Ibsen
On Mon, May 11, 2009 at 2:46 AM, Willem Jiang wrote: > Hi > > After checking the Camel code, I think the MyXPath need to be extended > from XPath. > > That is because the XPathAnnotationExpressionFactory will check if the > annotation is the instance of XPath, before it adds the namespace into > t

Re: JTA Transactions not rolling back in RouteBuilder

2009-05-10 Thread triswork
I have made some progress with this issue, but I am more confused than ever... If I annotate my poll() method with @Transactional(propagation = Propagation.MANDATORY) I get: IllegalTransactionStateException: No existing transaction found for transaction marked with propagation 'mandatory' If, how

Re: JTA Transactions not rolling back in RouteBuilder

2009-05-10 Thread Claus Ibsen
On Mon, May 11, 2009 at 7:46 AM, triswork wrote: > > I have made some progress with this issue, but I am more confused than > ever... > If I annotate my poll() method with @Transactional(propagation = > Propagation.MANDATORY) I get: > IllegalTransactionStateException: No existing transaction found

Re: JTA Transactions not rolling back in RouteBuilder

2009-05-10 Thread triswork
Hi Claus, The annotations seems to work OK. If I change the propagation to REQUIRED or REQUIRES_NEW, the transactions work fine (but only for the JDBC portion of the transaction). I will try to put a sample project together this morning and create the ticket. Regards, Tristan -- View this mes

Re: JTA Transactions not rolling back in RouteBuilder

2009-05-10 Thread Claus Ibsen
On Mon, May 11, 2009 at 7:46 AM, triswork wrote: > > I have made some progress with this issue, but I am more confused than > ever... > If I annotate my poll() method with @Transactional(propagation = > Propagation.MANDATORY) I get: > IllegalTransactionStateException: No existing transaction found

Re: Split using tokenize on header

2009-05-10 Thread Willem Jiang
Hi Claus I updated the unit tests of SplitterPOJOTest and added some comments for this feature, I think the wiki will be updated when the confluence exports the static page. Willem Claus Ibsen wrote: > On Mon, May 11, 2009 at 2:34 AM, Willem Jiang wrote: >> How about return a List from the POJO

Re: Split using tokenize on header

2009-05-10 Thread Claus Ibsen
On Mon, May 11, 2009 at 8:27 AM, Willem Jiang wrote: > Hi Claus > > I updated the unit tests of SplitterPOJOTest and added some comments for > this feature, I think the wiki will be updated when the confluence > exports the static page. Willem we need 2 samples for POJO One for a regular POJO tha

Re: Custom XPath Annotation

2009-05-10 Thread Willem Jiang
Yes, we could define the namespace when using the @XPath annotation. Here is an example: public void checkLuggage(Exchange exchange, @Body String body, @XPath(value = "/ns1:order/@custId", namespaces = {...@namespaceprefix(prefix = "ns1", uri = "http://example.org/ns1";)}) String custId) { ... }

Re: Classloading issue : SMX4 / Camel 2.0 / Camel-quickfix !!!!

2009-05-10 Thread Charles Moulliard
Hi, I have solved my problem. The camel routes declaration was erroneous. Must be Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer **

Re: Split using tokenize on header

2009-05-10 Thread Willem Jiang
Yeah, I added a new POJO method splitMessage() to return a List of Message, and the original "split" method is renamed to be "splitBody" method. You can find the change here[1]. [1] http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java?r