Re: Few queries about camel

2009-02-03 Thread Claus Ibsen
On Tue, Feb 3, 2009 at 12:41 PM, Nivetha Shri nivis...@gmail.com wrote:
 Hi All
 Will camel support only xml messages or will it support object messages
 too?
Yes in Camel message payloads can be anything.

Exchange.setBody(Object body)



 Will camel support routing to components on different machines?
Yes some of the components can send/receive data over the network.
- camel-jms
- camel-mina
- camel-http
- camel-rmi
- camel-cxf
and many more




 Can someone provide me the links which explains on these two topics.
 Any help will be really of great use.
Check out the documentation, and see some of the examples and tutorials
http://camel.apache.org/tutorials.html
http://camel.apache.org/examples.html

And maybe the FAQ:
http://camel.apache.org/faq.html



 Thanks and Regards
 Nivi Shri




-- 
Claus Ibsen
Apache Camel Committer

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


Re: understanding SEDA and Thread processor

2009-02-03 Thread huntc

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.



Re: restlet response content type and return code

2009-02-03 Thread nojonojo

I'll go so far as to suggest a change that would enable both of these.  In
the DefaultRestletBinding class, the populateRestletResponseFromExchange
method could start like this:

public void populateRestletResponseFromExchange(Exchange exchange,

Response response) {

Object body = exchange.getOut().getBody();

MediaType mediaType = null;

String contentType = (String) exchange.getOut().getHeader(
CONTENT_TYPE_HEADER);

if (contentType != null) {
mediaType = MediaType.valueOf(contentType);
}

if (mediaType == null) {
  if (body instanceof String) {

  mediaType = MediaType.TEXT_PLAIN;

  } else if (body instanceof StringSource || body instanceof 
DOMSource)
  {

  mediaType = MediaType.TEXT_XML;

  }
}

String responseCodeHeader = (String) 
exchange.getOut().getHeader(
RESPONSE_STATUS_CODE_HEADER);

if (responseCodeHeader != null) {
response.setStatus(Status.valueOf(Integer
.parseInt(responseCodeHeader)));
}

... (rest of method is as before)

In this case, headers could be set that would indicate what content type /
status code to use, and the current behavior would be retained if not
specified.


nojonojo wrote:
 
 
 Is there a way to set the content type and return code on the response
 sent by the Restlet component?  Looking at the code, it's clear that the
 answer is no for the content type - you get either text/plain or
 text/xml (no chance for application/JSON or anything else user-defined).
 
 Thanks.
 
 Nolan
 

-- 
View this message in context: 
http://www.nabble.com/restlet-response-content-type-and-return-code-tp21819209s22882p21820115.html
Sent from the Camel - Users mailing list archive at Nabble.com.