Re: A bug of InOut pattern?

2010-01-15 Thread ext2
This is a bad news for me.

Processor is very useful for customized message transformer, but now it
seems the processor cannot provide MEP-independent feature. I must deal with
all the MEP of camel correctly in the Processor if I want to re-use the
processor in different MEP. 

Camel provide POJO Bean which provide MEP-independent feature. But it's not
very facility to customize message transformer at Message-Level.

So, does the camel provide a processor which can work at Message-Level, and
provide MEP-independent feature?

Maybe it would looks like:

Interface MessageProcessor{
Message process(Message msg);
}



Willem Jiang wrote:
>Hi,

>I think you processor should check the MEP for the exchange.
>As it broke the rule of MEP.
>Can you change the code like this, and run the test again?

>Class IncreaseProcessor{
>   void process(Exchange me)
>   {
>   Integer result= me.getIn().getBody() + 1;
> if (me.getPattern().isOutCapable()) {
>   me.getOut().setBody(result);
> } else {
>   me.getIn().setBody(result);
> }
>   }
>  }
>
ext2 wrote:
> 
> Yes you are right. 
> But the real confusing thing is: the two routes I tested have same
semantic
> means, but the result is different.
> 
> While I am try to find which caused the difference, I checked the source
> code of camel, and find a lot of camel-processor obey the following rule(
I
> thinks it's camel's default rule for MEP), but the pipe-line processor
> violate it (not same as the other processors): 
> The rule is :
> 1)Processor will remember the input message-exchange
> 2)while the processor get the final result message-exchange, it will
combine
> the result message-exchange with the remembered input message-exchange. At
> this time, MEP will affect how to combine the two message-exchange
> 3) the combined result will act as the final result of processor;
> 
> But the pipe-line processor doesn't remember the input message-exchange,
but
> remember the result of first processor in the pipe-line as the
> message-exchange to combine; So it cause the two routes has different
> result;
> 
> 
> Willem Jiang wrote:
>> Your processor should check the MEP, and don't set the out message if 
>> the Exchange's MEP is InOnly.
> 
>> If there is a out message, the pipeline will try to copy the out message 
>> to next processor exchange's in message, otherwise it will copy the in 
>> message to next processor exchange's in message.
> 
>> Willem
> 
> ext2 wrote:
>> Hi:
>> The camel 2.1's pipeline patter's MEP is InOnly default. But the result
of
>> following route is different, if I using inOnly() processor in route vs
>> using default;
>>
>> I tried it using a simple sample: send a message to a direct endpoint,
> which
>> body is number=1, a route receive the message and increase the message's
>> body twice by a processor, then send to a mock endpoint;
>>
>> The increase number process's code is:
>>
>> Class IncreaseProcessor{
>>  void process(MessageExchange me)
>>  {
>>  Integer result= Me.getIn().getBody() + 1;
>>  Me.getOut().setBody(result);
>>  }
>> }
>>
>> 1): following rout using inOnly() processor , and mock endpoint's return
>> ME's in.body=3, out=Null
>>
>>
>
from("direct:inOnlyUsingProcessor").inOnly().process(outProcessor).process(o
>> utProcessor).to("mock:result");
>>
>>
>> 2) following route using default inOnly, and mock's return ME's
in.body=3,
>> out.body=2. 
>>
>
from("direct:inOnlyDefault").process(outProcessor).process(outProcessor).to(
>> "mock:result");
>>
>> So why the result has a out message and it's body=2, it should be same as
>> the first route(out=null);
>>
>>
>>
>>
>>
>>
> 
> 
> 
> 





BAM

2010-01-15 Thread mistrz

1. How do I know that the BAM process is working?  Another words, what are
the strategies to monitor BAM?  
2. Do you typically run BAM processes in different deployment units
(containers) than the actual routes?
3. I'm assuming one BAM process can monitor routes from different deployment
units (containers), correct?

-- 
View this message in context: http://old.nabble.com/BAM-tp27186508p27186508.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: Request message accessibility/manipulation

2010-01-15 Thread Stephen Gargan
To narrow it down a little further, can you supply one of the stock
strategies to the route but leave the bean definition in place. It
would be interesting to see if it resolves when not used by camel.

Also try removing org.tempuri.MyAggregationStrategy from the manifest.

Did the route I suggested not work for you? it didn't require a custom
aggregator and might get you around this if you're in a hurry.

