Camel based Polling Provider for HTTP with XML payloads

2009-07-10 Thread huntc

I've just posted some code re. how to implement an HTTP based polling
provider for XML objects using Camel. I hope this forum finds it useful
(feedback is of course welcome!).

http://christopherhunt-software.blogspot.com/2009/07/camel-based-xml-payload-http-polling.html
-- 
View this message in context: 
http://www.nabble.com/Camel-based-Polling-Provider-for-HTTP-with-XML-payloads-tp24423099p24423099.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: Disabling stream caching for multicast in 1.6.1

2009-07-10 Thread Claus Ibsen
On Thu, Jul 9, 2009 at 2:59 PM, huntc wrote:
>
> Hi there,
>
> Is it possible to disable stream caching when using multicast via the fluent
> builder api in 1.6.1?
>
I actually do not think so, its kinda auto enabling itself when using
dead letter channel or multicast.

In 2.0 you got full control whether to use it or not. is disabled by
default. That is from 2.0m2+.



> Kind regards,
> Christopher
> --
> View this message in context: 
> http://www.nabble.com/Disabling-stream-caching-for-multicast-in-1.6.1-tp24409674p24409674.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: JMS publish consuming sockets?

2009-07-10 Thread Claus Ibsen
Hi

Are your routes InOnly? Eg you do not consume from a JMS queue?

There was a bad default in camel-jms. See the warning on the JMS component page.
Maybe it can help.

And have you tried asking on the ActiveMQ forums. Must be an issue
they have heard before.
AMQ have a ton of settings to adjust.


On Thu, Jul 9, 2009 at 2:09 AM, huntc wrote:
>
> Hi guys,
>
> I've just noticed a problem with my 1.6.0 based application. I believe it
> may be establishing a connection with AMQ for the purposes of publishing on
> a topic, and then while retaining that connection, opening another
> connection the next time it needs to publish. This is just a hypothesis but
> after a good period of time (like a month or two), AMQ runs out of file
> descriptors and complains thus:
>
>
> Could not accept connection : Too many open files
>
>
> Here's my Camel route:
>
>
> from("direct:publishCAT21FeatureCollection").process(
>                                cat21FeatureCollectionToGMLTransformer).to(
>                                
> "activemq-sender:topic:com.classactionpl.javaFlightTopic");
>
>
>
> My spring config for AMQ is (activemq-receiver is defined but actually not
> used by my app at the moment):
>
>
>         class="org.apache.activemq.ActiveMQConnectionFactory">
>                                        value="${com.classactionpl.asterixservices.brokerurl}" 
> />
>        
>         class="org.apache.activemq.camel.component.ActiveMQComponent">
>                 ref="activeMQConnectionFactory"
> />
>        
>         class="org.apache.activemq.camel.component.ActiveMQComponent">
>                
>                         class="org.apache.activemq.pool.PooledConnectionFactory">
>                                 ref="activeMQConnectionFactory" />
>                        
>                
>        
>
>
> and the broker url:
>
>
> com.classactionpl.asterixservices.brokerurl=failover:tcp://localhost:61616
>
>
> Here's what I see in my Camel application's log file:
>
>
> 2009-07-09 09:47:09,607 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully reconnected to tcp://localhost:61616
> 2009-07-09 09:47:25,123 [127.0.0.1:61616] WARN  FailoverTransport
> - Transport failed to tcp://localhost:61616 , attempting to automatically
> reconnect due to: java.net.SocketException: Connection reset
> 2009-07-09 09:47:25,132 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully reconnected to tcp://localhost:61616
> 2009-07-09 09:48:35,279 [127.0.0.1:61616] WARN  FailoverTransport
> - Transport failed to tcp://localhost:61616 , attempting to automatically
> reconnect due to: java.io.EOFException
> 2009-07-09 09:48:35,291 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully reconnected to tcp://localhost:61616
> 2009-07-09 09:48:35,337 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully connected to tcp://localhost:61616
> 2009-07-09 09:49:35,478 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully connected to tcp://localhost:61616
> 2009-07-09 09:51:28,171 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully connected to tcp://localhost:61616
> 2009-07-09 09:52:55,163 [ActiveMQ Task  ] INFO  FailoverTransport
> - Successfully connected to tcp://localhost:61616
>
>
> I wouldn't expect so many failovers although it might just be the
> PooledConnectionFactory filling up its pool of connections.
>
> Any ideas?
>
> Kind regards,
> Christopher
> --
> View this message in context: 
> http://www.nabble.com/JMS-publish-consuming-sockets--tp24401653p24401653.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Mistake in FAQ sample code.

2009-07-10 Thread Jörn Kottmann

Hello everyone,

Thats the FAQ item in question:
http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html

The sample code implements a Processor which returns an Exchange  
object from its

process method, but the process method returns nothing, right ?

Jörn





Re: Mistake in FAQ sample code.

2009-07-10 Thread Claus Ibsen
On Fri, Jul 10, 2009 at 10:16 AM, Jörn Kottmann wrote:
> Hello everyone,
>
> Thats the FAQ item in question:
> http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html
>
> The sample code implements a Processor which returns an Exchange object from
> its
> process method, but the process method returns nothing, right ?
>

Right its void. I have fixed the FAQ. Thanks for reporting.


> Jörn
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Jetty component and HTTP parameter

2009-07-10 Thread SwenVogel

I have tested the feature with apache-camel-2.0-SNAPSHOT.zip (Thu Jul 09
17:35:12 GMT+00:00 2009)
and send a very simple XML file as request body:



Hello World


And i encountered two problems:

1. In the IN message exists the following curious header:

HEADER NAME:


Hello World


2. The original message body of the IN message is empty when processed by
following processor's,
 perhaps the stream cache is not reseted?

I have also added this as comment to the jira
-- 
View this message in context: 
http://www.nabble.com/Jetty-component-and-HTTP-parameter-tp24287116p24423903.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Jetty component and HTTP parameter

2009-07-10 Thread SwenVogel

I have tested the feature with apache-camel-2.0-SNAPSHOT.zip (Thu Jul 09
17:35:12 GMT+00:00 2009)
and send a very simple XML file as request body:



Hello World


And i encountered two problems:

1. In the IN message exists the following curious header:

HEADER NAME:


Hello World


2. The original message body of the IN message is empty when processed by
following processor's,
 perhaps the stream cache is not reseted?

I have also added this as comment to the jira
-- 
View this message in context: 
http://www.nabble.com/Jetty-component-and-HTTP-parameter-tp24287116p24423918.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Retrying queue

2009-07-10 Thread Leen Toelen
Hi,
I would like to use an synchronous queueing mechanism, where the processing
(posting to an HTTP endpoint) is retried muliple times on failure. The retry
schedule schould be manageable so the retry timer increments and in the end
a warning is provided, much like most email servers work. The queue should
work reliably, and be as simple as possible (journal backend, no remoting,
no management). The activemq journal component comes close, but I don't know
if an endpoint can resubmit failed messages for later processing.
Does camel have such a component (or combination of components)?

Regards,
Leen Toelen


Re: Jetty component and HTTP parameter

2009-07-10 Thread Willem Jiang

Hi,

Did you set the content-type to be "application/x-www-form-urlencoded" ?
If so , camel-http will try to build the parameter map with the message 
body which you post to service endpoint.


Willem

SwenVogel wrote:

I have tested the feature with apache-camel-2.0-SNAPSHOT.zip (Thu Jul 09
17:35:12 GMT+00:00 2009)
and send a very simple XML file as request body:



Hello World


And i encountered two problems:

1. In the IN message exists the following curious header:

HEADER NAME:


Hello World


2. The original message body of the IN message is empty when processed by
following processor's,
 perhaps the stream cache is not reseted?

I have also added this as comment to the jira




Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread chu_man_fu

