4 Replies Latest reply on Mar 20, 2009 8:01 AM by nickarls

    Administrative View to see all sessions running in Seam Container

      Has anyone got or knows of either code or a componenet that can be added to a seam application that would allow an admin to view all sessions in a seam container. Something like in seam.debug.

        • 1. Re: Administrative View to see all sessions running in Seam Container
          kellyrob

          I keep a facelets view for debugging that includes simple tabular output like the following:


                          <rich:dataTable
                                  value="#{org.jboss.seam.core.contexts.applicationContext.names}"
                                  var="name">
                              <h:column>
                                  <f:facet name="header">Component Name</f:facet>
                                  #{name}
                              </h:column>
                              <h:column>
                                  <f:facet name="header">Component</f:facet>
                                  #{org.jboss.seam.core.contexts.applicationContext.get(name)}
                              </h:column>
                          </rich:dataTable>
          



          When I need to debug a page i just hot deploy with my debugTools.xhtml as an include. Primitive, but it works and with hot deploy it's easy to expose whatever context variables you need.
          Hope that helps.


          • 2. Re: Administrative View to see all sessions running in Seam Container

            Hey Thanks for this code!


            I tried it out and got a lot of good information. However, I am still looking for a way to view ALL sessions in a seam container. This code can be used to look at the current users session only.


            Any other ideas?




            • 3. Re: Administrative View to see all sessions running in Seam Container
              asgeirf


              I tried it out and got a lot of good information. However, I am still looking for a way to view ALL sessions in a seam container. This code can be used to look at the current users session only.

              Any other ideas?

              Have a look at the wiki example in the Seam distribution (the Seamframework.org application), esp. the org.jboss.seam.wiki.admin package. I've never used this myself, and can't give you any further information about it as I haven't looked at it in detail (simply noticed it the other day), but it might give you some ideas...

              • 4. Re: Administrative View to see all sessions running in Seam Container
                nickarls

                Due to security reasons it's not a good idea that users can automagically view the sessions of other users.


                You could of course add hooks to a session listener that keeps track of them in an application scoped component...