On Fri, Jan 15, 2010 at 2:41 PM, lekkie  wrote:
>
>
> Thanks.
>
> Camel Version -> 2.1.0.psc-01-00RC1
> Osgi Container ->  Karaf
> Osgi version -> spring-osgi-core (1.2.0)
> camel-osgi -> (2.1.0.psc-01-00RC1)
>
> Bundle Manifest:
>
> Manifest-Version: 1.0
> Export-Package: org.tempuri;uses:="org.apache.camel,org.apache.camel.p
>  rocessor.aggregate"
> Built-By: lekkie
> Tool: Bnd-0.0.357
> Bundle-Name: Services :: Request Processor Bundle
> Created-By: Apache Maven Bundle Plugin
> Require-Bundle: org.apache.cxf.bundle
> Build-Jdk: 1.6.0_16
> Bundle-Version: 0.0.1.SNAPSHOT
> Bnd-LastModified: 1263566379826
> Bundle-ManifestVersion: 2
> Import-Package: META-INF.cxf,META-INF.cxf.transport.nmr,javax.jws;vers
>  ion="2.0",javax.wsdl,org.apache.camel;version="2.0",org.apache.camel.
>  processor.aggregate;version="2.0",org.apache.cxf.bus,org.apache.servi
>  cemix.camel.nmr,org.apache.servicemix.cxf.transport.nmr,org.apache.se
>  rvicemix.nmr.api,org.apache.servicemix.nmr.api.event,org.apache.servi
>  cemix.nmr.api.internal,org.springframework.beans.factory.config;versi
>  on="2.5",org.tempuri,org.tempuri.MyAggregationStrategy
> Bundle-SymbolicName: processor-bundle
>
>
>
>
> Stephen Gargan wrote:
>>
>> Can you give me some more info,such as the camel version and your osgi
>> container and version. The bundle manifest might not hurt either.
>>
>>
>> On Fri, Jan 15, 2010 at 10:01 AM, lekkie  wrote:
>>>
>>> See attached trace, thanks.
>>>
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in
>>> OSGi
>>> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=192|bnd.sym=kimono-processor-bundle]:
>>> Initialization of bean failed; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'camelContext': Invocation of init method failed; nested
>>> exception
>>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>>> find class [org.tempuri.MyAggregationStrategy] for bean with name
>>> 'myAggregatorStrategy' defined in URL
>>> [bundleentry://192.fwk5195164/META-INF/spring/camel-context.xml]; nested
>>> exception is java.lang.ClassNotFoundException:
>>> org.tempuri.MyAggregationStrategy not found from bundle
>>> [kimono-processor-bundle]
>>>        at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
>>>        at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>>>        at
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>>>        at
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>>        at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>>        at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>>        at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>>        at
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
>>>        at
>>> org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
>>>        at
>>> org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
>>>        at
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1500(AbstractDelegatedExecutionApplicationContext.java:69)
>>>        at
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:351)
>>>        at
>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>>        at
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
>>>        at
>>> org.springframework.osgi.extender.internal.dep

Re: Spring batch integration with camel

2010-01-15 Thread Christian Mueller

Hey Charles,

I'm not sure, what is the best integration solution from Camel and Spring
Batch. That's the reason why I ask for the ideas and proposals of other
Camel riders. May be there is no need to integrate Camel and Spring Batch,
because Spring Batch could send/write the Item to a queue and let Camel
process it. 

As you can read in the first post, lazyeye has done some integration and I
would like to see how he/she integrate Spring Batch and Camel because we use
both frameworks.

Regards,
Christian
-- 
View this message in context: 
http://old.nabble.com/Spring-batch-integration-with-camel-tp25285268p27184928.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Request message accessibility/manipulation

2010-01-15 Thread lekkie


Thanks.

Camel Version -> 2.1.0.psc-01-00RC1
Osgi Container ->  Karaf
Osgi version -> spring-osgi-core (1.2.0)
camel-osgi -> (2.1.0.psc-01-00RC1)

Bundle Manifest:

Manifest-Version: 1.0
Export-Package: org.tempuri;uses:="org.apache.camel,org.apache.camel.p
 rocessor.aggregate"
