Re: Intended rollback on the exchange - error on transacted routes

2009-11-19 Thread Claus Ibsen
On Thu, Nov 19, 2009 at 8:40 PM, trivedi kumar b
 wrote:
>
> Hi,
>
> I am using Camel-2.1-SNAPSHOT jars, my router deals with transactions and
> looks like below:
>
> SpringTransactionPolicy required = lookup('REG_PROPAGATION_REQUIRED',
>                    SpringTransactionPolicy.class);
> errorHandler(transactionErrorHandler(required));
>
> from(SERVICE_XDSBREG_END_POINT)
>                .onException(Exception.class)
>                .handled(true)
>                .processRef('processError')
>                .rollback()
>                .end()
>            .processRef('handleRequest')
>            .to("direct:throwException"); //this line throws an exception.
>
>
> As per the Camel 2.0, the exception should be caught and handled at
> onException() block. The code is working fine that during exceptions, it is
> invoking 'processError' in which I am setting custom error response in the
> "out" body. However the client is not getting that, instead getting the
> below error:
>
> org.apache.camel.RollbackExchangeException: Intended rollback on the
> exchange: Exchange[Message:
> org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.rs.registryresponset...@14d9794
>
> Could someone help me on this?
>

There is a new markRollbackOnly() you can use instead of rollback().
This one will then NOT throw any exception and you should be able to
return the custom OUT message.


> thanks,
> Trivedi
> --
> View this message in context: 
> http://old.nabble.com/Intended-rollback-on-the-exchange---error-on-transacted-routes-tp26421454p26421454.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: Is this a bug in the DequeueCount and InFlightCount reorted to JVM?

2009-11-19 Thread Claus Ibsen
On Thu, Nov 19, 2009 at 11:32 PM, praveen.sharma
 wrote:
>
> I am getting some weired values in the DequeueCount, InFlightCount from the
> trunk of activemq code from Apache.A
>
> From the jconsole, here is the output:
> QueueSize = 95
> DispatchCount = 93
> DequeueCount = 606
> InFlightCount = -513
>
> Prefetch size is defaulted to 100.
>
> From the code,  the client has received only 79 messages, so either 14
> messages are not acknowledged or are still in flight!!!
>

Hi

Could you ask in the ActiveMQ user forum.


> --
> View this message in context: 
> http://old.nabble.com/Is-this-a-bug-in-the-DequeueCount-and-InFlightCount-reorted-to-JVM--tp26421508p26421508.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: How to change Camel endpoint at run time?

2009-11-19 Thread Claus Ibsen
On Fri, Nov 20, 2009 at 5:18 AM, Anto Paul  wrote:
> Hi,
>    As an example take an FTP poller that has to connect to a server when a
> particular event is triggered. We have to provide a UI to the end user who
> can change the FTP server address at anytime. He can add more servers or
> remove server or change an existing server. AFAIK Camel 2.0 cannot delete a
> route once it is defined. What I learned from mail archives is that Camel
> context has to be stopped to destroy a route. I also read in the 2.1 release
> notes that the ability to add/stop route feature is added.
>
>    BTW with 2.0, I tried to remove an endpoint like this and it is still
> sending messages to that endpoint.
>
>          context.removeEndpoints("vm://a")
>

You have to stop the route

context.stopRoute("myRoute");

And use the new .routeId("myRoute") to assign an id to the route.
Otherwise they get auto generate route ids.

You could also stop the FtpConsumer on that route, change its
configuration and start it again. However then you need to dig a bit
deeper in the Camel API
That way you can reuse the same route if that is needed.

That is something on the line as

context.getRoutes() .. dribble through the list and find your route
Route route ...

Consumer = route.getConsumer();
// cast to FTP consumer
consumer.stop();
// change values on the consumer
consumer.start();


You can also use JMX to manage at runtime. For example:
http://camel.apache.org/management-example.html

However I do not think we expose fine grained configuration of the FTP
endpoint. However that is possible to add in the future.



> Anto
>
>
> On Thu, Nov 19, 2009 at 7:05 PM, Claus Ibsen  wrote:
>
>> On Thu, Nov 19, 2009 at 6:27 AM, Anto Paul 
>> wrote:
>> > Hi,
>> >   I need to add/remove endpoint URI at runtime when user
>> > adds/removes/updates the URI using a web application. I need to expose
>> > HTTP,FTP,web service and JMS endpoints as consumers and producers. On
>> > searching mail archive the solution I found is to stop camel context to
>> stop
>> > a route.
>> >
>>
>> Hi
>>
>> Can you tell a bit more what you mean by add/remove endpoint at runtime?
>> Can you give a little example?
>>
>> You can use the Camel API to create routes at runtime.
>> And the same API to stop/start routes etc.
>>
>>
>>
>>
>> --
>> 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: How to change Camel endpoint at run time?

2009-11-19 Thread Anto Paul
Hi,
As an example take an FTP poller that has to connect to a server when a
particular event is triggered. We have to provide a UI to the end user who
can change the FTP server address at anytime. He can add more servers or
remove server or change an existing server. AFAIK Camel 2.0 cannot delete a
route once it is defined. What I learned from mail archives is that Camel
context has to be stopped to destroy a route. I also read in the 2.1 release
notes that the ability to add/stop route feature is added.

BTW with 2.0, I tried to remove an endpoint like this and it is still
sending messages to that endpoint.

  context.removeEndpoints("vm://a")

Anto


On Thu, Nov 19, 2009 at 7:05 PM, Claus Ibsen  wrote:

> On Thu, Nov 19, 2009 at 6:27 AM, Anto Paul 
> wrote:
> > Hi,
> >   I need to add/remove endpoint URI at runtime when user
> > adds/removes/updates the URI using a web application. I need to expose
> > HTTP,FTP,web service and JMS endpoints as consumers and producers. On
> > searching mail archive the solution I found is to stop camel context to
> stop
> > a route.
> >
>
> Hi
>
> Can you tell a bit more what you mean by add/remove endpoint at runtime?
> Can you give a little example?
>
> You can use the Camel API to create routes at runtime.
> And the same API to stop/start routes etc.
>
>
>
>
> --
> 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
>


CXF SOAP over JMS and Camel

2009-11-19 Thread Coder One
interface WebService
{
String greeting();
}

class WebServiceImpl
{
   public String greeting()
  {
  return("Hello, world");
   }

}

Using CXF simple front-end, the client code just needs a reference the 
interface WebService and CXF will simply generate the stub/binding to allow the 
client to invoke the server side implementation.

However, I need to pipe in the Camel code in between at both end-points and 
intercept the call.  Is that possible at all?

[CXF-WebService Client] [Camel] [JMS] [Camel] [CXF-WebService Server]

Thanks




  


Is this a bug in the DequeueCount and InFlightCount reorted to JVM?

2009-11-19 Thread praveen.sharma

I am getting some weired values in the DequeueCount, InFlightCount from the
trunk of activemq code from Apache.A

>From the jconsole, here is the output:
QueueSize = 95
DispatchCount = 93
DequeueCount = 606
InFlightCount = -513

Prefetch size is defaulted to 100. 

>From the code,  the client has received only 79 messages, so either 14
messages are not acknowledged or are still in flight!!!

-- 
View this message in context: 
http://old.nabble.com/Is-this-a-bug-in-the-DequeueCount-and-InFlightCount-reorted-to-JVM--tp26421508p26421508.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Intended rollback on the exchange - error on transacted routes

2009-11-19 Thread trivedi kumar b

Hi,

I am using Camel-2.1-SNAPSHOT jars, my router deals with transactions and
looks like below:

SpringTransactionPolicy required = lookup('REG_PROPAGATION_REQUIRED',
SpringTransactionPolicy.class);
errorHandler(transactionErrorHandler(required)); 

from(SERVICE_XDSBREG_END_POINT)
.onException(Exception.class)
.handled(true)
.processRef('processError')
.rollback()
.end()
.processRef('handleRequest')
.to("direct:throwException"); //this line throws an exception.


As per the Camel 2.0, the exception should be caught and handled at
onException() block. The code is working fine that during exceptions, it is
invoking 'processError' in which I am setting custom error response in the
"out" body. However the client is not getting that, instead getting the
below error:

org.apache.camel.RollbackExchangeException: Intended rollback on the
exchange: Exchange[Message:
org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.rs.registryresponset...@14d9794

Could someone help me on this?

thanks,
Trivedi
-- 
View this message in context: 
http://old.nabble.com/Intended-rollback-on-the-exchange---error-on-transacted-routes-tp26421454p26421454.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: How to change Camel endpoint at run time?

2009-11-19 Thread Claus Ibsen
On Thu, Nov 19, 2009 at 6:27 AM, Anto Paul  wrote:
> Hi,
>   I need to add/remove endpoint URI at runtime when user
> adds/removes/updates the URI using a web application. I need to expose
> HTTP,FTP,web service and JMS endpoints as consumers and producers. On
> searching mail archive the solution I found is to stop camel context to stop
> a route.
>

Hi

Can you tell a bit more what you mean by add/remove endpoint at runtime?
Can you give a little example?

You can use the Camel API to create routes at runtime.
And the same API to stop/start routes etc.




-- 
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: Jms remoting failover problem

2009-11-19 Thread Ming Fang
Yes changing idelTimeOut in org.apache.activemq.pool.ConnectionPool to a very 
large number would be a workaround.
However I don't see anyway of doing that in 
org.apache.activemq.camel.component.ActiveMQConfiguration.

But ultimately I think the way Camel uses JMS is just wrong;
The use of a Requestor to listen for out messages will always be a problem 
because it's not guarantee to be listening on the same broker as the publisher.
--ming

On Nov 19, 2009, at 4:42 AM, Willem Jiang wrote:

> Hi,
> 
> How about change the idle time of switching the broker ?
> 
> If the idle time is larger than your application response time, you will not 
> get this kind trouble anymore.
> 
> Willem
> 
> Ming Fang wrote:
>> Hi
>> We're using Camel 2.0 with Activemq 5.3.
>> Our app uses Camel jms remoting.
>> It's connecting to two discrete ActiveMQ brokers using the failover 
>> transport randomly. Everything works fine at first.
>> The problem happens when the app is idle for more than 30 seconds. After 
>> that any remote call will trigger Activemq client to reconnect and may end 
>> up connecting to another broker. But the problem is the Requestor does not 
>> reconnect and still connected to the original broker. The result is calls 
>> are sent to one broker but the Requestor is listening to a different broker 
>> for the response.
>> Is there a way to force the Requestor to use the same connection as the 
>> producers?
>> --Ming
> 



Re: Camel 2.0 + OSGi

2009-11-19 Thread Markus Wolf
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Created here https://issues.apache.org/activemq/browse/CAMEL-2204


> Could you please raise a JIRA ?
> 
> On Thu, Nov 19, 2009 at 09:07, Markus Wolf  wrote:
> Hi,
> 
> any update on this issue?
> 
> Thanks
> Markus
> 
> Markus Wolf schrieb:
 Hi Guillaume,

> If you look at the pom, this package is explicitely *not* imported:
>
> http://fisheye6.atlassian.com/browse/camel/trunk/camel-core/pom.xml?r=HEAD
> Not sure what the reason is though ...
 I tried with a patched camel-core bundle which imports this package and
 our application then runs fine on Java 5... So this is the cause for the
 problem.

 Markus

> On Tue, Nov 17, 2009 at 17:42, Markus Wolf  wrote:
> The longer I think about this it seems like a bug in the camel-core
> bundle to me. The package 'javax.xml.bind.annotation.adapters' is
> missing in the import headers.
> The other JAXB packages (javax.xml.bind, javax.xml.bind.annotation) are
> imported into the bundle.
> Is my assumption correct? Then I would open a ticket for this.
> Markus

 I've traced that this exception (below) is caused by the camel-core
 bundle. Is there a specific order in which the camel bundles should be
 loaded by the runtime?

 Caused by: java.lang.ClassNotFoundException:
 javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at
 org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1459)

 Markus


> No other idea?
> I already tried to import the 'javax.xml.bind.annotation.adapters'
> package into my bundle it it does not seem to be related to my bundle 
> in
> any case.
> Regrads
> Markus
>> thanks for your responses.
>> I already tried this bundles because the guys at the felix user-list
>> also told me so but the them I get another exception.
>> For reference I do post it here also (below). The ContextFactory is
>> found then, but the classloader issues are still not resolved... Any
>> more ideas?
>> Thank you :)
>> The exception:
>> 2:08:10,777 | ERROR | ExtenderThread-6 | ContextLoaderListener
>>   | BundleApplicationContextListener   50 | Application context 
>> refresh
>> failed
>> (OsgiBundleXmlApplicationContext(bundle=de.llynch.esb.llynch-sender,
>> config=osgibundle:/META-INF/spring/*.xml))
>> org.springframework.beans.factory.BeanDefinitionStoreException: 
>> Failed
>> to parse JAXB element: javax.xml.bind.JAXBException: Unable to create
>> context
>>  - with linked exception:
>> [java.lang.reflect.InvocationTargetException]; nested exception is
>> javax.xml.bind.JAXBException: Unable to create context
>>  - with linked exception:
>> [java.lang.reflect.InvocationTargetException]
>> at
>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:147)
>> at
>> org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:199)
>> at
>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
>> at
>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
>> at
>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
>> at
>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
>> at
>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
>> at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefi

Re: Camel 2.0 + OSGi

2009-11-19 Thread Guillaume Nodet
Could you please raise a JIRA ?

On Thu, Nov 19, 2009 at 09:07, Markus Wolf  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> any update on this issue?
>
> Thanks
> Markus
>
> Markus Wolf schrieb:
>> Hi Guillaume,
>>
>>> If you look at the pom, this package is explicitely *not* imported:
>>>    
>>> http://fisheye6.atlassian.com/browse/camel/trunk/camel-core/pom.xml?r=HEAD
>>> Not sure what the reason is though ...
>>
>> I tried with a patched camel-core bundle which imports this package and
>> our application then runs fine on Java 5... So this is the cause for the
>> problem.
>>
>> Markus
>>
>>> On Tue, Nov 17, 2009 at 17:42, Markus Wolf  wrote:
>>> The longer I think about this it seems like a bug in the camel-core
>>> bundle to me. The package 'javax.xml.bind.annotation.adapters' is
>>> missing in the import headers.
>>> The other JAXB packages (javax.xml.bind, javax.xml.bind.annotation) are
>>> imported into the bundle.
>>
>>> Is my assumption correct? Then I would open a ticket for this.
>>> Markus
>>
>>
>> I've traced that this exception (below) is caused by the camel-core
>> bundle. Is there a specific order in which the camel bundles should be
>> loaded by the runtime?
>>
>> Caused by: java.lang.ClassNotFoundException:
>> javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
>>       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>       at java.security.AccessController.doPrivileged(Native Method)
>>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>       at
>> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1459)
>>
>> Markus
>>
>>
>>> No other idea?
>>> I already tried to import the 'javax.xml.bind.annotation.adapters'
>>> package into my bundle it it does not seem to be related to my bundle in
>>> any case.
>>> Regrads
>>> Markus
 thanks for your responses.
 I already tried this bundles because the guys at the felix user-list
 also told me so but the them I get another exception.
 For reference I do post it here also (below). The ContextFactory is
 found then, but the classloader issues are still not resolved... Any
 more ideas?
 Thank you :)
 The exception:
 2:08:10,777 | ERROR | ExtenderThread-6 | ContextLoaderListener
   | BundleApplicationContextListener   50 | Application context refresh
 failed
 (OsgiBundleXmlApplicationContext(bundle=de.llynch.esb.llynch-sender,
 config=osgibundle:/META-INF/spring/*.xml))
 org.springframework.beans.factory.BeanDefinitionStoreException: Failed
 to parse JAXB element: javax.xml.bind.JAXBException: Unable to create
 context
  - with linked exception:
 [java.lang.reflect.InvocationTargetException]; nested exception is
 javax.xml.bind.JAXBException: Unable to create context
  - with linked exception:
 [java.lang.reflect.InvocationTargetException]
     at
 org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:147)
     at
 org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:199)
     at
 org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
     at
 org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
     at
 org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
     at
 org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
     at
 org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
     at
 org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
     at
 org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
     at
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
     at
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
     at
 org.springframework.beans.factory.xml.XmlBeanDefinitionReade

Re: Jms remoting failover problem

2009-11-19 Thread Willem Jiang

Hi,

How about change the idle time of switching the broker ?

If the idle time is larger than your application response time, you will 
not get this kind trouble anymore.


Willem

Ming Fang wrote:

Hi

We're using Camel 2.0 with Activemq 5.3.
Our app uses Camel jms remoting.
It's connecting to two discrete ActiveMQ brokers using the failover 
transport randomly. Everything works fine at first.


The problem happens when the app is idle for more than 30 seconds. After 
that any remote call will trigger Activemq client to reconnect and may 
end up connecting to another broker. But the problem is the Requestor 
does not reconnect and still connected to the original broker. The 
result is calls are sent to one broker but the Requestor is listening to 
a different broker for the response.


Is there a way to force the Requestor to use the same connection as the 
producers?


--Ming





Re: Camel : slow processing of messages

2009-11-19 Thread Dmitry Ulanov
Do you just write to db or read/write? May be the problem would be solved by
creating indexes for db.

On Thu, Nov 19, 2009 at 12:15 PM, Claus Ibsen  wrote:

> On Thu, Nov 19, 2009 at 9:58 AM, titexe  wrote:
> >
> > Hello;
> >
> > I have a route camel that makes the following actions :
> >
> >  get a message in the queue IN and log into the database,
> >
> > this flow was stopped and the queue was filled with 300,000 post messages
> > persistent.
> >
> > When I restart the broker, he spends much time in indexing and processes
> > messages that are in the queue of a very slow.(3 messages per second)
> >
> > there's a best practice for this case or recommendations to do?
> >
> > Thank you for your help
> >
>
> Hi
>
> I think you gotta check with the JMS broker vendor as its the broker
> which is causing the slow flow.
> Camel just uses Spring JMS to listen to the queues and route messages
> when the onMessge method is invoked.
> Underneath its the Spring DefaultMessageListenerContainer that is running
>
>
> > Best regards,
> >
> > titexe
> > --
> > View this message in context:
> http://old.nabble.com/Camel-%3A-slow-processing-of-messages-tp26421240p26421240.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: Camel : slow processing of messages

2009-11-19 Thread Claus Ibsen
On Thu, Nov 19, 2009 at 9:58 AM, titexe  wrote:
>
> Hello;
>
> I have a route camel that makes the following actions :
>
>  get a message in the queue IN and log into the database,
>
> this flow was stopped and the queue was filled with 300,000 post messages
> persistent.
>
> When I restart the broker, he spends much time in indexing and processes
> messages that are in the queue of a very slow.(3 messages per second)
>
> there's a best practice for this case or recommendations to do?
>
> Thank you for your help
>

Hi

I think you gotta check with the JMS broker vendor as its the broker
which is causing the slow flow.
Camel just uses Spring JMS to listen to the queues and route messages
when the onMessge method is invoked.
Underneath its the Spring DefaultMessageListenerContainer that is running


> Best regards,
>
> titexe
> --
> View this message in context: 
> http://old.nabble.com/Camel-%3A-slow-processing-of-messages-tp26421240p26421240.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


Camel : slow processing of messages

2009-11-19 Thread titexe

Hello;

I have a route camel that makes the following actions :

 get a message in the queue IN and log into the database,

this flow was stopped and the queue was filled with 300,000 post messages
persistent.

When I restart the broker, he spends much time in indexing and processes
messages that are in the queue of a very slow.(3 messages per second)

there's a best practice for this case or recommendations to do?

Thank you for your help

Best regards,

titexe
-- 
View this message in context: 
http://old.nabble.com/Camel-%3A-slow-processing-of-messages-tp26421240p26421240.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel 2.0 + OSGi

2009-11-19 Thread Markus Wolf
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

any update on this issue?

Thanks
Markus

Markus Wolf schrieb:
> Hi Guillaume,
> 
>> If you look at the pom, this package is explicitely *not* imported:
>>http://fisheye6.atlassian.com/browse/camel/trunk/camel-core/pom.xml?r=HEAD
>> Not sure what the reason is though ...
> 
> I tried with a patched camel-core bundle which imports this package and
> our application then runs fine on Java 5... So this is the cause for the
> problem.
> 
> Markus
> 
>> On Tue, Nov 17, 2009 at 17:42, Markus Wolf  wrote:
>> The longer I think about this it seems like a bug in the camel-core
>> bundle to me. The package 'javax.xml.bind.annotation.adapters' is
>> missing in the import headers.
>> The other JAXB packages (javax.xml.bind, javax.xml.bind.annotation) are
>> imported into the bundle.
> 
>> Is my assumption correct? Then I would open a ticket for this.
>> Markus
> 
> 
> I've traced that this exception (below) is caused by the camel-core
> bundle. Is there a specific order in which the camel bundles should be
> loaded by the runtime?
>
> Caused by: java.lang.ClassNotFoundException:
> javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>   at
> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1459)
>
> Markus
>
>
>> No other idea?
>> I already tried to import the 'javax.xml.bind.annotation.adapters'
>> package into my bundle it it does not seem to be related to my bundle in
>> any case.
>> Regrads
>> Markus
>>> thanks for your responses.
>>> I already tried this bundles because the guys at the felix user-list
>>> also told me so but the them I get another exception.
>>> For reference I do post it here also (below). The ContextFactory is
>>> found then, but the classloader issues are still not resolved... Any
>>> more ideas?
>>> Thank you :)
>>> The exception:
>>> 2:08:10,777 | ERROR | ExtenderThread-6 | ContextLoaderListener
>>>   | BundleApplicationContextListener   50 | Application context refresh
>>> failed
>>> (OsgiBundleXmlApplicationContext(bundle=de.llynch.esb.llynch-sender,
>>> config=osgibundle:/META-INF/spring/*.xml))
>>> org.springframework.beans.factory.BeanDefinitionStoreException: Failed
>>> to parse JAXB element: javax.xml.bind.JAXBException: Unable to create
>>> context
>>>  - with linked exception:
>>> [java.lang.reflect.InvocationTargetException]; nested exception is
>>> javax.xml.bind.JAXBException: Unable to create context
>>>  - with linked exception:
>>> [java.lang.reflect.InvocationTargetException]
>>> at
>>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:147)
>>> at
>>> org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:199)
>>> at
>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
>>> at
>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
>>> at
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
>>> at
>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
>>> at
>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
>>> at
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
>>> at
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
>>> at
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
>>> at
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:31