camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: HttpExchange changes to DefaultExchange - expected?
Date Tue, 05 Aug 2008 04:02:07 GMT
Hi

Just mind thought that it is not all transport types (e.g. JMS) that can safely propagate
headers over the wire. So if you send the exchange to a JMS queue and then retrieve it later
from the JMS queue then the HttpSession object is not there anymore. The JMS spec doesn't
allow sending objects as JMS headers.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Claus Ibsen [mailto:ci@silverbullet.dk] 
Sent: 5. august 2008 05:58
To: camel-user@activemq.apache.org
Subject: RE: HttpExchange changes to DefaultExchange - expected?

Hi

Yes you can also store the HttpSession object itself as a property or header on the exchange
itself. When you need it later you can you get it as a HttpSession object

// store it
exchange.getIn().setHeder("session", the http session object);


// later get it
HttpSession myHttpSession = exchange.getIn().getHeader("session", HttpSession.class);



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Bela Vizy [mailto:magyardude@yahoo.com] 
Sent: 5. august 2008 00:25
To: camel-user@activemq.apache.org
Subject: RE: HttpExchange changes to DefaultExchange - expected?


André,


alu wrote:
> 
> However, I want to call exchange.getResponse().encodeURL(...) to encode a
> URL that includes the session ID. So it's not just the session ID that
> needs propagating, my endpoint really want access to the session context
> through an HttpExchange instance... Is this possible in those subsequent
> Processors, or should I try a complete different design direction?
> 

It sounds you want to respond to a form submission from a browser. Camel is
no a web server. It's a messaging system. I don't think there is a reason to
maintain sessions either with url rewriting or cookies for that matter, but
if you really need it, you have full control over the response headers,
basically whatever you set as an output header will go into the response
(with exceptions you can define). 

Bela
-- 
View this message in context: http://www.nabble.com/HttpExchange-changes-to-DefaultExchange---expected--tp18809523s22882p18821081.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message