Built-By: lekkie
Tool: Bnd-0.0.357
Bundle-Name: Services :: Request Processor Bundle
Created-By: Apache Maven Bundle Plugin
Require-Bundle: org.apache.cxf.bundle
Build-Jdk: 1.6.0_16
Bundle-Version: 0.0.1.SNAPSHOT
Bnd-LastModified: 1263566379826
Bundle-ManifestVersion: 2
Import-Package: META-INF.cxf,META-INF.cxf.transport.nmr,javax.jws;vers
 ion="2.0",javax.wsdl,org.apache.camel;version="2.0",org.apache.camel.
 processor.aggregate;version="2.0",org.apache.cxf.bus,org.apache.servi
 cemix.camel.nmr,org.apache.servicemix.cxf.transport.nmr,org.apache.se
 rvicemix.nmr.api,org.apache.servicemix.nmr.api.event,org.apache.servi
 cemix.nmr.api.internal,org.springframework.beans.factory.config;versi
 on="2.5",org.tempuri,org.tempuri.MyAggregationStrategy
Bundle-SymbolicName: processor-bundle




Stephen Gargan wrote:
> 
> Can you give me some more info,such as the camel version and your osgi
> container and version. The bundle manifest might not hurt either.
> 
> 
> On Fri, Jan 15, 2010 at 10:01 AM, lekkie  wrote:
>>
>> See attached trace, thanks.
>>
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in
>> OSGi
>> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=192|bnd.sym=kimono-processor-bundle]:
>> Initialization of bean failed; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'camelContext': Invocation of init method failed; nested
>> exception
>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>> find class [org.tempuri.MyAggregationStrategy] for bean with name
>> 'myAggregatorStrategy' defined in URL
>> [bundleentry://192.fwk5195164/META-INF/spring/camel-context.xml]; nested
>> exception is java.lang.ClassNotFoundException:
>> org.tempuri.MyAggregationStrategy not found from bundle
>> [kimono-processor-bundle]
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>>        at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>        at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1500(AbstractDelegatedExecutionApplicationContext.java:69)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:351)
>>        at
>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
>>        at
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>>        at java.lang.Thread.run(Thread.java:595)
>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'camelContext': Invocation of init method failed;
>> nested exception is
>> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>> find
>> class [org.tempuri.MyAggregationStrategy] for bean with name
>> 'myAggregatorStrategy' defined in URL
>> [bundleentry://192.fw

Re: Request message accessibility/manipulation

2010-01-15 Thread Stephen Gargan
Can you give me some more info,such as the camel version and your osgi
container and version. The bundle manifest might not hurt either.


On Fri, Jan 15, 2010 at 10:01 AM, lekkie  wrote:
>
> See attached trace, thanks.
>
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in OSGi
> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=192|bnd.sym=kimono-processor-bundle]:
> Initialization of bean failed; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'camelContext': Invocation of init method failed; nested exception
> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
> find class [org.tempuri.MyAggregationStrategy] for bean with name
> 'myAggregatorStrategy' defined in URL
> [bundleentry://192.fwk5195164/META-INF/spring/camel-context.xml]; nested
> exception is java.lang.ClassNotFoundException:
> org.tempuri.MyAggregationStrategy not found from bundle
> [kimono-processor-bundle]
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>        at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
>        at
> org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
>        at
> org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1500(AbstractDelegatedExecutionApplicationContext.java:69)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:351)
>        at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
>        at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'camelContext': Invocation of init method failed;
> nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> class [org.tempuri.MyAggregationStrategy] for bean with name
> 'myAggregatorStrategy' defined in URL
> [bundleentry://192.fwk5195164/META-INF/spring/camel-context.xml]; nested
> exception is java.lang.ClassNotFoundException:
> org.tempuri.MyAggregationStrategy not found from bundle
> [kimono-processor-bundle]
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>        at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGe

Re: Request message accessibility/manipulation

2010-01-15 Thread lekkie

See attached trace, thanks.

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in OSGi
resource[classpath:META-INF/cxf/cxf.xml|bnd.id=192|bnd.sym=kimono-processor-bundle]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'camelContext': Invocation of init method failed; nested exception
is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.tempuri.MyAggregationStrategy] for bean with name
'myAggregatorStrategy' defined in URL
[bundleentry://192.fwk5195164/META-INF/spring/camel-context.xml]; nested
exception is java.lang.ClassNotFoundException:
org.tempuri.MyAggregationStrategy not found from bundle
[kimono-processor-bundle]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
at
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
at
org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1500(AbstractDelegatedExecutionApplicationContext.java:69)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:351)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'camelContext': Invocation of init method failed;
nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.tempuri.MyAggregationStrategy] for bean with name
'myAggregatorStrategy' defined in URL
[bundleentry://192.fwk5195164/META-INF/spring/camel-context.xml]; nested
exception is java.lang.ClassNotFoundException:
org.tempuri.MyAggregationStrategy not found from bundle
[kimono-processor-bundle]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.context.support.Abstr

Re: Request message accessibility/manipulation

2010-01-15 Thread Stephen Gargan
Hmm, You probably do export it's package correctly in the manifest,
though I know I've often forgotten to, is it correct? Could you post
the exception trace so we can have a look?


On Fri, Jan 15, 2010 at 6:46 AM, lekkie  wrote:
>
> Thanks Stephen.
>
> I followed your sample snippet below.
>
> The wiretap was a success, however, I couldnt get through with the
> aggregator.
>
> It kept complaining class not found for my custom aggregator. See sample
> snippet below:
>
>  http://camel.apache.org/schema/spring";
> trace="true">
>
>   org.tempuri
>
>    
>        
>        
>        
>         uri="nmr:{http://services.locator/}ServicesService:ServicesPort"/>
>        
>    
>
>    
>        
>        
>                
>                        true
>                    
>                
>            
>    
>
>  
>
>   class="org.tempuri.MyAggregationStrategy"/>
>
> 
>
>
>
> I have the ffg in my project
>
> src/main/java/org/tempuri/MyAggregationStrategy.java
> src/main/resources/META-INF/spring/camel-context.xml
>
> And I can confirm the class is compiled with the bundle deployed.
>
> Any ideas?
>
>
>
>
> Stephen Gargan wrote:
>>
>> Hi,
>>
>> You can use Wiretaps and an aggregator to do what you're suggesting.
>> At each step that you want an intermediate result to be available,
>> wiretap it off to an aggregator and set the batch size of the
>> aggregator accordingly.
>>
>> from("direct:consumerEndpoint").wireTap("direct:aggregator").to("direct:requestToSomeEndpointTransformer").to(
>>                     "direct:someEndpoint").to("direct:aggregator");
>>
>> from("direct:aggregator").aggregate().header("id").batchSize(2).groupExchanges().to("mock:result");
>>
>> One thing to note is that groupExchanges() will gather up all the
>> aggregated exchanges and store them in a property in the exchange. You
>> get at them via
>>
>> List grouped = e.getProperty(Exchange.GROUPED_EXCHANGE,
>> List.class);
>>
>> You'll need to write a custom processor (in place of the mock) to
>> combine/transform them to your liking as before responding. You can
>> find a bunch of info about aggregators here
>>
>> http://camel.apache.org/aggregator.html
>>
>> ste.
>>
>> On Thu, Jan 14, 2010 at 12:12 AM, lekkie  wrote:
>>>
>>> Hi guys,
>>>
>>>
>>> Just a quick one. I have this scenario where I 'd like to manipulate a
>>> request and some reponse from an endpoint. The flow below describe what I
>>> am
>>> trying to achieve:
>>>
>>> http://camel.apache.org/schema/spring";
>>> trace="true">
>>>    
>>>      
>>>      
>>>      
>>>      
>>>      
>>>    
>>> 
>>>
>>> I'd like the transformation (requestToAnotherEndpoint.xsl) to be able to
>>> access/manipulate the original request message from nmr:consumerEndpoint
>>> and
>>> the response from nmr:someEndpoint in order to product its output.
>>>
>>> Is this scenario possible?
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Request-message-accessibility-manipulation-tp27157259p27157259.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Request-message-accessibility-manipulation-tp27157259p27178135.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>


Re: Timer fails to resolve parameters

2010-01-15 Thread pmmerritt

I implemented the VFSPackageScanClassResolver as discussed  
http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/
Apache Camel JBoss 5 
and plugged it in to the camel route and it is recognized by camel as is
evident by the following log statements
2010-01-15 11:40:21,513 INFO 
[org.apache.camel.spring.CamelContextFactoryBean] (main) Using custom
PackageScanClassResolver: vfspackagescanclassresol...@3b567997g//
2010-01-15 11:40:27,595 DEBUG [VFSPackageScanClassResolver] (main) Searching
for annotations of org.apache.camel.Converter in packages:
[org.apache.camel.component.file, org.apache.camel.converter, 
org.apache.camel.spring.converter, org.apache.activemq.camel.converter,
org.apache.camel.component.http]
2010-01-15 11:40:27,596 TRACE
[mil.dod.nga.jbosscamel.VFSPackageScanClassResolver] (main) The thread
context class loader:
org.jboss.web.tomcat.service.webctxloader$encloa...@641c6370  is used to
load the class

I am still getting the same error as described above. Any ideas on what else
I might try?
For completeness we are using Camel 2.0.0 and JBoss 5.1.0.GA

Thanks
Phillip Merritt

Claus Ibsen-2 wrote:
> 
> On Thu, Jan 14, 2010 at 2:28 PM, pmmerritt 
> wrote:
>>
>> Camel fails to load the timer component in the following route
>> 
>>                
>>                > uri="bean:dmScheduler?method=getNewTransactions"/>
>>   
>>
>> Camel is configured as a war file which is being loaded into the JBoss
>> Application Server.
>>
>> The following error is thrown while attempting to load the Camel Context
>> 08:18:26,339 ERROR Exception sending context initialized event to
>> listener
>> instance of class org.springframework.web.context.ContextLoaderListener
>> org.apache.camel.ResolveEndpointFailedException: Failed to resolve
>> endpoint:
>> timer://dm?period=2000 due to: Could not find a suitable setter for
>> property: period as there isn't a setter method with same type:
>> java.lang.String nor type conversion possible: No type converter
>> available
>> to convert from type: java.lang.String to the required type: long with
>> value
>> 2000
>>
> 
> Hi
> 
> JBoss has a classloading issue which causes Camel not being able to
> pickup type converters from the classpath.
> 
> You need to use a special JBoss class loader with Camel to resolve that.
> There are some links here to some people who did that
> http://camel.apache.org/articles.html
> 
> Basically what would be desirable is to create a camel-jboss component
> and ship that with Camel. However I do not know if there is any
> licensing implications.
> 
> 
> 
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Timer-fails-to-resolve-parameters-tp27161260p27161260.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Timer-fails-to-resolve-parameters-tp27161260p27180116.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Spring batch integration with camel

2010-01-15 Thread Charles Moulliard
Hi Christian,

As we have the component camel-spring-integration, this new module will be
called : camel-spring-batch

What do you plan to do between camel and spring batch as camel could be
improved to become also a batch solution ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Fri, Jan 15, 2010 at 5:30 PM, Christian Mueller <
christian.muel...@gmail.com> wrote:

>
> Issue opened (https://issues.apache.org/activemq/browse/CAMEL-2367) and
> waiting for replies... :working:
>
> Christian
>
> --
> View this message in context:
> http://old.nabble.com/Spring-batch-integration-with-camel-tp25285268p27179703.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>


Re: Spring batch integration with camel

2010-01-15 Thread Christian Mueller

Issue opened (https://issues.apache.org/activemq/browse/CAMEL-2367) and
waiting for replies... :working:

Christian

-- 
View this message in context: 
http://old.nabble.com/Spring-batch-integration-with-camel-tp25285268p27179703.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Spring batch integration with camel

2010-01-15 Thread Claus Ibsen
On Fri, Jan 15, 2010 at 1:03 PM, Christian Mueller
 wrote:
>
> Hey,
>
> I would also like this contribution, because we use both frameworks. Any
> news for that? Should we open an issue (new feature) for that?
>

We love contributions so feel free to create a ticket

> Regards,
> Christian
> --
> View this message in context: 
> http://old.nabble.com/Spring-batch-integration-with-camel-tp25285268p27174835.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Find if an endpoint uri is supported

2010-01-15 Thread Claus Ibsen
On Fri, Jan 15, 2010 at 5:09 PM, Johan Haleby  wrote:
>
> That won't help because hasEndpoint checks the full uri, not just the scheme.
> A work-around would be to do something like "hasComponent(new
> URI(endpointURI).getScheme())". Perhaps a method like
> "isSupportedScheme(enpointURI)" should be added to the API that does this
> for you?
>
> /Johan

CameContext.getComponentNames() return a List with the schemes.


>
>
> Claus Ibsen-2 wrote:
>>
>> On Fri, Jan 15, 2010 at 4:09 PM, Claus Ibsen 
>> wrote:
>>> Hi
>>>
>>> I think CamelContext have a list of registered endpoints you can peek in.
>>>
>>
>> And I believe 2.1 or later have a hasEndpoint(uri) method.
>>
>>
>>> On Fri, Jan 15, 2010 at 4:04 PM, Johan Haleby 
>>> wrote:

 Hi,

 How can I find out if a URI endpoint that I pass to a producer is a
 valid
 endpoint (i.e. that a component has been registered to handle it)? E.g.
 how
 can find out if "jms:queue:myqueue" is a valid endpoint and
 "jsm:queue:myqueue" is not before I send it (if the JMS component has
 been
 registered)?

 /Johan
 --
 View this message in context:
 http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27178476.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27179388.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Find if an endpoint uri is supported

2010-01-15 Thread Johan Haleby

That won't help because hasEndpoint checks the full uri, not just the scheme.
A work-around would be to do something like "hasComponent(new
URI(endpointURI).getScheme())". Perhaps a method like
"isSupportedScheme(enpointURI)" should be added to the API that does this
for you? 

/Johan


Claus Ibsen-2 wrote:
> 
> On Fri, Jan 15, 2010 at 4:09 PM, Claus Ibsen 
> wrote:
>> Hi
>>
>> I think CamelContext have a list of registered endpoints you can peek in.
>>
> 
> And I believe 2.1 or later have a hasEndpoint(uri) method.
> 
> 
>> On Fri, Jan 15, 2010 at 4:04 PM, Johan Haleby 
>> wrote:
>>>
>>> Hi,
>>>
>>> How can I find out if a URI endpoint that I pass to a producer is a
>>> valid
>>> endpoint (i.e. that a component has been registered to handle it)? E.g.
>>> how
>>> can find out if "jms:queue:myqueue" is a valid endpoint and
>>> "jsm:queue:myqueue" is not before I send it (if the JMS component has
>>> been
>>> registered)?
>>>
>>> /Johan
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27178476.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27179388.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: distributed deployment flow Camel (Route)

2010-01-15 Thread Claus Ibsen
On Fri, Jan 15, 2010 at 10:35 AM, titexe  wrote:
>
> Hello,
>
> Do you plan in the new Camel versions of a module deployment flows in a
> manner distributed?
>

I do not understand what you are asking. Camel is framework / kit. Its
not a server or the likes.
Its deployment agnostic which means it can often be deployed how you
like it. After all its just a .jar file and Java code as any other
Java library.

So the short answer we do want Camel to be kept this way and let
deployment in a distributed manner handled by something else (eg the
runtime platform etc.)

But you are much welcome to explain more what you mean.

> or a way to make packages that facilitate the deployment of flows?
>
> I think it's the most effective way for decentralized architectures.
>
> Thank you in advance
>
> Best regards,
>
> titexe
> --
> View this message in context: 
> http://old.nabble.com/distributed-deployment-flow-Camel-%28Route%29-tp27173362p27173362.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Find if an endpoint uri is supported

2010-01-15 Thread Claus Ibsen
On Fri, Jan 15, 2010 at 4:09 PM, Claus Ibsen  wrote:
> Hi
>
> I think CamelContext have a list of registered endpoints you can peek in.
>

And I believe 2.1 or later have a hasEndpoint(uri) method.


> On Fri, Jan 15, 2010 at 4:04 PM, Johan Haleby  wrote:
>>
>> Hi,
>>
>> How can I find out if a URI endpoint that I pass to a producer is a valid
>> endpoint (i.e. that a component has been registered to handle it)? E.g. how
>> can find out if "jms:queue:myqueue" is a valid endpoint and
>> "jsm:queue:myqueue" is not before I send it (if the JMS component has been
>> registered)?
>>
>> /Johan
>> --
>> View this message in context: 
>> http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27178476.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Find if an endpoint uri is supported

2010-01-15 Thread Claus Ibsen
Hi

I think CamelContext have a list of registered endpoints you can peek in.

On Fri, Jan 15, 2010 at 4:04 PM, Johan Haleby  wrote:
>
> Hi,
>
> How can I find out if a URI endpoint that I pass to a producer is a valid
> endpoint (i.e. that a component has been registered to handle it)? E.g. how
> can find out if "jms:queue:myqueue" is a valid endpoint and
> "jsm:queue:myqueue" is not before I send it (if the JMS component has been
> registered)?
>
> /Johan
> --
> View this message in context: 
> http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27178476.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Find if an endpoint uri is supported

2010-01-15 Thread Johan Haleby

Hi,

How can I find out if a URI endpoint that I pass to a producer is a valid
endpoint (i.e. that a component has been registered to handle it)? E.g. how
can find out if "jms:queue:myqueue" is a valid endpoint and
"jsm:queue:myqueue" is not before I send it (if the JMS component has been
registered)?

/Johan
-- 
View this message in context: 
http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27178476.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Request message accessibility/manipulation

2010-01-15 Thread lekkie

Thanks Stephen.

I followed your sample snippet below.

The wiretap was a success, however, I couldnt get through with the
aggregator.

It kept complaining class not found for my custom aggregator. See sample
snippet below:

  http://camel.apache.org/schema/spring";
trace="true">
  
   org.tempuri
  


   

http://services.locator/}ServicesService:ServicesPort"/>





 

true





  
  
  
  




I have the ffg in my project 

src/main/java/org/tempuri/MyAggregationStrategy.java
src/main/resources/META-INF/spring/camel-context.xml

And I can confirm the class is compiled with the bundle deployed.

Any ideas?




Stephen Gargan wrote:
> 
> Hi,
> 
> You can use Wiretaps and an aggregator to do what you're suggesting.
> At each step that you want an intermediate result to be available,
> wiretap it off to an aggregator and set the batch size of the
> aggregator accordingly.
> 
> from("direct:consumerEndpoint").wireTap("direct:aggregator").to("direct:requestToSomeEndpointTransformer").to(
> "direct:someEndpoint").to("direct:aggregator");
> 
> from("direct:aggregator").aggregate().header("id").batchSize(2).groupExchanges().to("mock:result");
> 
> One thing to note is that groupExchanges() will gather up all the
> aggregated exchanges and store them in a property in the exchange. You
> get at them via
> 
> List grouped = e.getProperty(Exchange.GROUPED_EXCHANGE,
> List.class);
> 
> You'll need to write a custom processor (in place of the mock) to
> combine/transform them to your liking as before responding. You can
> find a bunch of info about aggregators here
> 
> http://camel.apache.org/aggregator.html
> 
> ste.
> 
> On Thu, Jan 14, 2010 at 12:12 AM, lekkie  wrote:
>>
>> Hi guys,
>>
>>
>> Just a quick one. I have this scenario where I 'd like to manipulate a
>> request and some reponse from an endpoint. The flow below describe what I
>> am
>> trying to achieve:
>>
>> http://camel.apache.org/schema/spring";
>> trace="true">
>>    
>>      
>>      
>>      
>>      
>>      
>>    
>> 
>>
>> I'd like the transformation (requestToAnotherEndpoint.xsl) to be able to
>> access/manipulate the original request message from nmr:consumerEndpoint
>> and
>> the response from nmr:someEndpoint in order to product its output.
>>
>> Is this scenario possible?
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Request-message-accessibility-manipulation-tp27157259p27157259.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Request-message-accessibility-manipulation-tp27157259p27178135.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Apache camel model JAXB / Jersey / OSGI (camel-web project)

2010-01-15 Thread Charles Moulliard
Hi,

When using camel-web-console on OSGI platform I get this error :


14:52:37,415 | ERROR | 11446...@qtp1-0  | ContainerResponse|
.spi.container.ContainerResponse  477 | Mapped exception to response: 500
(Internal Server Error)
javax.ws.rs.WebApplicationException: javax.xml.bind.MarshalException
 - with linked exception:
[com.sun.istack.SAXException2: unable to marshal type
"org.apache.camel.model.ToDefinition" as an element because it is not known
to this context.]
at
com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:151)
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:289)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1029)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:797)
at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:770)
at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:731)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[com.sun.istack.SAXException2: unable to marshal type
"org.apache.camel.model.ToDefinition" as an element because it is not known
to this context.]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:318)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:100)
at
com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:171)
at
com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:149)