I have Camel working great in ActiveMQ intergated into JBoss but only by
modifying my activemq.xml file: 

   http://activemq.apache.org/camel/schema/spring";> 
my.package.name 
 
 
  
 
 
 
 
   
 
 
 
   
 
 

How do I get camel to use package: my.package.name? 
I have created a package which that name but I don't know where to put it or
how I tell camel to look at it. I am not sure where the camel context is
started, I am guess via the ActiveMQComponent bean. 


-- 
View this message in context: 
http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24424870.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Retrying queue

2009-07-10 Thread Leen Toelen
Hi,
thanks a lot for the very detailed feedback. I'll give it a try.

Regards,
Leen

On Fri, Jul 10, 2009 at 12:42 PM, Claus Ibsen  wrote:

> On Fri, Jul 10, 2009 at 11:19 AM, Leen Toelen wrote:
> > Hi,
> > I would like to use an synchronous queueing mechanism, where the
> processing
> > (posting to an HTTP endpoint) is retried muliple times on failure. The
> retry
> > schedule schould be manageable so the retry timer increments and in the
> end
> > a warning is provided, much like most email servers work. The queue
> should
> > work reliably, and be as simple as possible (journal backend, no
> remoting,
> > no management). The activemq journal component comes close, but I don't
> know
> > if an endpoint can resubmit failed messages for later processing.
> > Does camel have such a component (or combination of components)?
> >
> Hi
>
> Welcome to the Camel community.
>
> You can use ActiveMQ for the queue and use persistent queues. Then
> your messages will not get lost.
>
> Then what is left is to route from the queue to the http endpoint.
> You can use Camel for this - in fact Camel is provided out of the box
> in ActiveMQ.
>
> A route could be as simple as this
>
> 
>  
>  http://someserver.com/somepath"/>
> 
>
> Then what you need as well is to have the redelivery support. For that
> we can use transaction and let ActiveMQ handle the redelivery policy.
> So the route needs to be configured for transaction, so we enable
> transacted=true on the activemq endpoint.
>
> 
>  
>  http://someserver.com/somepath"/>
> 
>
> Then you need to setup Spring JMS transaction manager to use transaction.
> Details here:
> http://camel.apache.org/transactional-client.html
>
>
>  class="org.springframework.jms.connection.JmsTransactionManager">
>
>  
>
>   class="org.apache.activemq.ActiveMQConnectionFactory">
>
>  
>
>
> And last you need to configure the redelivery policy of AcitveMQ to
> your likening
> http://activemq.apache.org/redelivery-policy.html
>
>
> As its ActiveMQ handling to "failed" message it will move it to a dead
> letter queue inside activemq.
> A little detail here:
> http://activemq.apache.org/message-redelivery-and-dlq-handling.html
>
>
>
> > Regards,
> > Leen Toelen
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>


Re: Camel based Polling Provider for HTTP with XML payloads

2009-07-10 Thread Claus Ibsen
On Fri, Jul 10, 2009 at 9:42 AM, huntc wrote:
>
> I've just posted some code re. how to implement an HTTP based polling
> provider for XML objects using Camel. I hope this forum finds it useful
> (feedback is of course welcome!).
>
> http://christopherhunt-software.blogspot.com/2009/07/camel-based-xml-payload-http-polling.html
Hi Christopher

Another great blog post.
I have added a link to it on the articles page


> --
> View this message in context: 
> http://www.nabble.com/Camel-based-Polling-Provider-for-HTTP-with-XML-payloads-tp24423099p24423099.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Retrying queue

2009-07-10 Thread Claus Ibsen
On Fri, Jul 10, 2009 at 12:51 PM, Leen Toelen wrote:
> Hi,
> thanks a lot for the very detailed feedback. I'll give it a try.
>

The last bit, the warning. What kind of warning do you have in mind?

BTW: Camel itself can also handle redelivery and do all sorts of
tricks in relation to this.
See general error handling with Camel here:

http://camel.apache.org/error-handling-in-camel.html

But since you use JMS it comes with build in error handling already.
But imagine you do file based routing, then Camel can handle the
redelivery attempts and do incremental delays. And in case of still
failure you can route the message to another endpoint, or even another
route of choice. And also eg send an email in case of failure or
whatnot.



> Regards,
> Leen
>
> On Fri, Jul 10, 2009 at 12:42 PM, Claus Ibsen  wrote:
>
>> On Fri, Jul 10, 2009 at 11:19 AM, Leen Toelen wrote:
>> > Hi,
>> > I would like to use an synchronous queueing mechanism, where the
>> processing
>> > (posting to an HTTP endpoint) is retried muliple times on failure. The
>> retry
>> > schedule schould be manageable so the retry timer increments and in the
>> end
>> > a warning is provided, much like most email servers work. The queue
>> should
>> > work reliably, and be as simple as possible (journal backend, no
>> remoting,
>> > no management). The activemq journal component comes close, but I don't
>> know
>> > if an endpoint can resubmit failed messages for later processing.
>> > Does camel have such a component (or combination of components)?
>> >
>> Hi
>>
>> Welcome to the Camel community.
>>
>> You can use ActiveMQ for the queue and use persistent queues. Then
>> your messages will not get lost.
>>
>> Then what is left is to route from the queue to the http endpoint.
>> You can use Camel for this - in fact Camel is provided out of the box
>> in ActiveMQ.
>>
>> A route could be as simple as this
>>
>> 
>>  
>>  http://someserver.com/somepath"/>
>> 
>>
>> Then what you need as well is to have the redelivery support. For that
>> we can use transaction and let ActiveMQ handle the redelivery policy.
>> So the route needs to be configured for transaction, so we enable
>> transacted=true on the activemq endpoint.
>>
>> 
>>  
>>  http://someserver.com/somepath"/>
>> 
>>
>> Then you need to setup Spring JMS transaction manager to use transaction.
>> Details here:
>> http://camel.apache.org/transactional-client.html
>>
>>
>> > class="org.springframework.jms.connection.JmsTransactionManager">
>>    
>>  
>>
>>  > class="org.apache.activemq.ActiveMQConnectionFactory">
>>    
>>  
>>
>>
>> And last you need to configure the redelivery policy of AcitveMQ to
>> your likening
>> http://activemq.apache.org/redelivery-policy.html
>>
>>
>> As its ActiveMQ handling to "failed" message it will move it to a dead
>> letter queue inside activemq.
>> A little detail here:
>> http://activemq.apache.org/message-redelivery-and-dlq-handling.html
>>
>>
>>
>> > Regards,
>> > Leen Toelen
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread chu_man_fu

I have routing configured via XML working with no problems.
It's the  part I want to get working but I don't know where to put
my classes/package.

I have looked at apache-camel-jboss-5-spring but I don't understand how to
get it to work. Are there any examples of this on the net which I could
learn from?

I have just created a MBean which lets me stop and start a Camel context
which connects to my ActiveMQ broker.
What I want to achieve is being able to add routing on the fly without
causing too much disruption.


Claus Ibsen-2 wrote:
> 
> Hi
> 
> The package scan uses class loading and classloaders in J2EE servers
> is "a nightmare".
> 
> There have been some JBoss people creating a Camel plugin that allows
> it to use JBoss specific classloading.
> http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/
> 
> So I guess its the problem.
> 
> You cold try without the  and see if Camel can be loaded in
> jboss and do a basic routing
> 
> 
>
> 
> 
> 
> 
> 
> On Fri, Jul 10, 2009 at 12:19 PM, chu_man_fu wrote:
>>
>> I have Camel working great in ActiveMQ intergated into JBoss but only by
>> modifying my activemq.xml file:
>>
>>   > xmlns="http://activemq.apache.org/camel/schema/spring";>
>>        my.package.name
>>        
>>        
>>             
>>        
>>    
>>    > class="org.apache.activemq.camel.component.ActiveMQComponent" >
>>        
>>          
>>            > value="vm://localhost?create=false&waitForStart=1" />
>>            
>>            
>>          
>>        
>>    
>>
>> How do I get camel to use package: my.package.name?
>> I have created a package which that name but I don't know where to put it
>> or
>> how I tell camel to look at it. I am not sure where the camel context is
>> started, I am guess via the ActiveMQComponent bean.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24424870.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24425350.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread Claus Ibsen
On Fri, Jul 10, 2009 at 1:00 PM, chu_man_fu wrote:
>
> I have routing configured via XML working with no problems.
> It's the  part I want to get working but I don't know where to put
> my classes/package.

