Yea, looking at the code for the sessions stuff in the http conduit, the 
sessionMaintain setting is only read from current message. Thus, that 
requires being able to set properties on the currently dispatching 
message.  The JAX-WS frontend has the 
BindingProvider.getRequestContext() stuff to set those properties.   The 
simple frontend doesn't have any sort of request context or ability to 
pre-set properties on the message.   Thus, it wouldn't work.

The only way to get it to work would be to write a simple interceptor 
that just does:
message.put(Message.MAINTAIN_SESSION, Boolean.TRUE);

and configure that on the outbound chain for the client.

Dan


On Thursday 27 March 2008, Vassilis Virvilis wrote:
> On Thursday 27 March 2008, Glen Mazza wrote:
> > Actually, I didn't realize I had replied to you privately, something
> > is strange with your email account--for a few accounts, including
> > yours, when you hit "reply" it goes not to the list but to just back
> > to the person.
>
> I think that's normal. You need to hit reply-all in order to reply to
> the list and to the person.
> http://www.unicom.com/pw/reply-to-harmful.html
>
> Anyway it *** works *** now. (that is with 2.0.4,
>                still crashes with 2.0.5 see other thread)
>
> I was confused by the fact that
>
>   ClientInterface test = (ClientInterface) context.getBean("Client");
>
> returns the same object every time you called it
> and even if I set the scope to prototype (for the client)
> looks like all the proxy object are using the same client / connection
> aka session.
>
> So I couldn't test the session scope from one java program but I could
> from two or  a java program and a browser.
>
> So the trick is to use tha jaxws frontend (doesn't work with simple
> client frontend) and do
>
> client side:
> ClientInterface test = (ClientInterface) context.getBean("Client");
> ((BindingProvider) test).getRequestContext().put(
>                 BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
>
> along with the scope="session" documented in a previous link in this
> thread.
>
>            .bill



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to