Any idea is welcome ?

Remark : org.apache.camel.model package is well imported by the bundle


Regards,


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


Re: requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE

2010-01-15 Thread Claus Ibsen
On Fri, Jan 15, 2010 at 2:41 PM, huntc  wrote:
>
> Hi there,
>
> Is the following code valid... my goal is to ensure that the MINA connection
> I'm using is closed upon having received a reply:
>
>  Object replyMessage = producerTemplate
>      .requestBodyAndHeader(
>          smsSenderEndpoint,
>          requestMessage,
>          MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE,
>          true);
>
> The doco. implies that the above header value is useful in server style
> scenarios hence my question around using a consuming template call.
>
> I'd like to confirm whether it is necessary for me to specify this header in
> the context of using a template; particularly if the same template is
> invoked again to send another message very soon after receiving a reply to
> the previous one.
>

Yes you need to pass in this header every time you want to session closed.


> Thanks.
>
> Kind regards,
> Christopher
> --
> View this message in context: 
> http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27175565.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE

2010-01-15 Thread huntc

Hi there,

Is the following code valid... my goal is to ensure that the MINA connection
I'm using is closed upon having received a reply:

  Object replyMessage = producerTemplate
  .requestBodyAndHeader(
  smsSenderEndpoint,
  requestMessage,
  MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE,
  true);