Do you deploy your application as a WAR file in JBoss? If so just put
your classes in WEB-INF/classes



>
> I have looked at apache-camel-jboss-5-spring but I don't understand how to
> get it to work. Are there any examples of this on the net which I could
> learn from?
>
> I have just created a MBean which lets me stop and start a Camel context
> which connects to my ActiveMQ broker.
> What I want to achieve is being able to add routing on the fly without
> causing too much disruption.
>

Yeah. Well you could just deploy routes as WAR files and do redloyments.
eg every route / application as a separate WAR file.

In Camel 2.x the dynamic modification of routing will be improved.
There is a Camel web console that will be improved over time where you
can modify a route at runtime
http://camel.apache.org/web-console.html

Currently there is a Google Summer of school project in which a person
is adding groovy editing capabilities to this editor.
Still work in progress.

And the JMX side will be improved as well in 2.x. At first management
and monitoring though.



>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> The package scan uses class loading and classloaders in J2EE servers
>> is "a nightmare".
>>
>> There have been some JBoss people creating a Camel plugin that allows
>> it to use JBoss specific classloading.
>> http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/
>>
>> So I guess its the problem.
>>
>> You cold try without the  and see if Camel can be loaded in
>> jboss and do a basic routing
>>
>> 
>>    
>>     
>> 
>>
>>
>>
>> On Fri, Jul 10, 2009 at 12:19 PM, chu_man_fu wrote:
>>>
>>> I have Camel working great in ActiveMQ intergated into JBoss but only by
>>> modifying my activemq.xml file:
>>>
>>>   >> xmlns="http://activemq.apache.org/camel/schema/spring";>
>>>        my.package.name
>>>        
>>>        
>>>             
>>>        
>>>    
>>>    >> class="org.apache.activemq.camel.component.ActiveMQComponent" >
>>>        
>>>          
>>>            >> value="vm://localhost?create=false&waitForStart=1" />
>>>            
>>>            
>>>          
>>>        
>>>    
>>>
>>> How do I get camel to use package: my.package.name?
>>> I have created a package which that name but I don't know where to put it
>>> or
>>> how I tell camel to look at it. I am not sure where the camel context is
>>> started, I am guess via the ActiveMQComponent bean.
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24424870.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24425350.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Faster!!

2009-07-10 Thread Claus Ibsen
This discussion about IN, OUT, FAULT is moved to the topic we current
have on the dev forum.

This topic should be used for performance talk.


On Thu, Jul 9, 2009 at 7:44 PM, Claus Ibsen wrote:
> On Thu, Jul 9, 2009 at 4:50 PM, Hadrian Zbarcea wrote:
>> I hardly see a reason for the IN message to be mutable.  Shouldn't it be
>> read-only to start with?
>> In my mind the IN is what you've been told, it's history, cannot be changed.
>>  If you want to echo something slightly different, you can always produce
>> the OUT you want (modified copy of the IN).
>
> That doesnt really work with the message exchange patterns. If you
> send in an InOnly and do some processing steps on the exchange, you
> can still mutate the IN message.
>
> If it was a InOut then you could advocate that IN is the original IN
> and cant mutate. And that you should alter the OUT. But then you
> cannot reuse the same processors as from InOnly.
>
>
> I cannot a this time of the hours see a good and concise model for
> this. The current behavior is the best we got at this time.
>
>
>
>
>>
>> +1 on both counts.  Properties are used in quite a few places now though,
>> mostly for components that use bindings, like Jms, File, Mail, etc.  However
>> I don't think copying properties is very expensive, plus we could optimize
>> that a bit in 2.x.
>>
>> Hadrian
>>
>> On Jul 9, 2009, at 6:35 AM, James Strachan wrote:
>>
>>> 2009/7/9 Claus Ibsen :

 Hi

 See this wiki page for ideas on performance optimizations
 http://camel.apache.org/camel-2x-speed-optimizations.html
>>>
>>> Copying Messages seems to be the big cost (particularly all those headers
>>> etc).
>>>
>>> I wonder if we should use in the Pipeline a ReadOnlyMessageFacade
>>> which prevents mutation of the underlying message, so the same Message
>>> can be reused (no need to make defensive copies first) and can be
>>> passed into next steps in the chain if an OUT message is not created?
>>>
>>> I'm also wondering how often we really use Exchange properties; seems
>>> we mostly use message headers; in which case creating new Exchange
>>> instances should be quite cheap - as we can just pass the IN by value
>>> each time?
>>>
>>> --
>>> James
>>> ---
>>> http://macstrac.blogspot.com/
>>>
>>> Open Source Integration
>>> http://fusesource.com/
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Retrying queue

2009-07-10 Thread Claus Ibsen
On Fri, Jul 10, 2009 at 11:19 AM, Leen Toelen wrote:
> Hi,
> I would like to use an synchronous queueing mechanism, where the processing
> (posting to an HTTP endpoint) is retried muliple times on failure. The retry
> schedule schould be manageable so the retry timer increments and in the end
> a warning is provided, much like most email servers work. The queue should
> work reliably, and be as simple as possible (journal backend, no remoting,
> no management). The activemq journal component comes close, but I don't know
> if an endpoint can resubmit failed messages for later processing.
> Does camel have such a component (or combination of components)?
>
Hi

Welcome to the Camel community.

You can use ActiveMQ for the queue and use persistent queues. Then
your messages will not get lost.

Then what is left is to route from the queue to the http endpoint.
You can use Camel for this - in fact Camel is provided out of the box
in ActiveMQ.

A route could be as simple as this


  
  http://someserver.com/somepath"/>


Then what you need as well is to have the redelivery support. For that
we can use transaction and let ActiveMQ handle the redelivery policy.
So the route needs to be configured for transaction, so we enable
transacted=true on the activemq endpoint.


  
  http://someserver.com/somepath"/>


Then you need to setup Spring JMS transaction manager to use transaction.
Details here:
http://camel.apache.org/transactional-client.html




  

  

  


And last you need to configure the redelivery policy of AcitveMQ to
your likening
http://activemq.apache.org/redelivery-policy.html


As its ActiveMQ handling to "failed" message it will move it to a dead
letter queue inside activemq.
A little detail here:
http://activemq.apache.org/message-redelivery-and-dlq-handling.html



> Regards,
> Leen Toelen
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread Claus Ibsen
Hi

The package scan uses class loading and classloaders in J2EE servers
is "a nightmare".

There have been some JBoss people creating a Camel plugin that allows
it to use JBoss specific classloading.
http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/

So I guess its the problem.

You cold try without the  and see if Camel can be loaded in
jboss and do a basic routing


   





On Fri, Jul 10, 2009 at 12:19 PM, chu_man_fu wrote:
>
> I have Camel working great in ActiveMQ intergated into JBoss but only by
> modifying my activemq.xml file:
>
>    xmlns="http://activemq.apache.org/camel/schema/spring";>
>        my.package.name
>        
>        
>             
>        
>    
>     class="org.apache.activemq.camel.component.ActiveMQComponent" >
>        
>          
>             value="vm://localhost?create=false&waitForStart=1" />
>            
>            
>          
>        
>    
>
> How do I get camel to use package: my.package.name?
> I have created a package which that name but I don't know where to put it or
> how I tell camel to look at it. I am not sure where the camel context is
> started, I am guess via the ActiveMQComponent bean.
>
>
> --
> View this message in context: 
> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24424870.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread chu_man_fu

I have added my route builder to the classes directory but I now get this
error:

 ERROR [0]] Exception sending context initialized event to listener instance
of class org.apache.activemq.web.WebConsoleStarter
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionPool' defined in ServletContext resource
[/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to bean
'connectionFactory' while setting bean property 'connectionFactory'; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'connectionFactory' defined in ServletContext
resource [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to
bean 'brokerURL' while setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'brokerService' defined in ServletContext resource
[/WEB-INF/webconsole-embedded.xml]: Invocation of init method failed; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'camel:beanPostProcessor': Cannot resolve reference
to bean 'camel' while setting bean property 'camelContext'; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'camel': Invocation of init method failed; nested exception
is java.lang.NoSuchMethodError:
my.package.name.MyRoute.from(Ljava/lang/String;)Lorg/apache/camel/model/RouteDefinition;

My code is:

package my.package.name;

import org.apache.camel.builder.RouteBuilder;

public class MyRoute extends RouteBuilder
{

@Override
public void configure() throws Exception
{

from("activemq:queue.1").to("activemq:queue.2");
}

}

I have camel-core-1.5.0.jar and activemq-camel-5.2.0.jar in my WAR's lib
folder.
What am I missing?


Claus Ibsen-2 wrote:
> 
> On Fri, Jul 10, 2009 at 1:00 PM, chu_man_fu wrote:
>>
>> I have routing configured via XML working with no problems.
>> It's the  part I want to get working but I don't know where to
>> put
>> my classes/package.
> 
> Do you deploy your application as a WAR file in JBoss? If so just put
> your classes in WEB-INF/classes
> 
> 
> 
>>
>> I have looked at apache-camel-jboss-5-spring but I don't understand how
>> to
>> get it to work. Are there any examples of this on the net which I could
>> learn from?
>>
>> I have just created a MBean which lets me stop and start a Camel context
>> which connects to my ActiveMQ broker.
>> What I want to achieve is being able to add routing on the fly without
>> causing too much disruption.
>>
> 
> Yeah. Well you could just deploy routes as WAR files and do redloyments.
> eg every route / application as a separate WAR file.
> 
> In Camel 2.x the dynamic modification of routing will be improved.
> There is a Camel web console that will be improved over time where you
> can modify a route at runtime
> http://camel.apache.org/web-console.html
> 
> Currently there is a Google Summer of school project in which a person
> is adding groovy editing capabilities to this editor.
> Still work in progress.
> 
> And the JMX side will be improved as well in 2.x. At first management
> and monitoring though.
> 
> 
> 
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> The package scan uses class loading and classloaders in J2EE servers
>>> is "a nightmare".
>>>
>>> There have been some JBoss people creating a Camel plugin that allows
>>> it to use JBoss specific classloading.
>>> http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/
>>>
>>> So I guess its the problem.
>>>
>>> You cold try without the  and see if Camel can be loaded in
>>> jboss and do a basic routing
>>>
>>> 
>>>    
>>>     
>>> 
>>>
>>>
>>>
>>> On Fri, Jul 10, 2009 at 12:19 PM, chu_man_fu wrote:

 I have Camel working great in ActiveMQ intergated into JBoss but only
 by
 modifying my activemq.xml file:

   >>> xmlns="http://activemq.apache.org/camel/schema/spring";>
        my.package.name
        
        
             
        
    
    >>> class="org.apache.activemq.camel.component.ActiveMQComponent" >
        
          
            >>> value="vm://localhost?create=false&waitForStart=1" />
            
            
          
        
    

 How do I get camel to use package: my.package.name?
 I have created a package which that name but I don't know where to put
 it
 or
 how I tell camel to look at it. I am not sure where the camel context
 is
 started, I am guess via the ActiveMQComponent bean.


 --
 View this message in context:
 http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24424870.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> 

Re: Have anybody here tried the tutorial-osgi-camel-part2?

2009-07-10 Thread Charles Moulliard
Hi Kevin,

I have done a full installation and everything works fine. I have done some
modifications (see remarks here after)

1) I have slightly modified the pom files to facilitate the maven build.
Please have a look on the web site - wiki page of my tutorial
2) The features to be installed have been modified for Camel 2.0-M1 -->
2.0-M2 and Spring OSGI because the release used by SMX4 1.1. is 1.2.0-m2
3) Startup.property file must be modified to use the cglib version 2.1_3_2:
org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/2.1_3_2-SNAPSHOT/org.apache.servicemix.bundles.cglib-2.1_3_2-SNAPSHOT.jar=30
YOU HAVE ALSO TO COPY THE JAR INTO system folder

Otherwise, I can zip the server and send it to you configured. I know this
is difficult to install all the stuffs the first time and particularly in
the current context because the project Apache ServiceMix kernel has moved
to Apache Felix Karaf and no official build is available for the moment. You
have to build it.

Regards,

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com


On Thu, Jul 9, 2009 at 9:07 AM, Kevin.Zhang wrote:

>
> Still cannot make it work. I might have to give up. If anybody can make it
> work, please let me know.
>
> Charles, thank you so much for your help. If you have time, I would suggest
> you to retest it on a clean machine which has no mvn, servicemix and other
> modules installed. This tutorial is a great tutorial and I wish people
> could
> be benefited from it.
>
> -Kevin
>
>
> cmoulliard wrote:
> >
> > Error appears in your copy/paste
> >
> > mvn:org.antlr/com.springsource.antlr/2.7
> > .7
> >
> > You can't install a required bundle of Hibernate wich is antlr.
> >
> > I work on Windows XP
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *
> > blog : http://cmoulliard.blogspot.com
> >
> >
> > On Wed, Jul 8, 2009 at 5:47 PM, Kevin.Zhang
> > wrote:
> >
> >>
> >> Hi Charles,
> >>
> >> I installed
> >>
> >>
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6_2-SNAPSHOT.
> >> After that I restarted servicemix. But I still have the same problem.
> >>
> >> Command osgi/list can show the new installed dom4j.
> >>
> >>[ 119] [Active ] [   ] [   60] Apache ServiceMix Bundles:
> >> dom4j-1.6 (1.6.0.SNAPSHOT)
> >>
> >> The features list command shows:
> >>
> >>[uninstalled]  [  0.0.0] hibernate
> >>[uninstalled]  [  0.0.0] camel-velocity
> >>[installed  ]  [  0.0.0] web-core
> >>[installed  ]  [   2.2] cxf
> >>[installed  ]  [  0.0.0] common
> >>[installed  ]  [  0.0.0] transaction
> >>[installed  ]  [  0.0.0] camel-activemq
> >>[installed  ]  [  0.0.0] web
> >>[uninstalled]  [   1.0] reportincident
> >>[uninstalled]  [  0.0.0] camel-mail
> >>[installed  ]  [  0.0.0] cxf-osgi
> >>[uninstalled]  [  0.0.0] spring-web
> >>[installed  ]  [  0.0.0] camel-spring
> >>[installed  ]  [   2.0-M1] camel
> >>[installed  ]  [  0.0.0] camel-core
> >>[installed  ]  [  0.0.0] camel-bindy
> >>[installed  ]  [  5.2.0] activemq
> >>[installed  ]  [  0.0.0] connector
> >>[installed  ]  [  0.0.0] camel-osgi
> >>[installed  ]  [  0.0.0] wicket
> >>[uninstalled]  [  0.0.0] jdbc-driver
> >>[installed  ]  [  0.0.0] camel-jms
> >>[installed  ]  [  0.0.0] camel-cxf
> >>
> >> I tried to use features installed command "install hibernate". It gave
> me
> >> error:
> >>
> >>
> >> s...@root:features> install hibernate
> >> ERROR CommandLineExecutionFailed:
> >> org.apache.geronimo.gshell.command.CommandException:
> >> java.lang.RuntimeException: URL
> [mvn:org.antlr/com.springsource.antlr/2.7
> >> .7] could not be resolved. (enable TRACE logging for details)
> >>
> >>
> >> I'm using windows. Charles, what's your dev environment?
> >>
> >> Thanks a lot,
> >> Kevin
> >>
> >>
> >> cmoulliard wrote:
> >> >
> >> > Hi Kevin,
> >> >
> >> > Can you check if you can install manually dom4j jar :
> >> >
> >> > Here is the command to be used in osgi
> >> >
> >> > install - s
> >> >
> >>
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6_2-SNAPSHOT
> >> >
> >> > If this command does not work, check in the following file
> >> > etc/org.ops4j.pax.url.mvn.cfg  that you point to your settings.xml
> file
> >> > configured for your local maven repository :
> >> >
> >> > org.ops4j.pax.url.mvn.settings=C:/Documents and
> >> > Settings/chzhang/.m2/settings.xml
> >> >
> >> > next try to reinstall or use features command
> >> >
> >> > Regards,
> >> >
> >> > Charles Moulliard
> >> > Senior Enterprise Architect
> >> > Apache Camel Committer
> >> >
> >> > *
> >> > blog : http://cmoulliard.blogspot.com
> >> >
> >> >
> >>
> >> --
> >> Vie

Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread Claus Ibsen
On Fri, Jul 10, 2009 at 3:58 PM, chu_man_fu wrote:
>
> I have added my route builder to the classes directory but I now get this
> error:
>
>  ERROR [0]] Exception sending context initialized event to listener instance
> of class org.apache.activemq.web.WebConsoleStarter
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'sessionPool' defined in ServletContext resource
> [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to bean
> 'connectionFactory' while setting bean property 'connectionFactory'; nested
> exception is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'connectionFactory' defined in ServletContext
> resource [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to
> bean 'brokerURL' while setting constructor argument; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'brokerService' defined in ServletContext resource
> [/WEB-INF/webconsole-embedded.xml]: Invocation of init method failed; nested
> exception is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'camel:beanPostProcessor': Cannot resolve reference
> to bean 'camel' while setting bean property 'camelContext'; nested exception
> is org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'camel': Invocation of init method failed; nested exception
> is java.lang.NoSuchMethodError:
> my.package.name.MyRoute.from(Ljava/lang/String;)Lorg/apache/camel/model/RouteDefinition;
You must have mixed .jars. RouteDefinition is a Camel 2.0 name only.
Double check that you only use Camel 1.5.0 jars


>
> My code is:
>
> package my.package.name;
>
> import org.apache.camel.builder.RouteBuilder;
>
> public class MyRoute extends RouteBuilder
> {
>
>       �...@override
>    public void configure() throws Exception
>    {
>
>                from("activemq:queue.1").to("activemq:queue.2");
>    }
>
> }
>
> I have camel-core-1.5.0.jar and activemq-camel-5.2.0.jar in my WAR's lib
> folder.
> What am I missing?
>
>
> Claus Ibsen-2 wrote:
>>
>> On Fri, Jul 10, 2009 at 1:00 PM, chu_man_fu wrote:
>>>
>>> I have routing configured via XML working with no problems.
>>> It's the  part I want to get working but I don't know where to
>>> put
>>> my classes/package.
>>
>> Do you deploy your application as a WAR file in JBoss? If so just put
>> your classes in WEB-INF/classes
>>
>>
>>
>>>
>>> I have looked at apache-camel-jboss-5-spring but I don't understand how
>>> to
>>> get it to work. Are there any examples of this on the net which I could
>>> learn from?
>>>
>>> I have just created a MBean which lets me stop and start a Camel context
>>> which connects to my ActiveMQ broker.
>>> What I want to achieve is being able to add routing on the fly without
>>> causing too much disruption.
>>>
>>
>> Yeah. Well you could just deploy routes as WAR files and do redloyments.
>> eg every route / application as a separate WAR file.
>>
>> In Camel 2.x the dynamic modification of routing will be improved.
>> There is a Camel web console that will be improved over time where you
>> can modify a route at runtime
>> http://camel.apache.org/web-console.html
>>
>> Currently there is a Google Summer of school project in which a person
>> is adding groovy editing capabilities to this editor.
>> Still work in progress.
>>
>> And the JMX side will be improved as well in 2.x. At first management
>> and monitoring though.
>>
>>
>>
>>>
>>> Claus Ibsen-2 wrote:

 Hi

 The package scan uses class loading and classloaders in J2EE servers
 is "a nightmare".

 There have been some JBoss people creating a Camel plugin that allows
 it to use JBoss specific classloading.
 http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/

 So I guess its the problem.

 You cold try without the  and see if Camel can be loaded in
 jboss and do a basic routing

 
    
     
 



 On Fri, Jul 10, 2009 at 12:19 PM, chu_man_fu wrote:
>
> I have Camel working great in ActiveMQ intergated into JBoss but only
> by
> modifying my activemq.xml file:
>
>    xmlns="http://activemq.apache.org/camel/schema/spring";>
>        my.package.name
>        
>        
>             
>        
>    
>     class="org.apache.activemq.camel.component.ActiveMQComponent" >
>        
>          
>             value="vm://localhost?create=false&waitForStart=1" />
>            
>            
>          
>        
>    
>
> How do I get camel to use package: my.package.name?
> I have created a package which that name but I don't know where to put
> it
> or
> how I tell camel to look at it. I am not sure where the camel context
> is
> started, I am guess via the ActiveMQCompon

Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread chu_man_fu

The jars I have are those which are included in
activemq-web-console-5.2.0.war:

activeio-core-3.1.0.jar
activemq-camel-5.2.0.jar
activemq-console-5.2.0.jar
activemq-core-5.2.0.jar
activemq-pool-5.2.0.jar
activemq-web-5.2.0.jar
activemq-xmpp-5.2.0.jar
aopalliance-1.0.jar
backport-util-concurrent-2.1.jar
camel-core-1.5.0.jar
camel-jms-1.5.0.jar
camel-spring-1.5.0.jar
commons-logging-1.1.jar
commons-logging-api-1.1.jar
commons-pool-1.4.jar
derby-10.1.3.1.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
geronimo-jacc_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
jaxb-api-2.0.jar
jaxb-impl-2.0.3.jar
jdom-1.0.jar
log4j-1.2.14.jar
rome-0.8.jar
sitemesh-2.2.1.jar
slf4j-api-1.5.0.jar
slf4j-log4j12-1.5.0.jar
smackx-1.5.0.jar
spring-aop-2.5.5.jar
spring-beans-2.5.5.jar
spring-context-2.5.5.jar
spring-context-support-2.5.5.jar
spring-core-2.5.5.jar
spring-jms-2.5.5.jar
spring-tx-2.5.5.jar
spring-web-2.5.5.jar
spring-webmvc-2.5.5.jar
wstx-asl-3.0.1.jar
xbean-spring-3.4.jar
xmlpull-1.1.3.4d_b4_min.jar
xpp3_min-1.1.4c.jar
xstream-1.3.jar

If there is something with these jars how come the context which I include
in the activemq.xml file work?


Claus Ibsen-2 wrote:
> 
> On Fri, Jul 10, 2009 at 3:58 PM, chu_man_fu wrote:
>>
>> I have added my route builder to the classes directory but I now get this
>> error:
>>
>>  ERROR [0]] Exception sending context initialized event to listener
>> instance
>> of class org.apache.activemq.web.WebConsoleStarter
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'sessionPool' defined in ServletContext resource
>> [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to bean
>> 'connectionFactory' while setting bean property 'connectionFactory';
>> nested
>> exception is org.springframework.beans.factory.BeanCreationException:
>> Error
>> creating bean with name 'connectionFactory' defined in ServletContext
>> resource [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to
>> bean 'brokerURL' while setting constructor argument; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'brokerService' defined in ServletContext resource
>> [/WEB-INF/webconsole-embedded.xml]: Invocation of init method failed;
>> nested
>> exception is org.springframework.beans.factory.BeanCreationException:
>> Error
>> creating bean with name 'camel:beanPostProcessor': Cannot resolve
>> reference
>> to bean 'camel' while setting bean property 'camelContext'; nested
>> exception
>> is org.springframework.beans.factory.BeanCreationException: Error
>> creating
>> bean with name 'camel': Invocation of init method failed; nested
>> exception
>> is java.lang.NoSuchMethodError:
>> my.package.name.MyRoute.from(Ljava/lang/String;)Lorg/apache/camel/model/RouteDefinition;
> You must have mixed .jars. RouteDefinition is a Camel 2.0 name only.
> Double check that you only use Camel 1.5.0 jars
> 
> 
>>
>> My code is:
>>
>> package my.package.name;
>>
>> import org.apache.camel.builder.RouteBuilder;
>>
>> public class MyRoute extends RouteBuilder
>> {
>>
>>       �...@override
>>    public void configure() throws Exception
>>    {
>>
>>                from("activemq:queue.1").to("activemq:queue.2");
>>    }
>>
>> }
>>
>> I have camel-core-1.5.0.jar and activemq-camel-5.2.0.jar in my WAR's lib
>> folder.
>> What am I missing?
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> On Fri, Jul 10, 2009 at 1:00 PM, chu_man_fu wrote:

 I have routing configured via XML working with no problems.
 It's the  part I want to get working but I don't know where to
 put
 my classes/package.
>>>
>>> Do you deploy your application as a WAR file in JBoss? If so just put
>>> your classes in WEB-INF/classes
>>>
>>>
>>>

 I have looked at apache-camel-jboss-5-spring but I don't understand how
 to
 get it to work. Are there any examples of this on the net which I could
 learn from?

 I have just created a MBean which lets me stop and start a Camel
 context
 which connects to my ActiveMQ broker.
 What I want to achieve is being able to add routing on the fly without
 causing too much disruption.

>>>
>>> Yeah. Well you could just deploy routes as WAR files and do redloyments.
>>> eg every route / application as a separate WAR file.
>>>
>>> In Camel 2.x the dynamic modification of routing will be improved.
>>> There is a Camel web console that will be improved over time where you
>>> can modify a route at runtime
>>> http://camel.apache.org/web-console.html
>>>
>>> Currently there is a Google Summer of school project in which a person
>>> is adding groovy editing capabilities to this editor.
>>> Still work in progress.
>>>
>>> And the JMX side will be improved as well in 2.x. At first management
>>> and monitoring though.
>>>
>>>
>>>

Re: Have anybody here tried the tutorial-osgi-camel-part2?

2009-07-10 Thread Kevin.Zhang

Hi Charles,

Could you please update the tutorial-osgi-camel-part2.zip in the tutorial
page to reflect your latest changes? Please also send me the server zip so
that I can have a good start point. 

Best,
Kevin



cmoulliard wrote:
> 
> Hi Kevin,
> 
> I have done a full installation and everything works fine. I have done
> some
> modifications (see remarks here after)
> 
> 1) I have slightly modified the pom files to facilitate the maven build.
> Please have a look on the web site - wiki page of my tutorial
> 2) The features to be installed have been modified for Camel 2.0-M1 -->
> 2.0-M2 and Spring OSGI because the release used by SMX4 1.1. is 1.2.0-m2
> 3) Startup.property file must be modified to use the cglib version
> 2.1_3_2:
> org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/2.1_3_2-SNAPSHOT/org.apache.servicemix.bundles.cglib-2.1_3_2-SNAPSHOT.jar=30
> YOU HAVE ALSO TO COPY THE JAR INTO system folder
> 
> Otherwise, I can zip the server and send it to you configured. I know this
> is difficult to install all the stuffs the first time and particularly in
> the current context because the project Apache ServiceMix kernel has moved
> to Apache Felix Karaf and no official build is available for the moment.
> You
> have to build it.
> 
> Regards,
> 
> Regards,
> 
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
> 
> *
> blog : http://cmoulliard.blogspot.com
> 
> 
> On Thu, Jul 9, 2009 at 9:07 AM, Kevin.Zhang
> wrote:
> 
>>
>> Still cannot make it work. I might have to give up. If anybody can make
>> it
>> work, please let me know.
>>
>> Charles, thank you so much for your help. If you have time, I would
>> suggest
>> you to retest it on a clean machine which has no mvn, servicemix and
>> other
>> modules installed. This tutorial is a great tutorial and I wish people
>> could
>> be benefited from it.
>>
>> -Kevin
>>
>>
>> cmoulliard wrote:
>> >
>> > Error appears in your copy/paste
>> >
>> > mvn:org.antlr/com.springsource.antlr/2.7
>> > .7
>> >
>> > You can't install a required bundle of Hibernate wich is antlr.
>> >
>> > I work on Windows XP
>> >
>> > Charles Moulliard
>> > Senior Enterprise Architect
>> > Apache Camel Committer
>> >
>> > *
>> > blog : http://cmoulliard.blogspot.com
>> >
>> >
>> > On Wed, Jul 8, 2009 at 5:47 PM, Kevin.Zhang
>> > wrote:
>> >
>> >>
>> >> Hi Charles,
>> >>
>> >> I installed
>> >>
>> >>
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6_2-SNAPSHOT.
>> >> After that I restarted servicemix. But I still have the same problem.
>> >>
>> >> Command osgi/list can show the new installed dom4j.
>> >>
>> >>[ 119] [Active ] [   ] [   60] Apache ServiceMix Bundles:
>> >> dom4j-1.6 (1.6.0.SNAPSHOT)
>> >>
>> >> The features list command shows:
>> >>
>> >>[uninstalled]  [  0.0.0] hibernate
>> >>[uninstalled]  [  0.0.0] camel-velocity
>> >>[installed  ]  [  0.0.0] web-core
>> >>[installed  ]  [   2.2] cxf
>> >>[installed  ]  [  0.0.0] common
>> >>[installed  ]  [  0.0.0] transaction
>> >>[installed  ]  [  0.0.0] camel-activemq
>> >>[installed  ]  [  0.0.0] web
>> >>[uninstalled]  [   1.0] reportincident
>> >>[uninstalled]  [  0.0.0] camel-mail
>> >>[installed  ]  [  0.0.0] cxf-osgi
>> >>[uninstalled]  [  0.0.0] spring-web
>> >>[installed  ]  [  0.0.0] camel-spring
>> >>[installed  ]  [   2.0-M1] camel
>> >>[installed  ]  [  0.0.0] camel-core
>> >>[installed  ]  [  0.0.0] camel-bindy
>> >>[installed  ]  [  5.2.0] activemq
>> >>[installed  ]  [  0.0.0] connector
>> >>[installed  ]  [  0.0.0] camel-osgi
>> >>[installed  ]  [  0.0.0] wicket
>> >>[uninstalled]  [  0.0.0] jdbc-driver
>> >>[installed  ]  [  0.0.0] camel-jms
>> >>[installed  ]  [  0.0.0] camel-cxf
>> >>
>> >> I tried to use features installed command "install hibernate". It gave
>> me
>> >> error:
>> >>
>> >>
>> >> s...@root:features> install hibernate
>> >> ERROR CommandLineExecutionFailed:
>> >> org.apache.geronimo.gshell.command.CommandException:
>> >> java.lang.RuntimeException: URL
>> [mvn:org.antlr/com.springsource.antlr/2.7
>> >> .7] could not be resolved. (enable TRACE logging for details)
>> >>
>> >>
>> >> I'm using windows. Charles, what's your dev environment?
>> >>
>> >> Thanks a lot,
>> >> Kevin
>> >>
>> >>
>> >> cmoulliard wrote:
>> >> >
>> >> > Hi Kevin,
>> >> >
>> >> > Can you check if you can install manually dom4j jar :
>> >> >
>> >> > Here is the command to be used in osgi
>> >> >
>> >> > install - s
>> >> >
>> >>
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6_2-SNAPSHOT
>> >> >
>> >> > If this command does not work, check in the following file
>> >> > etc/org.ops4j.pax.url.mvn.cfg  that you point to your settings.xml
>> file
>> >> > configured for your l

Re: Have anybody here tried the tutorial-osgi-camel-part2?

2009-07-10 Thread Charles Moulliard
Hi Kevin,

I have already updated the code of the tutorial on the wiki page. How can I
send to you a zip of 57 Mb ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com


On Fri, Jul 10, 2009 at 5:32 PM, Kevin.Zhang wrote:

>
> Hi Charles,
>
> Could you please update the tutorial-osgi-camel-part2.zip in the tutorial
> page to reflect your latest changes? Please also send me the server zip so
> that I can have a good start point.
>
> Best,
> Kevin
>
>
>
> cmoulliard wrote:
> >
> > Hi Kevin,
> >
> > I have done a full installation and everything works fine. I have done
> > some
> > modifications (see remarks here after)
> >
> > 1) I have slightly modified the pom files to facilitate the maven build.
> > Please have a look on the web site - wiki page of my tutorial
> > 2) The features to be installed have been modified for Camel 2.0-M1 -->
> > 2.0-M2 and Spring OSGI because the release used by SMX4 1.1. is 1.2.0-m2
> > 3) Startup.property file must be modified to use the cglib version
> > 2.1_3_2:
> >
> org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/2.1_3_2-SNAPSHOT/org.apache.servicemix.bundles.cglib-2.1_3_2-SNAPSHOT.jar=30
> > YOU HAVE ALSO TO COPY THE JAR INTO system folder
> >
> > Otherwise, I can zip the server and send it to you configured. I know
> this
> > is difficult to install all the stuffs the first time and particularly in
> > the current context because the project Apache ServiceMix kernel has
> moved
> > to Apache Felix Karaf and no official build is available for the moment.
> > You
> > have to build it.
> >
> > Regards,
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *
> > blog : http://cmoulliard.blogspot.com
> >
> >
> > On Thu, Jul 9, 2009 at 9:07 AM, Kevin.Zhang
> > wrote:
> >
> >>
> >> Still cannot make it work. I might have to give up. If anybody can make
> >> it
> >> work, please let me know.
> >>
> >> Charles, thank you so much for your help. If you have time, I would
> >> suggest
> >> you to retest it on a clean machine which has no mvn, servicemix and
> >> other
> >> modules installed. This tutorial is a great tutorial and I wish people
> >> could
> >> be benefited from it.
> >>
> >> -Kevin
> >>
> >>
> >> cmoulliard wrote:
> >> >
> >> > Error appears in your copy/paste
> >> >
> >> > mvn:org.antlr/com.springsource.antlr/2.7
> >> > .7
> >> >
> >> > You can't install a required bundle of Hibernate wich is antlr.
> >> >
> >> > I work on Windows XP
> >> >
> >> > Charles Moulliard
> >> > Senior Enterprise Architect
> >> > Apache Camel Committer
> >> >
> >> > *
> >> > blog : http://cmoulliard.blogspot.com
> >> >
> >> >
> >> > On Wed, Jul 8, 2009 at 5:47 PM, Kevin.Zhang
> >> > wrote:
> >> >
> >> >>
> >> >> Hi Charles,
> >> >>
> >> >> I installed
> >> >>
> >> >>
> >>
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6_2-SNAPSHOT.
> >> >> After that I restarted servicemix. But I still have the same problem.
> >> >>
> >> >> Command osgi/list can show the new installed dom4j.
> >> >>
> >> >>[ 119] [Active ] [   ] [   60] Apache ServiceMix Bundles:
> >> >> dom4j-1.6 (1.6.0.SNAPSHOT)
> >> >>
> >> >> The features list command shows:
> >> >>
> >> >>[uninstalled]  [  0.0.0] hibernate
> >> >>[uninstalled]  [  0.0.0] camel-velocity
> >> >>[installed  ]  [  0.0.0] web-core
> >> >>[installed  ]  [   2.2] cxf
> >> >>[installed  ]  [  0.0.0] common
> >> >>[installed  ]  [  0.0.0] transaction
> >> >>[installed  ]  [  0.0.0] camel-activemq
> >> >>[installed  ]  [  0.0.0] web
> >> >>[uninstalled]  [   1.0] reportincident
> >> >>[uninstalled]  [  0.0.0] camel-mail
> >> >>[installed  ]  [  0.0.0] cxf-osgi
> >> >>[uninstalled]  [  0.0.0] spring-web
> >> >>[installed  ]  [  0.0.0] camel-spring
> >> >>[installed  ]  [   2.0-M1] camel
> >> >>[installed  ]  [  0.0.0] camel-core
> >> >>[installed  ]  [  0.0.0] camel-bindy
> >> >>[installed  ]  [  5.2.0] activemq
> >> >>[installed  ]  [  0.0.0] connector
> >> >>[installed  ]  [  0.0.0] camel-osgi
> >> >>[installed  ]  [  0.0.0] wicket
> >> >>[uninstalled]  [  0.0.0] jdbc-driver
> >> >>[installed  ]  [  0.0.0] camel-jms
> >> >>[installed  ]  [  0.0.0] camel-cxf
> >> >>
> >> >> I tried to use features installed command "install hibernate". It
> gave
> >> me
> >> >> error:
> >> >>
> >> >>
> >> >> s...@root:features> install hibernate
> >> >> ERROR CommandLineExecutionFailed:
> >> >> org.apache.geronimo.gshell.command.CommandException:
> >> >> java.lang.RuntimeException: URL
> >> [mvn:org.antlr/com.springsource.antlr/2.7
> >> >> .7] could not be resolved. (enable TRACE logging for details)
> >> >>
> >> >>
> >> >> I

