Topic
4 replies Latest Post - ‏2013-01-18T20:24:24Z by joshuad
aandrzej
aandrzej
5 Posts
ACCEPTED ANSWER

Pinned topic WPS 7 HTTP session management

‏2012-12-12T22:15:32Z |
Hello

I want to use XC-10 (ver 2) device as a shared HTPP session store. For my prototype I am using standalone Portal server instance which I augmented with eXtreme Scale Client. I went through XC10_Portal_Integration.pdf avaialble on XC-10 infocenter and applied following configuration:

1) Created session grid on the device
2) Deployed my customm portlet application and configured session mnanagement to use Xc-10 device and session grid
3) Added timeout.resume.session property to WP_ConfigService custom properties.
4) Added XC-10 public key certificate to WPS default trust store.

Problem is that even though I access portal page with my portlet that stores/retrieves data in/from the session I do not see any traffic being shown in monitoring views on XC-10 device for my grid. If I am not mistaked entire Portal session content should be replicated in XC-10 session grid so it is available to other portal server node in the cluster. Is there any way of checking if my grid is even being accessed? I do not see any errors being logged by eXtreme Scale Client. I turned on warning level trace for com.ibm.ws.sx components but I do not see any messages logged there either. I assume the communication between portal server and XC-10 appliance works without problem. I can also create session grids on the device through portal msession mnanagement views. What do I miss?
I am using WPS 7.0.0.2, eXtreme Scale Client 8.5.0.2 and XC-10 (ver 2) with 2.1.2 firmware version.
Updated on 2013-01-18T20:24:24Z at 2013-01-18T20:24:24Z by joshuad
  • joshuad
    joshuad
    3 Posts
    ACCEPTED ANSWER

    Re: WPS 7 HTTP session management

    ‏2012-12-13T15:59:49Z  in response to aandrzej
    The wps and customer portlet both need to be enabled to use the XC10. They can be configured to use the same grid. You do not need to set the timeout.resume.session property, but you do need to make sure the web container custom property "HttpSessionIdReuse=true" is set for each Portal application server. Typically if there are any failures to store session data in the XC10, you will see some exceptions in the application server logs/ffdc. If there's nothing in there, you can enable "session=all" trace on the portal server, restart it, run a request for your portlet, then attach the resulting logs directory from portal and I will take a look.
  • joshuad
    joshuad
    3 Posts
    ACCEPTED ANSWER

    Re: WPS 7 HTTP session management

    ‏2012-12-13T16:00:16Z  in response to aandrzej
    The wps and customer portlet both need to be enabled to use the XC10. They can be configured to use the same grid. You do not need to set the timeout.resume.session property, but you do need to make sure the web container custom property "HttpSessionIdReuse=true" is set for each Portal application server. Typically if there are any failures to store session data in the XC10, you will see some exceptions in the application server logs/ffdc. If there's nothing in there, you can enable "session=all" trace on the portal server, restart it, run a request for your portlet, then attach the resulting logs directory from portal and I will take a look.
  • aandrzej
    aandrzej
    5 Posts
    ACCEPTED ANSWER

    Re: WPS 7 HTTP session management

    ‏2013-01-17T21:43:52Z  in response to aandrzej
    I checked HttpSessionIdReuse property and it is set to true on both servers of the cluster. I have also created simple web application and noticed that one can successfully use remote session data grid. I think my issue comes down to the following. Both of my applications are using JSF 1.2. The one that successfully retrieves and updates remote session grid data accesses HTTP session object directly in JSF backing bean class, like following:

    HttpSession session = (HttpSession) getFacesContext().getExternalContext().getSession(true);
    Enumeration<String> attributeNames = session.getAttributeNames();

    while (attributeNames.hasMoreElements()) {
    String attributeName = attributeNames.nextElement();

    if (attributeName.startsWith("&&&&")) {
    System.out.println("++++ Found in session: " + attributeName);
    }
    }

    The other one defines JSF managed beans and applies session scope to them. Even though they are placed in session scope and they are available across the requests, they are not sent to remote session data grid.

    I wonder if anyone that had experience in implementing JSF 1.2 Portlets and applying XC-10 or eXtreme Scale session management could give me some pointers on implementation approach (e.g. can I/should I overwrite any JSF classes to ensure managed beans in session scope are inserted to remote session data grid, etc)?
    • joshuad
      joshuad
      3 Posts
      ACCEPTED ANSWER

      Re: WPS 7 HTTP session management

      ‏2013-01-18T20:24:24Z  in response to aandrzej
      Without knowing how JSF accesses the session or stores attributes under the covers, it's hard to say why you are having problems with one application but not the other. The way WXS works on the client side is there's a filter that gets added for each web application that has WXS session management enabled. The filter intercepts each time a session is retrieved from the Http request. Finally all attribute updates for that session are detected via session listener, and those updates are sent to the remote grid appropriately. If you are having a problem with your applications, I can take a look at a trace. Stop your application servers, enable "session=all" trace on the appservers, restart, then run a session request to the application that is not working. From the trace, I will have a better idea of what's going on.