The doco. implies that the above header value is useful in server style
scenarios hence my question around using a consuming template call.

I'd like to confirm whether it is necessary for me to specify this header in
the context of using a template; particularly if the same template is
invoked again to send another message very soon after receiving a reply to
the previous one.

Thanks.

Kind regards,
Christopher
-- 
View this message in context: 
http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27175565.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Spring batch integration with camel

2010-01-15 Thread Christian Mueller

Hey,

I would also like this contribution, because we use both frameworks. Any
news for that? Should we open an issue (new feature) for that?

Regards,
Christian
-- 
View this message in context: 
http://old.nabble.com/Spring-batch-integration-with-camel-tp25285268p27174835.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Tight Integration with CEP (Complex Event Processing)

2010-01-15 Thread verlsnake

I'm currently not familiar with Apache Camel; what I would like to do is:
- Doing Complex Event Processing upon transient AND historic data
- With data routed to the CEP Engine (of choice) by Camel
- And result data handed back by the CEP Engine to Camel for consumption of
all kinds Camel has to offer
- And this workflow around a CEP Engine should be as conveniently as
possible




Ashwin Karpe wrote:
> 
> Hi,
> 
> Can you please provide further clarity on this subject. It is not entirely
> clear as to what you are looking for...
> 
> Can you be more specific...?
> 
> Thanks,
> 
> Ashwin...
>  
> 
> verlsnake wrote:
>> 
>> Integration with CEP (Complex Event Processing) - relatively seamlessly,
>> not in an awkward afterthought manner - is more and more important in any
>> middleware stack ...
>> 
>> So what can Camel do about this CEP integration for us ?
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tight-Integration-with-CEP-%28Complex-Event-Processing%29-tp27165344p27173365.html
Sent from the Camel - Users mailing list archive at Nabble.com.



distributed deployment flow Camel (Route)

2010-01-15 Thread titexe

Hello,

Do you plan in the new Camel versions of a module deployment flows in a
manner distributed?

or a way to make packages that facilitate the deployment of flows?

I think it's the most effective way for decentralized architectures.

Thank you in advance

Best regards,

titexe
-- 
View this message in context: 
http://old.nabble.com/distributed-deployment-flow-Camel-%28Route%29-tp27173362p27173362.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Keep the lastModified timestamp when writing a file.

2010-01-15 Thread Claus Ibsen
On Thu, Jan 14, 2010 at 12:47 PM, sjmcduf  wrote:
>
>
>
> Here
> https://issues.apache.org/activemq/browse/CAMEL-2361
>
> Thank you

I have committed this new feature. You are welcome to test it with a
2.2-SNAPSHOT or wait for the 2.2 release.
http://camel.apache.org/download.html


>
> Simon
>
>
>
> Claus Ibsen-2 wrote:
>>
>> On Thu, Jan 14, 2010 at 12:46 AM, sjmcduf  wrote:
>>>
>>> I do the following:
>>>
>>>
>>> "ftp://t...@ftp.ttessier.ca/ftp.input?&recursive=true&binary=true&consumer.delay=1000";)
>>>            .to("file://M:/FTP.INPUT/");
>>>
>>> I would like to have my file in transfered and keeping their
>>> lastModifiedTime. I wonder if a flag is available for that ? Another
>>> solution would be to get it from the Message and do it programmatically.
>>>
>>
>> Hi
>>
>> Good idea. Notice that the timestamp from the FTP library is often not
>> 100% accurate down to the seconds.
>>
>> Could you create a ticket in JIRA for this feature request?
>> http://issues.apache.org/activemq/browse/CAMEL
>>
>>>
>>> Thank you
>>>
>>> sjmcduf
>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Keep-the-lastModified-timestamp-when-writing-a-file.-tp27154059p27154059.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Keep-the-lastModified-timestamp-when-writing-a-file.-tp27154059p27160067.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus