session manage

View: New views
7 Messages — Rating Filter:   Alert me  

session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello,everybody.

      I need your help about session managing at the sever side.

      the case is like that, a browser send a request to the mule ESB whichi is running in a tomcat so how I judge the request is form the same browser?

from the code   "(RequestContext.getEventContext()).getSession().getId()"   , we can found the session id always chaged after every request from the same browser.

     I will preciate for your answer.  :)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't think the mule session is a javax.servlet.http.HttpSession. Afaik is a session context that spans only one request.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks for replying me.  :)

After reading the src, I find the mule session is not  javax.servlet.http.HttpSession. But I need to know whether the request is from the same client or application.

How should I do?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The cleanest solution is to let the client or application pass on some kind of identifier as part of your message payload or as a message header.

Are you interacting with mule directly from your browser? So is Mule returning HTML content, or from javascript within a web page? Please explain a little bit more what you are trying to do.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes,I want to make browser interact with mule directly. Mule is returning HTML content ,and the request can be transport
by  ajax object.

      Thanks for your suggestion about the message identifier.  I have want to take the method as my the last way to solve the  
problem too. But I want to know if there is more easy way to figure out this problem.
 
     I find that the HttpRequestMessageAdapter have the method of "getRequest",  But  other kind of message adapter have no the similar method,like HttpMessageAdapter.  

      If the HttpMessageAdapter also have the method, it will make it easy.

thank you again.  :)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Personally I would not recommend this. Mule was not designed for this, web applications containers are (and support http session). Why not use a more common setup:


client --> web app --> esb --> service impl

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: session manage

by Gerwin Postma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your timely answer.

I think it is a good idea.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email