Re: Have anybody here tried the tutorial-osgi-camel-part2?

2009-07-10 Thread Kevin.Zhang

Charles,

The zip file tutorial-osgi-camel-part2.zip in page
http://camel.apache.org/tutorial-osgi-camel-part2.html still shows that it's
created in May 04, 2009. Please let me know if it's the right file to
download.

For the big zip file, could you please upload it to
http://www.sendspace.com/ and put my email address zhangyongjiang at yahoo
dot com as the recipient?

By the way, you mentioned that currently servicemix kernel has no official
build and I have to build it by myself. Actually I did not build it by
myself. I download it from
http://servicemix.apache.org/kernel/karaf-download.html. Should I build it
by myself? 

Thanks a lot,
Kevin


cmoulliard wrote:
> 
> Hi Kevin,
> 
> I have already updated the code of the tutorial on the wiki page. How can
> I
> send to you a zip of 57 Mb ?
> 
> Regards,
> 
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
> 
> *
> blog : http://cmoulliard.blogspot.com
> 
> 
> On Fri, Jul 10, 2009 at 5:32 PM, Kevin.Zhang
> wrote:
> 
>>
>> Hi Charles,
>>
>> Could you please update the tutorial-osgi-camel-part2.zip in the tutorial
>> page to reflect your latest changes? Please also send me the server zip
>> so
>> that I can have a good start point.
>>
>> Best,
>> Kevin
>>
>>
>>
> 

