Search code examples
jsflog4jseam

Seam starting Context a few times a second even idle


i just want to know if this is a normal behavior. I have roughly two times a second a new context instantiated with no one accessing the server 24/7 ..

13:17:27,217 INFO  [Contexts] starting up: org.jboss.seam.security.ruleBasedPermissionResolver
13:17:27,218 INFO  [Contexts] starting up: org.jboss.seam.security.identity
13:17:27,218 INFO  [Contexts] starting up: org.jboss.seam.web.session
13:17:27,713 INFO  [Contexts] starting up: org.jboss.seam.security.ruleBasedPermissionResolver
13:17:27,713 INFO  [Contexts] starting up: org.jboss.seam.security.identity
13:17:27,713 INFO  [Contexts] starting up: org.jboss.seam.web.session

So should i adjust the log to warn for seam or is there something wrong?

thx


Solution

  • I listed only the requests to the page. If only static resources were accessed it wasn't in the jboss log.

    In the jboss-seam.jar the class IdentityRequestWrapper or IdentityWrapper (depending on the seam version) i replaced

    identity = (Identity) request.getSession().
         getAttribute(Seam.getComponentName(Identity.class));
    

    with

    HttpSession session = request.getSession(false);
    if(session != null){
    identity = (Identity) session.
         getAttribute(Seam.getComponentName(Identity.class));
    }
    

    the sessions are no longer created for static content