Re: Enabling tracing in production
Christian Mueller wrote: The -trace option 'only' enables the tracing functionality. There is no '-disable-trace' option what is what you need (if you configure a Tracer but it should not trace anything)... Shall I raise an issue on JIRA? I think that the -trace option is completely useless at the moment. I think it should take a boolean argument and always expect that a tracer has been declared. The value of the argument should correspond with enabling the tracer via the context. Furthermore I think that one should always be explicit about tracing. Therefore if there is no trace attribute on the context, you shouldn't get tracing at all i.e. declaring the use of a tracer should involve declaring a tracer and enabling tracing on the context. What'd think? -- View this message in context: http://camel.465427.n5.nabble.com/Enabling-tracing-in-production-tp3243013p3247715.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Enabling tracing in production
So, back to my original question then... If I declare the following in my Spring context: bean id=camelTracer class=org.apache.camel.processor.interceptor.Tracer / ...and nothing else at all, then tracing is enabled. So how do I then turn off tracing for production mode without having to modify my context? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Enabling-tracing-in-production-tp3243013p3245879.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Enabling tracing in production
Hi Christian, Thanks for your reply. I was hoping that they'd be a way that I could do it via external configuration. I guess I could create a trace property set from my external properties file and have Spring substitute it. However I was hoping that the -trace option to the Main class would do something useful. So far, I don't understand its relevance. Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Enabling-tracing-in-production-tp3243013p3245917.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Enabling tracing in production
Richard Kettelerij wrote: You don't have to add a Tracer to your Spring context yourself. Camel adds one automatically if you have a CamelContext declared in Spring. Also your don't have to do anything with the trace option in your Spring context. This was not my experience. Are you certain? I find that the easiest way to enable/disable tracing in production is through JMX. Just navigate to the CamelContext MBean and modify the tracing attribute. Additionally you can determine what should be traced by modifying a few options in the Tracer MBean. That's a good idea. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Enabling-tracing-in-production-tp3243013p3243168.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel tracing !!
In addition you should just be able to add a -trace option to the invocation of your java command e.g.: java org.apache.camel.spring.Main -trace (note that the -trace must come after the main class declaration as it isn't a standard Java option). More info: http://camel.apache.org/tracer.html (Enabling) Would someone else be able to confirm this behaviour (I've not had time to test). Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/camel-tracing-tp475482p3242913.html Sent from the Camel - Users mailing list archive at Nabble.com.
Enabling tracing in production
Hi there, I'm having difficulty understanding how the tracing facility can be applied at runtime in production; perhaps it cannot be. If I declare the following in my Spring context: bean id=camelTracer class=org.apache.camel.processor.interceptor.Tracer / ...and nothing else at all, then tracing is enabled. So how do I then turn off tracing for production mode without having to modify my context? If I declare 'trace=false' on my context declaration then it does not appear to be overridden by the -trace option on the command line... Thus I cannot by default declare tracing as off and then enable it at runtime by changing my startup. Thanks for any help. Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Enabling-tracing-in-production-tp3243013p3243013.html Sent from the Camel - Users mailing list archive at Nabble.com.
JSR-330 for configuring Camel Dependency Injection (DI)
Has anyone used JSR-330 annotations in place of Spring XML for configuring Camel? If so then would you be able to report back on your experience and perhaps point to some example usage? I find the idea of configuring DI using JSR-330 quite attractive; in a similar vein to Java being used to configure routes instead of XML. Thanks! -- View this message in context: http://camel.465427.n5.nabble.com/JSR-330-for-configuring-Camel-Dependency-Injection-DI-tp2847890p2847890.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JSR-330 for configuring Camel Dependency Injection (DI)
Hi guys, Thanks for your responses. I realise that Camel is not an IoC container, but it might be a useful feature for Camel's classes to lend themselves to becoming auto injectable in a standardised way i.e. by following JSR-330. What'd think? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/JSR-330-for-configuring-Camel-Dependency-Injection-DI-tp2847890p2849186.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS consumers - is there a better way?
Hi Willem, Just a FYI, I've resolved this issue and provided a patch on the JIRA issue. Let me know if you think it warrants a test case as I found it pretty trivial to implement. Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-consumers-is-there-a-better-way-tp2834502p2836101.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS consumers - is there a better way?
Gosh, how did I miss that... I've now updated the non-bean CXF pages of the Wiki to emphasise the benefits of using the bean component with a short note at the top of each page. -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-consumers-is-there-a-better-way-tp2834502p2835789.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS consumers - is there a better way?
OK, previously I specified a provider in the providers element of a cxf:rsServer element. How do I now specify a provider when using cxfbean? This is what I had when using cxfrs: lt;cxf:rsServer id=rsServer address=http://localhost:${com.classactionpl.gpstrackerservices.httpPort}; serviceClass=com.classactionpl.gpsTrackerReference.GPSTrackerCollectionService staticSubresourceResolution=truegt; lt;cxf:providersgt; lt;bean class=com.classactionpl.gpsTrackerReference.GPSTrackerCollectionProvidergt; lt;property name=gpsTrackerCollectionTransformer ref=gpsTrackerCollectionTransformer /gt; lt;/beangt; lt;/cxf:providersgt; lt;/cxf:rsServergt; ...so now that I have the following route declaration, how do I specify the provider? from(jetty:http://localhost:; + httpPort + ?matchOnUriPrefix=true) .to(seda:gpsTrackerCollectionWebService); from(seda:gpsTrackerCollectionWebService?concurrentConsumers=2).to( cxfbean:gpsTrackerCollectionWebService); Thanks for your help. I shall update the wiki with the solution you provide. Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-consumers-is-there-a-better-way-tp2834502p2835835.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS consumers - is there a better way?
Hi Willem, Thanks for the response. I've now raised a JIRA at https://issues.apache.org/activemq/browse/CAMEL-3117 https://issues.apache.org/activemq/browse/CAMEL-3117 . Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-consumers-is-there-a-better-way-tp2834502p2835851.html Sent from the Camel - Users mailing list archive at Nabble.com.
CXFRS and concurrency
Hi there, I'm interested in the throughput characteristics of a CXFRS consumer endpoint. What I'd like to understand specifically is how many threads are configured for the endpoint and whether the async API is being utilised in dispatching the requests as they come in. I couldn't find any mention of this in the doco. Intuitively I'd guess that there's just one thread assigned to the endpoint and that the continuations API is at play somewhere (perhaps in Jetty?). It'd be great to have these throughput characteristics confirmed. Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-and-concurrency-tp2834384p2834384.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS and concurrency
Thanks Willem. I'm using a cxf:rsServer declaration - does that mean I'm using the cxf-http-jetty-transport? How many threads should I expect to be configured in the cxfrs consumer by default, and how can this configuration be changed? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-and-concurrency-tp2834384p2834417.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS and concurrency
Thanks again Willem. OK, nearly there... how does the rsServer configuration in my Spring XML relate to the httpj configuration? At the present, I have an rsServer declaration and nothing else. Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-and-concurrency-tp2834384p283.html Sent from the Camel - Users mailing list archive at Nabble.com.
CXFRS consumers - is there a better way?
Hi there, I've been using the Camel CXFRS component and I have to say that I've found the learning curve steep. Perhaps this is due to not being familliar with CXF. Regardless, given my high level of familiarity with Camel and general experience, implementing a RESTful JSON endpoint was just too hard. My expectation is that I could express a route for consuming CXFRS requests using something like this: from(jetty:http://localhost/;).to(cxfrs:consumer?services=#myService1,#myService2); where my service instances (#myService1 etc.) are JAX-RS annotated instances configured in my Spring XML. All that I want CXF to do is marshall RESTful exchanges into JAX-RS invocations of beans as I think that this is a good separation of concerns. Is this possible somehow? Kidn regards, Christoppher -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-consumers-is-there-a-better-way-tp2834502p2834502.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
Hi Claus, I'm not quite sure how creating a property in my pom file influences the version of Spring that Camel depends on... did you mean a classifier on my Camel dependency declarations? Sorry if I'm missing something here... Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p511279.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
Claus Ibsen-2 wrote: I think we can fix the issue with a custom exceptionListener which fixes the null message. Can you test it by creating a custom javax.jms.ExceptionListener class and then set the message to a non null value. And in Camel you can register the listener using the exceptionListener=#myListener configuration in the endpoint uri. If it fixes it we can create a listener to be shipped out of the box. Hi Claus, I can expend the effort to do this however I've now moved and tested my application in UAT based on Spring 3 (I had to move quickly). In addition an exception listener sounds like a hack. Can we not move to Spring 3 and provide a Spring 2 profile (swap the profile situation around?). That way any AMQ and SMX dependency issue is resolved as they can build their own distributions from source. BTW: I don't see much value in shipping Camel with AMQ nowadays; I appreciate the history, but they're really two very independent things. I can't imagine why someone would prefer to use an AMQ bundled Camel vs. the one generally available. Also, given SMX's relationship to OSGi and thus its great handling at dependencies I'm not sure I get why Camel needs to be strongly coupled there either. Let's not have other projects constrain what we do here. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p511190.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
I've just made a discovery on my own machine. Looks as though this issue may actually be related to Spring. What I did was start up a broker, start up my application that subscribes to a topic, shutdown the broker and: Exception in thread DefaultMessageListenerContainer-1 java.lang.NullPointerException at java.lang.String.indexOf(String.java:1733) at java.lang.String.indexOf(String.java:1715) at org.springframework.jms.support.JmsUtils.buildExceptionMessage(JmsUtils.java:255) at org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure(DefaultMessageListenerContainer.java:745) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:897) at java.lang.Thread.run(Thread.java:637) The line in question is: public static String buildExceptionMessage(JMSException ex) { String message = ex.getMessage(); Exception linkedEx = ex.getLinkedException(); if (linkedEx != null message.indexOf(linkedEx.getMessage()) == -1) { // message = message + ; nested exception is + linkedEx; } return message; } Any thoughts? Have we started using some later version of Spring? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510846.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
After a little more research, I think its because the version of Spring we're using has this bug: https://jira.springsource.org/browse/SPR-5275 Any recommendations? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510849.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
Claus Ibsen-2 wrote: Can you post a bit more on the stacktrace? Maybe we can find a spot in the camel-jms component to workaround this issue by setting an non null message on the JmsException. This may help prevent this spring bug. Hi Claus, That was the entire stack trace I'm afraid! BTW: Is there a big issue with regards to upgrading Camel to Spring 3? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510888.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
Claus Ibsen-2 wrote: No you can replace the spring jars. Upgrading to Spring 3.0.3.RELEASE fixes the problem. Should we move Camel to Spring 3? Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510895.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
Hi Willem, Willem.Jiang wrote: Hi, As Camel is used within ActiveMQ and ServiceMix, we can't just upgrade Spring version in Camel. But there is spring3 profile in camel parent/pom.xml, you can build camel with spring 3.0.3.RELEASE with that profile if you like. Sounds to me that a few Apache projects need a strategy to move toward Spring 3. We've got to upgrade sometime. Given the build profile you mention, how about releasing Camel as Spring 3, but require that slower moving projects build their own distribution based on Spring 2? -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510985.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
Hi Willem, Thanks for that. Just to note that upgrading to Camel 2.3.0 did not change the outcome i.e. my application failed to re-connect to the topic upon waking up. I have now built and deployed a release using 5.3.2 AMQ artefacts so we'll see if that makes any difference (I shall know in about 12 hours!). Kind regards, Christopher -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510394.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
OK, upgrading to AMQ 5.3.2 didn't help either. Help! -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510536.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with maintaining a JMS subscription after waking from sleep
I was using Camel 2.2.0 so I've now upgraded to 2.3.0 in the hope that the problem may go away. My other thought is to upgrade the camel-activemq component. I noticed that I'm using activemq-camel:5.2.0 as per the doco. and that this brings in activemq-core:5.2.0 and activemq-pool:5.2.0. This is obviously behind the current release of AMQ which is 5.3.2, so I'm wondering if there have been fixes around that. If my Camel upgrade doesn't look to have effected the problem then I'll bring in activemq-*:5.3.2 and see if that makes a difference. Any other pointers greatly appreciated of course. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-maintaining-a-JMS-subscription-after-waking-from-sleep-tp510193p510288.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Transactional Camel Bean component : Should we define a transacted camel route or not ?
I would say so only if the scope of the transaction is beyond the DAO (presuming the bean is a DAO). Most, actually all, of what I've done ends up having the transactions atomically scoped by DAO methods (which in turn use the Spring @Transaction annotation). -- View this message in context: http://old.nabble.com/Transactional-Camel-Bean-component-%3A-Should-we-define-a-transacted--camel-route-or-not---tp28513052p2878.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel Hyperic Agent plugin anyone?
Just wondering if anyone has created some plugin xml for a Hyperic Agent that they'd be willing to share... Kind regards, Christopher -- View this message in context: http://old.nabble.com/Camel-Hyperic-Agent-plugin-anyone--tp28555615p28555615.html Sent from the Camel - Users mailing list archive at Nabble.com.
Monitoring tools for Camel/JMX applications
Hi there, Any recommendations for monitoring Camel applications i.e. JMX based applications? I've been playing around with the open source version of Hyperic but haven't quite managed to make it report on my Camel application. Kind regards, Christopher -- View this message in context: http://old.nabble.com/Monitoring-tools-for-Camel-JMX-applications-tp28555630p28555630.html Sent from the Camel - Users mailing list archive at Nabble.com.
The timing of the timer component
Hi there, Could it be that when the timer component is used it starts firing before all of the routes have been configured? I had a race condition where on one machine Camel complained that route X (produced to by a timer consumer) wasn't established. On another machine though it was fine. Moving the code around so that route X was declared before the timer fixed the issue. Kind regards, Christopher -- View this message in context: http://old.nabble.com/The-timing-of-the-timer-component-tp27857160p27857160.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: single tcp connection with async requests and async responses
Firstly if you need to guarantee just one tcp connection as per a connection-oriented protocol then you'll need to follow this recipe: http://camel.apache.org/fine-grained-control-over-a-channel.html You can send multiple requests by reading from a queue (perhaps consider using a http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html ConcurrentLinkedQueue i.e. poll the queue until there's nothing left on it. Meanwhile you'll need another thread to obtain a polling consumer from the same endpoint and poll with a timeout. Of course your protocol will have to support some form of correlation id so that you can match your responses back to your requests. That should do the trick. -- View this message in context: http://old.nabble.com/single-tcp-connection-with-async-requests-and-async-responses-tp27850137p27857286.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: single tcp connection with async requests and async responses
There's no high level method that I can think of. I find that quite often, when dealing with TCP endpoints as you've described, you probably need to think about wrapping everything up into your own component. -- View this message in context: http://old.nabble.com/single-tcp-connection-with-async-requests-and-async-responses-tp27850137p27857707.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: single tcp connection with async requests and async responses
I do not recommend extending the MINA component. My recommendation is for you to roll your own component from scratch. This component should obtain the MINA endpoint and invoke its consumers and producers. You could do this within a Processor but writing a component should structure your code more nicely. More on writing components here: http://camel.apache.org/writing-components.html In summary consider: * writing MINA encoders/decoders for your protocol (depending on the complexity of your protocol) * write a component that utilises a MINA component which in turn optionally utilises the encoders and decoders That way your route code becomes something like: from(file:///test/test/response) .convertBodyTo(String.class) .to(mycomponent://localhost:6202); from(mycomponent://localhost:6202) .to(log:+++ reply); -- View this message in context: http://old.nabble.com/single-tcp-connection-with-async-requests-and-async-responses-tp27850137p27857847.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: single tcp connection with async requests and async responses
In terms of development time, this would depend on your familiarity with MINA I guess. My personal take is to utilise the existing Camel component. I think your custom component would end up looking quite simple and skinny. You can load balance custom components as you can any other type of component of course. -- View this message in context: http://old.nabble.com/single-tcp-connection-with-async-requests-and-async-responses-tp27850137p27857929.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: The timing of the timer component
Hi Claus, I understand that route order can be configured explicitly. However should a route start up and start firing during configuration of the routes? Intuitively, I wouldn't have thought so. Kind regards, Christopher -- View this message in context: http://old.nabble.com/The-timing-of-the-timer-component-tp27857160p27859605.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE
Hi Claus, I have now created a Cookbook recipe explaining this use case. http://cwiki.apache.org/confluence/display/CAMEL/Fine+Grained+Control+Over+a+Channel Kind regards, Christopher -- View this message in context: http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27320438.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE
Hi Claus, I'm happy to create a ticket of course, however I'm not clear on what the resolution is. I am not sure that implementing a disconnect URI option is the way to go though as per FTP. My use case is that I want to establish a connection, send multiple messages within a loop through that *same* connection and then close the connection. I do not think that I want to change my URI for just the last message sent... that sounds a little messy. I suppose a header value would get over this as per consuming messages from MINA and would be nicer programatically. However and most importantly, if I use a template then I do not think there's a guarantee that I'm going to send through the same connection each time I send a message in my loop i.e. if another thread decides also to send messages through the same URI then could it: (i) hijack the same connection; and (ii) potentially cause my subsequent messages to go over another connection? Neither of these two scenarios would be good. While we're figuring this out, is my usage of a Producer directly valid as a work-around? Kind regards, Christopher -- View this message in context: http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27289240.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE
Hi guys, Turns out that I'm using MinaProducer and not MinaConsumer of course; MinaConsumer is the one that has the HEADER_CLOSE_SESSION_WHEN_COMPLETE logic and MinaProducer isn't so capable by the looks of it. I was hoping that stopping the template by calling its stop method would in turn cause the MinaProducer to close its session. It does not. I then reverted to the lower level method of creating a producer for my endpoint and then using the following logic: CamelContext camelContext = exchange.getContext(); Endpoint endpoint = camelContext.getEndpoint(smsSenderEndpoint); Producer producer = endpoint.createProducer(); producer.start(); try { ... // For each message to send Exchange smsExchange = producer.createExchange(); smsExchange.getIn().setBody(requestMessage); producer.process(smsExchange); Object replyMessage = smsExchange.getOut().getBody(); … } finally { producer.stop(); } Is this the best approach for sending out a stream of messages through the same channel and then ensuring that the channel is closed down; or should we be looking at some new functionality perhaps in the form of some header or method indicating that a session should be closed by the producer? Kind regards, Christopher -- View this message in context: http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27283994.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE
Claus Ibsen-2 wrote: Yes you need to pass in this header every time you want to session closed. I'm pretty convinced that this isn't happening for me despite passing in the header that I want the session closed when complete (which I presume is when I get a reply). Here's my log file: 2010-01-21 15:57:59,406 [lCalendarEvents] DEBUG lendarEventAttendeeSMSNotifier - Sending message to xxx: Reply to confirm meeting closed Thu, 21 Jan '10 03:35PM Scen 7 # 7 2010-01-21 15:57:59,409 [IoProcessor-1.2] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] CREATED 2010-01-21 15:57:59,409 [IoProcessor-1.2] DEBUG ExecutorFilter - Launching thread for /192.168.0.200:9500 2010-01-21 15:57:59,410 [ MinaThreadPool] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] OPENED 2010-01-21 15:57:59,410 [ MinaThreadPool] DEBUG ExecutorFilter - Exiting since queue is empty for /192.168.0.200:9500 2010-01-21 15:57:59,410 [lCalendarEvents] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] WRITE: au.com.blueglue.bluegluesmsprotocol.send...@8e1a0d01 2010-01-21 15:57:59,411 [IoProcessor-1.2] DEBUG ExecutorFilter - Launching thread for /192.168.0.200:9500 2010-01-21 15:57:59,411 [ MinaThreadPool] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] SENT: au.com.blueglue.bluegluesmsprotocol.send...@8e1a0d01 2010-01-21 15:57:59,411 [ MinaThreadPool] DEBUG ExecutorFilter - Exiting since queue is empty for /192.168.0.200:9500 2010-01-21 15:58:10,979 [IoProcessor-1.2] DEBUG ExecutorFilter - Launching thread for /192.168.0.200:9500 2010-01-21 15:58:10,979 [ MinaThreadPool] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] RECEIVED: au.com.blueglue.bluegluesmsprotocol.transmitted...@8e1a0d01 2010-01-21 15:58:10,979 [ MinaThreadPool] DEBUG ExecutorFilter - Exiting since queue is empty for /192.168.0.200:9500 2010-01-21 15:58:10,979 [lCalendarEvents] DEBUG lendarEventAttendeeSMSNotifier - Message sent 2010-01-21 15:58:10,980 [lCalendarEvents] DEBUG lendarEventAttendeeSMSNotifier - Sending message to yyy: Reply to confirm meeting closed Thu, 21 Jan '10 03:35PM Scen 7 # 7 2010-01-21 15:58:10,980 [lCalendarEvents] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] WRITE: au.com.blueglue.bluegluesmsprotocol.send...@808819c0 2010-01-21 15:58:10,981 [IoProcessor-1.2] DEBUG ExecutorFilter - Launching thread for /192.168.0.200:9500 2010-01-21 15:58:10,981 [ MinaThreadPool] INFO MinaProducer$ResponseHandler - [/192.168.0.200:9500] SENT: au.com.blueglue.bluegluesmsprotocol.send...@808819c0 2010-01-21 15:58:10,981 [ MinaThreadPool] DEBUG ExecutorFilter - Exiting since queue is empty for /192.168.0.200:9500 2010-01-21 15:58:10,983 [IoProcessor-1.2] DEBUG ExecutorFilter - Launching thread for /192.168.0.200:9500 ... After the received event at 2010-01-21 15:58:10,979, I was hoping that the socket would be closed. As you can see there is no trace in the log of the socket being closed. Is this a bug or am I not doing something quite right. Here's my code again: Object replyMessage = producerTemplate .requestBodyAndHeader( smsSenderEndpoint, requestMessage, MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE, true); The above template instance is called twice in succession as shown by the Sending message to entries. Thanks for your help. Kind regards, Christopher -- View this message in context: http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27255912.html Sent from the Camel - Users mailing list archive at Nabble.com.
requestBodyAndHeader and HEADER_CLOSE_SESSION_WHEN_COMPLETE
Hi there, Is the following code valid... my goal is to ensure that the MINA connection I'm using is closed upon having received a reply: Object replyMessage = producerTemplate .requestBodyAndHeader( smsSenderEndpoint, requestMessage, MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE, true); The doco. implies that the above header value is useful in server style scenarios hence my question around using a consuming template call. I'd like to confirm whether it is necessary for me to specify this header in the context of using a template; particularly if the same template is invoked again to send another message very soon after receiving a reply to the previous one. Thanks. Kind regards, Christopher -- View this message in context: http://old.nabble.com/requestBodyAndHeader-and-HEADER_CLOSE_SESSION_WHEN_COMPLETE-tp27175565p27175565.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Retrieving MailMessage bodies as DataHandler objects
willem.jiang wrote: Camel Message has getAttachements() method which can help you get the DataHandlers. Thanks Willem - I know about the attachments. My case is where I'm dealing with a single part message and its not text content i.e. its text/calendar. -- View this message in context: http://old.nabble.com/Retrieving-MailMessage-bodies-as-DataHandler-objects-tp27142905p27158300.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Retrieving MailMessage bodies as DataHandler objects
Claus Ibsen-2 wrote: You can get access to the underlying javax.mail.Message... Thanks Claus. I'm now trying out the following and just waiting for another message to come through: // See if our exchange body contains the calendar object. javax.mail.Message mailMessage = exchange.getIn(MailMessage.class) .getMessage(); if (logger.isDebugEnabled()) { logger.debug(Message received: + mailMessage); } try { DataHandler bodyDataHandler = mailMessage.getDataHandler(); if (bodyDataHandler != null) { addCalendarDataToCalendars(calendars, bodyDataHandler); } } catch (MessagingException e) { logger.error(e); } -- View this message in context: http://old.nabble.com/Retrieving-MailMessage-bodies-as-DataHandler-objects-tp27142905p27158347.html Sent from the Camel - Users mailing list archive at Nabble.com.
Retrieving MailMessage bodies as DataHandler objects
Hi there, Supposing that I receive an Exchange using Camel Mail and I want to see whether the body is of the required MIME type; is it valid to do this: // See if our exchange body contains the calendar object. DataHandler bodyDataHandler = exchange.getIn().getBody( DataHandler.class); if (bodyDataHandler != null) { ... } I know that I can retrieve attachments as DataHandlers, but am I able to do so for the body itself? The documentation implies that the body is coerced to a string... I have already incorporated the above code in my application and I'm waiting for someone to send the type of message that may also answer this post. However it'll be several hours before I know. Thanks! Kind regards, Christopher -- View this message in context: http://old.nabble.com/Retrieving-MailMessage-bodies-as-DataHandler-objects-tp27142905p27142905.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Startup invocation of a route
Stephen Gargan wrote: Claus has got you covered ;) How could I have doubted him! Stephen Gargan wrote: There is an EventNotification mechanism that you can use... This works beautifully. Thanks so much. -- View this message in context: http://old.nabble.com/Startup-invocation-of-a-route-tp26949232p26952882.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Startup invocation of a route
Claus Ibsen-2 wrote: On Tue, Dec 29, 2009 at 12:29 AM, huntc hu...@mac.com wrote: Just a note. Do you want the route to trigger *only* when CamelContext has just been started? What if you stop and start the route later, eg using JMX? Having the route fired off in this circumstance is also good. For me it is irrelevant what starts/stops the context. Claus Ibsen-2 wrote: I wonder if Quartz got some configuration to fire on startup as well? Dunno. Claus Ibsen-2 wrote: But the notification might be a nicer solution as you get fine grained callbacks and can fire upon camel context started etc. Yes indeed. Very nice. Thanks again! -- View this message in context: http://old.nabble.com/Startup-invocation-of-a-route-tp26949232p26953636.html Sent from the Camel - Users mailing list archive at Nabble.com.
Startup invocation of a route
One thing that has always eluded me is how to specify that something be done immediately upon the CamelContext having started up. For example, I have a Quartz based service that executes every hour at 10 minutes past the hour. However when the CamelContext starts up I'd like this service to be invoked immediately and then go into its scheduling behaviour. This is so that other consumers of the services I provide can get their data immediately without having to wait up to an hour given service startup. Firstly it'd be great if there was an option on the Quartz component to always fire off an initial event. However in general terms it'd be great to have the ability to specify that a route is invoked upon the CamelContext having been established (with all of its routes configured within the current RouterBuilder). Perhaps RouteBuilder needs a new overide-able method that is invoked in this situation. Incidentally I see many references to from(direct:start) throughout the doco and examples, but no idea of how this route is invoked. Thanks for any help in unwinding my confusion. -- View this message in context: http://old.nabble.com/Startup-invocation-of-a-route-tp26949232p26949232.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Startup invocation of a route
Hi Stephen, Thanks for your response. I do understand the use of the direct component, but thanks for the explanation any how. I guess using the Spring Events mechanism will get me there, but it'd be nice to codify the solution in a way that remains agnostic of being invoked from Spring. I'm thinking that it'd be useful to raise a JIRA so that RouteBuilder gets the opportunity of kicking things off once the context is ready. What'd think? BTW: I do not have a Main class as I'm using org.apache.camel.spring.Main. Kind regards, Christopher -- View this message in context: http://old.nabble.com/Startup-invocation-of-a-route-tp26949232p26950280.html Sent from the Camel - Users mailing list archive at Nabble.com.
IllegalStateException, folder not open on pop3 mail uri
I think that this problem may still be around with 2.1-SNAPSHOT: http://fusesource.com/forums/thread.jspa?threadID=746tstart=0 I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open. Here's when the outage started. 2009-11-26 11:57:55,316 [: MailComponent] WARN ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed javax.mail.MessagingException: Connect failed; nested exception is: java.net.NoRouteToHostException: No route to host at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161) at javax.mail.Service.connect(Service.java:288) at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.NoRouteToHostException: No route to host at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189) at com.sun.mail.pop3.Protocol.(Protocol.java:94) at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214) at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157) ... 13 more This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp. I then get the following message every time I poll the server and have to re-start my application to get over it: 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer - Folder not open java.lang.IllegalStateException: Folder not open at javax.mail.Folder.getMessages(Folder.java:938) at javax.mail.Folder.search(Folder.java:1226) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Looks as though there might be a bug in the Camel Mail component? Happy to create a JIRA if there is consensus. Kind regards, Christopher -- View this message in context: http://old.nabble.com/IllegalStateException%2C-folder-not-open-on-pop3-mail-uri-tp26525343p26525343.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
IllegalStateException, folder not open on pop3 mail uri
I think that this problem may still be around with 2.1-SNAPSHOT: http://fusesource.com/forums/thread.jspa?threadID=746tstart=0 I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open. Here's when the outage started. 2009-11-26 11:57:55,316 [: MailComponent] WARN ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed javax.mail.MessagingException: Connect failed; nested exception is: java.net.NoRouteToHostException: No route to host at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161) at javax.mail.Service.connect(Service.java:288) at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.NoRouteToHostException: No route to host at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189) at com.sun.mail.pop3.Protocol.(Protocol.java:94) at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214) at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157) ... 13 more This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp. I then get the following message every time I poll the server and have to re-start my application to get over it: 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer - Folder not open java.lang.IllegalStateException: Folder not open at javax.mail.Folder.getMessages(Folder.java:938) at javax.mail.Folder.search(Folder.java:1226) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Looks as though there might be a bug in the Camel Mail component? Happy to create a JIRA if there is consensus. Kind regards, Christopher -- View this message in context: http://old.nabble.com/IllegalStateException%2C-folder-not-open-on-pop3-mail-uri-tp26525346p26525346.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
mail component no folder found problem still around
I think that this problem may still be around with 2.1-SNAPSHOT: http://fusesource.com/forums/thread.jspa?threadID=746tstart=0 I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open. Here's when the outage started. 2009-11-26 11:57:55,316 [: MailComponent] WARN ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed javax.mail.MessagingException: Connect failed; nested exception is: java.net.NoRouteToHostException: No route to host at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161) at javax.mail.Service.connect(Service.java:288) at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.NoRouteToHostException: No route to host at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189) at com.sun.mail.pop3.Protocol.(Protocol.java:94) at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214) at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157) ... 13 more This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp. I then get the following message every time I poll the server and have to re-start my application to get over it: 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer - Folder not open java.lang.IllegalStateException: Folder not open at javax.mail.Folder.getMessages(Folder.java:938) at javax.mail.Folder.search(Folder.java:1226) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Looks as though there might be a bug in the Camel Mail component? Happy to create a JIRA if there is consensus. Kind regards, Christopher -- View this message in context: http://old.nabble.com/mail-component-%22no-folder-found%22-problem-still-around-tp26525359p26525359.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Quartz dependency missing for 1.6.6
Hi Claus, I think that the problem was that I did not have your repo configured as a proxy in Nexus. If I wasn't using Nexus then things probably would have worked straight away. I'll conduct some more tests this morning. However it would still be a good idea to remove that your repo dependency. Kind regards, Christopher -- View this message in context: http://old.nabble.com/Quartz-dependency-missing-for-1.6.6-tp26462662p26467891.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Quartz dependency missing for 1.6.6
Perhaps there's something that I don't understand about Nexus here, but if I use my public-snapshots profile then I see that Maven searches as follows: nexus (http://repo.classactionpl.com:8081/nexus/content/groups/public), nexus-public-snapshots (http://repo.classactionpl.com:8081/nexus/content/groups/public-snapshots) It does not find Quartz. However if I then add the fusesource dependences repo (http://repo.fusesource.com/maven2-all/) to my nexus config as a proxy and then associate the proxy with my public group all is well. I suspect that your Nexus configuration has a proxy configured for fusesource which is why you are not seeing the issue. Kind regards, Christopher -- View this message in context: http://old.nabble.com/Quartz-dependency-missing-for-1.6.6-tp26462662p26470422.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Quartz dependency missing for 1.6.6
Hi guys, I'm attempting to build against the 2.1-SNAPSHOT at the moment and experience: Missing indirectly referenced artifact opensymphony:quartz:jar:1.6.6:compile I see that 1.6.6 is a fairly new release and may not yet have made it to any well known repos. Any advice on this? Kind regards, Christopher -- View this message in context: http://old.nabble.com/Quartz-dependency-missing-for-1.6.6-tp26462662p26462662.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
No asyncSendBodyandHeaders in Camel 2.0?
Hi there, Is there a good reason for there not be an asyncSendBodyandHeaders - the equiv. exists for requesting... Kind regards, Christopher -- View this message in context: http://www.nabble.com/No-asyncSendBodyandHeaders-in-Camel-2.0--tp25749971p25749971.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Aggregator not working for me in 2.0
Many apologies - I found the problem. I thought that I was checking to see if the old exchange was null in my aggregation strategy. I was actually checking the body of the old exchange for null and thus a null pointer exception must have been thrown somewhere. -- View this message in context: http://www.nabble.com/Aggregator-not-working-for-me-in-2.0-tp25202246p25207993.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Camel 2.0 jms producer/consumer log indications around replies and persistence
Hi there, I've just noted something non-intuitive in the Camel 2.0 debug logs that'd be great to have explained. My scenario is that I wish to send out an exchange to a JMS queue endpoint. I require persistence of the exchange by the broker. I do not require a response. Similarly the queue is to receive exchanges and not send back a response. Here is how the producer is defined: .to(ExchangePattern.InOnly, jms-sender:com.classactionpl.saveGPSTrackerCollection) Here is how the consumer is defined: from(jms-receiver:com.classactionpl.saveGPSTrackerCollection) .inOnly() jms-sender and jms-receiver are defined as ActiveMQComponents. From the doco the above should be enough I would have thought. Persistence is provided by default for JMS endpoints. The use of the inOnly exchange pattern should be sufficient to indicate that a reply is not required. However when sending the message the log shows: 2009-08-30 12:24:01,968 [mousIoService-1] DEBUG Configuration$CamelJmsTemplate - Sending JMS message to: queue://com.classactionpl.saveGPSTrackerCollection with message: ActiveMQObjectMessage {commandId = 0, responseRequired = false, messageId = null, originalDestination = null, originalTransactionId = null, producerId = null, destination = null, transactionId = null, expiration = 0, timestamp = 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = false, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.byteseque...@67ce08c7, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {collectionIdentification=urn:x-com-classactionpl-becatech-sentinel-trackers:/cn=Becatech Demo Trackers,dc=becatech,dc=com,ou=tracker-collections,ou=groups,ou=system}, readOnlyProperties = false, readOnlyBody = false, droppable = false} responseRequired = false which is what I would expect. However persistent = false obviously suggests that the exchange will not be persisted by the broker. Is this indeed the case? For the response: 2009-08-30 12:24:02,013 [enerContainer-1] DEBUG EndpointMessageListener - Endpoint[jms-receiver://com.classactionpl.saveGPSTrackerCollection] consumer receiving JMS message: ActiveMQObjectMessage {commandId = 5, responseRequired = true, messageId = ID:Christopher-Hunts-MacBook-Air.local-58232-1251599040542-2:1:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:Christopher-Hunts-MacBook-Air.local-58232-1251599040542-2:1:1:1, destination = queue://com.classactionpl.saveGPSTrackerCollection, transactionId = null, expiration = 0, timestamp = 1251599041968, arrival = 0, brokerInTime = 1251599041969, brokerOutTime = 1251599041992, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.byteseque...@67ce08c7, marshalledProperties = org.apache.activemq.util.byteseque...@51707653, dataStructure = null, redeliveryCounter = 0, size = 4675, properties = {collectionIdentification=urn:x-com-classactionpl-becatech-sentinel-trackers:/cn=Becatech Demo Trackers,dc=becatech,dc=com,ou=tracker-collections,ou=groups,ou=system}, readOnlyProperties = true, readOnlyBody = true, droppable = false} This time I see responseRequired = true (which it isn't) and persistent=true. I'm presuming that the persistent=true is with respect to the response, if there was one, which there isn't. Why though is responseRequired=true? Thank you for helping me understand what Camel is stating. Kind regards, Christopher -- View this message in context: http://www.nabble.com/Camel-2.0-jms-producer-consumer-log-indications-around-replies-and-persistence-tp25208131p25208131.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
cometd vs jetty component
Hi there, I've just discovered the cometd component for Camel 2. Fantastic! However I wonder if the cometd's component interface should be regarded as a superset of the jetty component interface. I realise that the component's implementations may need to be different but I think that their interfaces are strongly related. For example the jetty component's handlers parameter perhaps should also apply to cometd. Implementing a security handler will apply equally to cometd. In addition the SSL configuration mechanisms look a little different. Thoughts? Kind regards, Christopher -- View this message in context: http://www.nabble.com/cometd-vs-jetty-component-tp24916396p24916396.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
multipart/x-mixed-replace and Jetty
Hi there, Has anyone tried streaming server content via the Jetty component and using multipart/x-mixed-replace content types? Indeed is this a viable mechanism to stream content via Camel? Thanks. Christopher -- View this message in context: http://www.nabble.com/multipart-x-mixed-replace-and-Jetty-tp24917059p24917059.html Sent from the Camel - Users mailing list archive at Nabble.com.
Hello community
Traffic appears to have quietened on this forum recently - any known reason why? -- View this message in context: http://www.nabble.com/Hello-community-tp24735480p24735480.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: JMS publish consuming sockets?
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.
JMS publish consuming sockets?
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): lt;bean id=activeMQConnectionFactory class=org.apache.activemq.ActiveMQConnectionFactorygt; lt;property name=brokerURL value=${com.classactionpl.asterixservices.brokerurl} /gt; lt;/beangt; lt;bean id=activemq-receiver class=org.apache.activemq.camel.component.ActiveMQComponentgt; lt;property name=connectionFactory ref=activeMQConnectionFactory /gt; lt;/beangt; lt;bean id=activemq-sender class=org.apache.activemq.camel.component.ActiveMQComponentgt; lt;property name=connectionFactorygt; lt;bean class=org.apache.activemq.pool.PooledConnectionFactorygt; lt;constructor-arg ref=activeMQConnectionFactory /gt; lt;/beangt; lt;/propertygt; lt;/beangt; 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.
Continuations and direct components
Hi there, Given the following code: from(jetty:http://0.0.0.0:9000/myurl;) .inOut(direct:getSomething); Will a jetty continuation become suspended and thus release its thread while direct:getSomething does its work, and then become active once direct:getSomething replies? I'm hoping that the above will permit thousands of connections while consuming a minimal number of threads. Thanks for any confirmations. Kind regards, Christopher -- View this message in context: http://www.nabble.com/Continuations-and-direct-components-tp24070560p24070560.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Avoiding type conversions with the direct component
Hi there, Quick (probably dumb) question. I'm looking to avoid a type conversion while using the direct: component. I've been of the opinion that using the direct: component is a nice way to break up my routes into nicely separated chunks. However I now find that sending a body with one of my (large) POJOs takes several seconds. Having profiled things I see that there is a NoTypeConversionAvailableException and then the stack trace shows that the object is being converted to a string, which then goes on to call a lot of JSON code I have. Here's a sample of the stack trace: ... com.classactionpl.gml.Feature.toString() java.lang.String.valueOf(Object) java.lang.StringBuilder.append(Object) org.apache.camel.NoTypeConversionAvailableException.(Object, Class) org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(Class, Exchange, Object) org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(Class, Exchange, Object) org.apache.camel.impl.MessageSupport.getBody(Class, Object) org.apache.camel.impl.MessageSupport.getBody(Class) org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, AsyncCallback) org.apache.camel.processor.DeadLetterChannel.process(Exchange, AsyncCallback, DeadLetterChannel$RedeliveryData) org.apache.camel.processor.DeadLetterChannel.process(Exchange, AsyncCallback) org.apache.camel.processor.Pipeline.process(Exchange, Exchange, AsyncCallback, Iterator, AsyncProcessor) org.apache.camel.processor.Pipeline.process(Exchange, AsyncCallback) org.apache.camel.management.InstrumentationProcessor.process(Exchange, AsyncCallback) org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(Exchange, AsyncCallback) org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, AsyncCallback) org.apache.camel.processor.UnitOfWorkProcessor.process(Exchange, AsyncCallback) org.apache.camel.component.direct.DirectProducer.process(Exchange, AsyncCallback) org.apache.camel.processor.SendProcessor.process(Exchange, AsyncCallback) org.apache.camel.management.InstrumentationProcessor.process(Exchange, AsyncCallback) org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(Exchange, AsyncCallback) org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, AsyncCallback) org.apache.camel.processor.DeadLetterChannel.process(Exchange, AsyncCallback, DeadLetterChannel$RedeliveryData) org.apache.camel.processor.DeadLetterChannel.process(Exchange, AsyncCallback) org.apache.camel.processor.Pipeline.process(Exchange, Exchange, AsyncCallback, Iterator, AsyncProcessor) org.apache.camel.processor.Pipeline.process(Exchange, AsyncCallback) org.apache.camel.management.InstrumentationProcessor.process(Exchange, AsyncCallback) org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(Exchange, AsyncCallback) org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, AsyncCallback) org.apache.camel.processor.UnitOfWorkProcessor.process(Exchange, AsyncCallback) org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessor, Exchange) org.apache.camel.processor.DelegateAsyncProcessor.process(Exchange) org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(Exchange) org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(JobExecutionContext) org.apache.camel.component.quartz.CamelJob.execute(JobExecutionContext) org.quartz.core.JobRunShell.run() org.quartz.simpl.SimpleThreadPool$WorkerThread.run() Any recommendations on how I should avoid this conversion? Kind regards, Christopher -- View this message in context: http://www.nabble.com/Avoiding-type-conversions-with-the-direct-component-tp24053271p24053271.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: throwFault deprecated - what is the equivalent for 1.x?
Thanks Claus. I presume you meant: .setFaultBody(constant(Unknown notification sent by fingerprint reader)) -- View this message in context: http://www.nabble.com/throwFault-deprecated---what-is-the-equivalent-for-1.x--tp23717019p23717251.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: throwFault deprecated - what is the equivalent for 1.x?
I presume that setFaultBody has the same behaviour as throwFault right? My goal is to throw an exception and have the message got to the dead letter channel for retry processing. Thanks again. -- View this message in context: http://www.nabble.com/throwFault-deprecated---what-is-the-equivalent-for-1.x--tp23717019p23717295.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: 1.6.1 spring namespace confusion
I shall update the wiki to reflect this situation unless there are objections. -- View this message in context: http://www.nabble.com/1.6.1-spring-namespace-confusion-tp23716403p23716923.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
throwFault deprecated - what is the equivalent for 1.x?
Hi there, Now that throwFault has been deprecated in 1.6.1, what should I be using to avoid strike throughs and warnings in my pretty code. :working: Christopher -- View this message in context: http://www.nabble.com/throwFault-deprecated---what-is-the-equivalent-for-1.x--tp23717019p23717019.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: throwFault deprecated - what is the equivalent for 1.x?
Hi Claus, There is a setFaultBody and a setFaultHeader but I am not sure of how to use these in place of throwFault. Do you have an example? Here's what I presently do: ... .otherwise() .throwFault( Unknown notification sent by fingerprint reader); Thanks for your time. Kind regards, Christopher -- View this message in context: http://www.nabble.com/throwFault-deprecated---what-is-the-equivalent-for-1.x--tp23717019p23717157.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: LDAP producers and re-entrancy
JIRA now raised: https://issues.apache.org/activemq/browse/CAMEL-1583 I shall write the patch very shortly. -- View this message in context: http://www.nabble.com/LDAP-producers-and-re-entrancy-tp23266701p23344787.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: LDAP producers and re-entrancy
Hi there, Any comments? I'm thinking that I'll patch the ldap component so that it obtains the context and closes it within the process method each time. Thoughts? Kind regards, Christopher -- View this message in context: http://www.nabble.com/LDAP-producers-and-re-entrancy-tp23266701p23342889.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: HTTPS - help required
Hi there, Having found the need to be able to configure JAAS for my Camel Jetty component I made some changes on my system to JettyHttpComponent and JettyHttpEndpoint. These changes allow you to submit a Jetty Handler e.g. a security handler by referring to a handler bean in the Jetty URI e.g.: jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler In my spring config, securityHandler is then defined as: lt;!-- Jetty Security handling --gt; lt;bean id=userRealm class=org.mortbay.jetty.plus.jaas.JAASUserRealmgt; lt;property name=name value=tracker-users /gt; lt;property name=loginModuleName value=ldaploginmodule /gt; lt;property name=roleClassNames value=com.classactionpl.jaas.UserGroup /gt; lt;/beangt; lt;bean id=constraint class=org.mortbay.jetty.security.Constraintgt; lt;property name=name value=BASIC /gt; lt;property name=roles value=tracker-users /gt; lt;property name=authenticate value=true /gt; lt;/beangt; lt;bean id=constraintMapping class=org.mortbay.jetty.security.ConstraintMappinggt; lt;property name=constraint ref=constraint /gt; lt;property name=pathSpec value=/* /gt; lt;/beangt; lt;bean id=securityHandler class=org.mortbay.jetty.security.SecurityHandlergt; lt;property name=userRealm ref=userRealm /gt; lt;property name=constraintMappings ref=constraintMapping /gt; lt;/beangt; Would there be general interest in this capability? If so then I'm happy to raise a JIRA and contribute the code. I've actually got everything above working. Kind regards, Christopher -- View this message in context: http://www.nabble.com/HTTPS---help-required-tp20932280p23270820.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
LDAP producers and re-entrancy
Hi there, I was just playing around a bit more with the ldap component (I will write up that doco Claus!) and noticed that there is just one directory context being used per producer. I would have thought that a single producer instance be used by multiple threads... is this not the case? For example can the process method be invoked concurrently? If so then there's a problem - JNDI contexts are not thread-safe. Thanks for any clarifications. Kind regards, Christopher -- View this message in context: http://www.nabble.com/LDAP-producers-and-re-entrancy-tp23266701p23266701.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Naming JMX artifacts from Java DSL
Hi Claus, .id would have been great - however it is deprecated and not part of v2. Kind regards, Christopher -- View this message in context: http://www.nabble.com/Naming-JMX-artifacts-from-Java-DSL-tp22986330p23033229.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Storing context with exchanges
Thanks Claus - looks as though I'll have to wait for v2.0. -- View this message in context: http://www.nabble.com/Storing-context-with-exchanges-tp23017939p23033262.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Naming JMX artifacts from Java DSL
Hi Claus, Yes, .id does exactly what I need. I think it is a useful method to keep as JMX is almost unusable without it - you have to trawl so many nodes In fact, I'd go as far as stating that I wouldn't bother creating a JMX node unless the programmer identifies it. If the node is important to them then they'll take a few seconds to name it... Perhaps the same for endpoints, processors etc... What'd think? Kind regards, Christopher -- View this message in context: http://www.nabble.com/Naming-JMX-artifacts-from-Java-DSL-tp22986330p23033407.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Naming JMX artifacts from Java DSL
https://issues.apache.org/activemq/browse/CAMEL-1528 -- View this message in context: http://www.nabble.com/Naming-JMX-artifacts-from-Java-DSL-tp22986330p23033545.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Storing context with exchanges
I have two routes (A B) that are in-out in nature. The client calls on A, A calls on B and then the reply is sent back from B to A and then back to the client. I'd like to store some context information relating to the client interaction with A and then have that available when B replies to A. A should know nothing of this context. Is there a way of matching an exchange received from B with the original exchange sent to A? Kind regards, Christopher -- View this message in context: http://www.nabble.com/Storing-context-with-exchanges-tp23017939p23017939.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Router Blocked by full Destination Route Queue
Can you please provide the route's specification in code or XML. This will give us a better chance of answering your question. Having said that, sounds like you've got an internal seda queue... I would have thought that an exception would be thrown once the queue becomes full. By default a seda queue can only hold 1000 items. If it is a JMS queue, then would setting the time to live option be useful to you? -- View this message in context: http://www.nabble.com/Router-Blocked-by-full-Destination-Route-Queue-tp22981898p22986139.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Camel as a web server or Camel as part of a web server?
Hey there, Does anyone have thoughts on using a stand-alone Camel application as a web server, or do people generally prefer packaging the Camel application in a WAR file? My use-case is that I have a web service provided by Camel and using the jetty component. This works nicely. However I want to serve up some static resources associated with the web service. The only way I have found to do this is by creating a producer for every static resource to be provided e.g.: my web service: jetty:http://0.0.0.0:9080/GPSTrackerCollectionService/GPSTrackerCollection/gpsTrackers/GPSTracker/history one (of the many) associated resources: jetty:http://0.0.0.0:9080/GPSTrackerCollectionService/GPSTrackerCollection/gpsTrackers/GPSTracker/styles.kml Kind regards, Christopher -- View this message in context: http://www.nabble.com/Camel-as-a-web-server-or-Camel-as-part-of-a-web-server--tp22922660p22922660.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Camel as a web server or Camel as part of a web server?
Great! Just what I was looking for! Thanks to both of you. On a side note for those who are interested in an example of serving up static resources in 1.x: from( jetty:http://0.0.0.0:9080/images/plotdot9-ls.png;) .to(direct:getPNG); from( jetty:http://0.0.0.0:9080/images/plotdot9.png;) .to(direct:getPNG); from(direct:getPNG).process(new Processor() { public void process(Exchange exchange) throws Exception { HttpExchange httpExchange = (HttpExchange) exchange; String uri = httpExchange.getRequest().getRequestURI(); int fileLocn = uri.lastIndexOf('/'); String filename = uri.substring(fileLocn); exchange.getOut().setHeader(Content-Type, image/png); exchange.getOut().setBody( this.getClass().getResourceAsStream( /images + filename)); } }); Claus Ibsen-2 wrote: Just a side note. There should be a new option in Camel 2.0 - matchOnUriPrefix that can allow you to match wildcard URIs. -- View this message in context: http://www.nabble.com/Camel-as-a-web-server-or-Camel-as-part-of-a-web-server--tp22922660p22924385.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Mutual SSL authentication with Camel applications
Hi Claus, Thanks for your reply. I forgot that I made this posting otherwise I would have sent through an update. I did post to the AMQ forum and then discovered for myself what the problem was - the java client consuming the services needed authenticated access to its keystore. I'm going to write a blog entry on securing AMQ very shortly as it is a thinly covered topic which I think I now have experienced pretty well. Kind regards, Christopher -- View this message in context: http://www.nabble.com/Mutual-SSL-authentication-with-Camel-applications-tp22490614p22554822.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Mutual SSL authentication with Camel applications
Here's the promised blog entry: http://christopherhunt-software.blogspot.com/2009/03/mutual-ssl-authentication-and-ldap.html -- View this message in context: http://www.nabble.com/Mutual-SSL-authentication-with-Camel-applications-tp22490614p22558460.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Mutual SSL authentication with Camel applications
By the way, here are some of the things I'm observing when attempting mutual authentication: 1. Wireshark shows: Client Hello Server Hello, Certificate, Certificate Request, Server Hello Done Certificate, Client Key Exchange Alert (Level: Fatal, Description: Bad Certificate) If I look at the Certificate, Client Key Exchange in detail I see in the Handshake Protocol: Certificate that the Certificates Length is 0. 2. ActiveMQ shows in its log: ERROR TransportConnector - Could not accept connection : null cert chain I'm presuming that this is because the client has not passed its certificate. I hope that these are useful observations. -- View this message in context: http://www.nabble.com/Mutual-SSL-authentication-with-Camel-applications-tp22490614p22491057.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Is Mina custom codec overriding text line codec
Having delved into MinaComponent.java, I see that a configuration is copied on the creation of an endpoint i.e. MinaConfiguration config = configuration.copy(); on line 81. This configuration is created on instantiating the mina component (that should be just once right?). I'm guessing that for every Mina endpoint expressed as: from(mina:...)... there's a corresponding Endpoint instance created from that one component. Of course with Mina, one instance of an acceptor can host many socket connections. Perhaps with other transports this is not the case and that copying the configuration makes sense. However with Mina I am not sure that copying the configuration buys you much... perhaps we should instantiate the configuration each time instead of copying. That way, we're not going to carry forward previous configurations that are not applicable. Maybe I have this wrong and apologies if so. 'hope that my investigations help. Kind regards, Christopher -- View this message in context: http://www.nabble.com/Is-Mina-custom-codec-overriding-text-line-codec-tp22176938p22178853.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: Is Mina custom codec overriding text line codec
One more contribution, and then I'll let someone else have a turn... As a work-around, if I specify the codec parameter with no value then all is well e.g.: mina:tcp://0.0.0.0:8201?codectextline=truetextlineDelimiter=WINDOWSsync=falseminaLogger=true -- View this message in context: http://www.nabble.com/Is-Mina-custom-codec-overriding-text-line-codec-tp22176938p22178979.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Is Mina custom codec overriding text line codec
Hi there, I think I may have found a problem: mina:tcp://0.0.0.0:8201?textline=truetextlineDelimiter=WINDOWSsync=falseminaLogger=true If I use the above while having already registered some other Mina endpoints that have their own codec, I think that the text line options become confused. In fact if I set a breakpoint in a previously registered codec then I find that the codec's decoder is invoked when I send stuff to port 8201... I've ran out of time to experiment further with this today. Meanwhile if there are any thoughts on this potential issue then please feel free to air them. %-| Kind regards, Christopher -- View this message in context: http://www.nabble.com/Is-Mina-custom-codec-overriding-text-line-codec-tp22176938p22176938.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Mina consuming endpoint with sync - how to override?
Hi there, I have a consuming mina: endpoint with sync=true set on it. In my use case I have some messages coming in that require a response, and some that do not. Unfortunately where I do not want to return a message Camel is still expecting that I should and throws an ExchangeTimedOutException. How can I tell Camel that despite stating sync=true, for a given exchange it should not expect a response? I have tried a few things including the invocation of a Processor that closes the Mina session after the InOnly endpoint (exchange.getSession().close()). Here's my route currently: from( mina:tcp://0.0.0.0:11010?codec=ilvCodecFactoryamp;lazySessionCreation=trueamp;sync=true) .choice().when(body().isNotNull()).to( direct:logFingerprintEvent).otherwise() .throwFault( Unknown notification sent by fingerprint reader); from(direct:logFingerprintEvent) .choice() .when(body().isInstanceOf(ControlOKEvent.class)) .to( activemq-sender:queue:...?exchangePattern=InOut) .when(body().isInstanceOf(ControlFailedEvent.class)) .to( activemq-sender:queue:...?exchangePattern=InOnly) .otherwise() .throwFault( Unhandled notification sent by fingerprint reader); Thanks for any help. Kind regards, Christopher -- View this message in context: http://www.nabble.com/Mina-consuming-endpoint-with-sync---how-to-override--tp21845069s22882p21845069.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: understanding SEDA and Thread processor
I think that what you're looking for is something akin to the concurrentConsumers parameter for a JMS endpoint. My recommendation is to raise a JIRA request for an enhancement so that the SEDA endpoint can receive a concurrentConsumers parameter. After all seems to me that using SEDA is a poor-mans JMS endpoint. Anyone agree/disagree? -- View this message in context: http://www.nabble.com/understanding-SEDA-and-Thread-processor-tp21612576s22882p21817985.html Sent from the Camel - Users mailing list archive at Nabble.com.