-- 
View this message in context: 
http://www.nabble.com/Have-anybody-here-tried-the-tutorial-osgi-camel-part2--tp24327596p24430068.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: JMS publish consuming sockets?

2009-07-10 Thread huntc


Claus Ibsen-2 wrote:
> 
> Are your routes InOnly? Eg you do not consume from a JMS queue?
> 

Yes I do have some in-only routes. Could the maxMessagesPerTask default
issue cause an unwieldily number of connections to be made with the broker?

Also is there any feel for when 1.6.2 is out or better still 2.0? It is
probably time I got off the 1.x source base given 2.0 is probably where most
focus is nowadays.
-- 
View this message in context: 
http://www.nabble.com/JMS-publish-consuming-sockets--tp24401653p24435619.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: JMS publish consuming sockets?

2009-07-10 Thread Claus Ibsen
On Sat, Jul 11, 2009 at 1:26 AM, huntc wrote:
>
>
> Claus Ibsen-2 wrote:
>>
>> Are your routes InOnly? Eg you do not consume from a JMS queue?
>>
>
> Yes I do have some in-only routes. Could the maxMessagesPerTask default
> issue cause an unwieldily number of connections to be made with the broker?

This option is part of Spring JMS and could also be used/affect when
sending only.
So I advice to configure all your JMS endpoints in 1.6.1 with
maxMessagesPerTask=-1

>
> Also is there any feel for when 1.6.2 is out or better still 2.0? It is
> probably time I got off the 1.x source base given 2.0 is probably where most
> focus is nowadays.

1.6.x should be good enough for production usage. Out intention is of
course to support it as good as we can and
do important bug fixes. But out own focus and energy has been on 2.0
for quite a while now.

I recommend to try out 2.0m2 or better yet 2.0 trunk when you got the
time. Maybe giving your existing application a test drive with it.
The more feedback we can get with X apps not working / working after a
upgrade the better.

But we picked up a recent discussion on some API changes for 2.0 so it
would take another 1-2 weeks before a RC can be cut, as opposed to I
was hoping the RC could have been cut this weekend.

But anyway its feature complete. But the API is something we gotta
cease the moment and mold before its GA.


> --
> View this message in context: 
> http://www.nabble.com/JMS-publish-consuming-sockets--tp24401653p24435619.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread Claus Ibsen
Hi

Sorry but that class is still from Camel 2.0. What about you own code.
Did you compile it against 2.0?
Make sure you are only using Camel 1.5 .jars


On Fri, Jul 10, 2009 at 4:35 PM, chu_man_fu wrote:
>
> The jars I have are those which are included in
> activemq-web-console-5.2.0.war:
>
> activeio-core-3.1.0.jar
> activemq-camel-5.2.0.jar
> activemq-console-5.2.0.jar
> activemq-core-5.2.0.jar
> activemq-pool-5.2.0.jar
> activemq-web-5.2.0.jar
> activemq-xmpp-5.2.0.jar
> aopalliance-1.0.jar
> backport-util-concurrent-2.1.jar
> camel-core-1.5.0.jar
> camel-jms-1.5.0.jar
> camel-spring-1.5.0.jar
> commons-logging-1.1.jar
> commons-logging-api-1.1.jar
> commons-pool-1.4.jar
> derby-10.1.3.1.jar
> geronimo-activation_1.1_spec-1.0.2.jar
> geronimo-j2ee-management_1.0_spec-1.0.jar
> geronimo-jacc_1.1_spec-1.0.1.jar
> geronimo-jms_1.1_spec-1.1.1.jar
> geronimo-jta_1.0.1B_spec-1.0.1.jar
> geronimo-jta_1.1_spec-1.1.1.jar
> geronimo-stax-api_1.0_spec-1.0.1.jar
> jaxb-api-2.0.jar
> jaxb-impl-2.0.3.jar
> jdom-1.0.jar
> log4j-1.2.14.jar
> rome-0.8.jar
> sitemesh-2.2.1.jar
> slf4j-api-1.5.0.jar
> slf4j-log4j12-1.5.0.jar
> smackx-1.5.0.jar
> spring-aop-2.5.5.jar
> spring-beans-2.5.5.jar
> spring-context-2.5.5.jar
> spring-context-support-2.5.5.jar
> spring-core-2.5.5.jar
> spring-jms-2.5.5.jar
> spring-tx-2.5.5.jar
> spring-web-2.5.5.jar
> spring-webmvc-2.5.5.jar
> wstx-asl-3.0.1.jar
> xbean-spring-3.4.jar
> xmlpull-1.1.3.4d_b4_min.jar
> xpp3_min-1.1.4c.jar
> xstream-1.3.jar
>
> If there is something with these jars how come the context which I include
> in the activemq.xml file work?
>
>
> Claus Ibsen-2 wrote:
>>
>> On Fri, Jul 10, 2009 at 3:58 PM, chu_man_fu wrote:
>>>
>>> I have added my route builder to the classes directory but I now get this
>>> error:
>>>
>>>  ERROR [0]] Exception sending context initialized event to listener
>>> instance
>>> of class org.apache.activemq.web.WebConsoleStarter
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'sessionPool' defined in ServletContext resource
>>> [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to bean
>>> 'connectionFactory' while setting bean property 'connectionFactory';
>>> nested
>>> exception is org.springframework.beans.factory.BeanCreationException:
>>> Error
>>> creating bean with name 'connectionFactory' defined in ServletContext
>>> resource [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to
>>> bean 'brokerURL' while setting constructor argument; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'brokerService' defined in ServletContext resource
>>> [/WEB-INF/webconsole-embedded.xml]: Invocation of init method failed;
>>> nested
>>> exception is org.springframework.beans.factory.BeanCreationException:
>>> Error
>>> creating bean with name 'camel:beanPostProcessor': Cannot resolve
>>> reference
>>> to bean 'camel' while setting bean property 'camelContext'; nested
>>> exception
>>> is org.springframework.beans.factory.BeanCreationException: Error
>>> creating
>>> bean with name 'camel': Invocation of init method failed; nested
>>> exception
>>> is java.lang.NoSuchMethodError:
>>> my.package.name.MyRoute.from(Ljava/lang/String;)Lorg/apache/camel/model/RouteDefinition;
>> You must have mixed .jars. RouteDefinition is a Camel 2.0 name only.
>> Double check that you only use Camel 1.5.0 jars
>>
>>
>>>
>>> My code is:
>>>
>>> package my.package.name;
>>>
>>> import org.apache.camel.builder.RouteBuilder;
>>>
>>> public class MyRoute extends RouteBuilder
>>> {
>>>
>>>       �...@override
>>>    public void configure() throws Exception
>>>    {
>>>
>>>                from("activemq:queue.1").to("activemq:queue.2");
>>>    }
>>>
>>> }
>>>
>>> I have camel-core-1.5.0.jar and activemq-camel-5.2.0.jar in my WAR's lib
>>> folder.
>>> What am I missing?
>>>
>>>
>>> Claus Ibsen-2 wrote:

 On Fri, Jul 10, 2009 at 1:00 PM, chu_man_fu wrote:
>
> I have routing configured via XML working with no problems.
> It's the  part I want to get working but I don't know where to
> put
> my classes/package.

 Do you deploy your application as a WAR file in JBoss? If so just put
 your classes in WEB-INF/classes



>
> I have looked at apache-camel-jboss-5-spring but I don't understand how
> to
> get it to work. Are there any examples of this on the net which I could
> learn from?
>
> I have just created a MBean which lets me stop and start a Camel
> context
> which connects to my ActiveMQ broker.
> What I want to achieve is being able to add routing on the fly without
> causing too much disruption.
>

 Yeah. Well you could just deploy routes as WAR files and do redloyments.
 eg every route / application as a separate WAR file.

 In Camel 2.x the dynamic modification of routing will be improved.
 There is a Camel web cons