Hi,
On Wed, May 23, 2012 at 5:33 AM, Jeff Nuss <
jeff...@gmail.com> wrote:
> I've looked all over and haven't been able to find a clear answer to this
> question. Using the Java cometd library (not javascript), how can I add a
> request header to each Bayuex message that gets sent? In the javascript
> library, you can use cometd.config and pass it the configuration params as
> seen here:
http://cometd.org/documentation/cometd-javascript/configuration
> Also, this post mentions overriding the customize method on
> LongPollingTransport:
>
https://groups.google.com/forum/?fromgroups#!topic/cometd-users/-Mvdu1wOFq4
> However, it doesn't seem apparent to me how overriding this method helps.
>
> protected void customize(ContentExchange arg0) {
>
> arg0.addRequestHeader(Constants.MSB_HEADER_SESSIONID, sessionId);
>
> // super.customize(arg0);
>
> // }
That is exactly the way to do it.
You have to call super.customize() so that cookies are handled
properly, then you can add the headers you want.
Simon
--
http://cometd.org
http://intalio.com
http://bordet.blogspot.com
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz