glassfish
  1. glassfish
  2. GLASSFISH-15809

JSF PhaseListener executed for each virtual host

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v3.0.1
    • Fix Version/s: 3.1.1_b01
    • Component/s: jsf
    • Labels:
      None
    • Environment:

      We're running GlassFish 3.0.1 with JSF 2.1.0b11 on Windows 2007/7 64-bit.

      Description

      We recently spend 2 months changing from JSF 1.2 to 2.0 and GlassFish 2 to 3.0.1. When we were finish with the conversion and ready to go live, we realised that JSF and virtual servers doesn't work together at all on GlassFish 3.0.1 with JSF 2.0. Luckily, this happened on January 27, 2011, the same day that JSF 2.1.0b11 became available with this fix included: http://java.net/jira/browse/GLASSFISH-11984. Otherwise we would have been completely screwed.

      However, it didn't take many hours online, before we realised that something was horrible wrong. We have 6 virtual servers in addition to the default. We can't run with less than that. The problem is that all of our PhaseListeners are now executed one time per virtual server for a total of 7 times per request. And not just ours. PhaseListeners included in other projects, such as PrettyFaces, as well.

      The problem has forced us to roll back to GF 2 and our 2 months old code once again.

      1. 20110217-1558-i_gf_15809.patch
        31 kB
        Ed Burns
      2. 20110222-1610-i_gf_15809.patch
        23 kB
        Ed Burns
      3. i_gf_15809-workaround.txt
        12 kB
        Ed Burns

        Issue Links

          Activity

          Hide
          bjornstenfeldt added a comment -

          I'm finding it rather frustrating that I'm now getting around 1000 lines of "Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match." in my log, every single second. Maybe a context-param in web.xml to disable this warning?

          Show
          bjornstenfeldt added a comment - I'm finding it rather frustrating that I'm now getting around 1000 lines of "Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match." in my log, every single second. Maybe a context-param in web.xml to disable this warning?
          Hide
          Ed Burns added a comment -

          Hello Björn,

          I am sincerely sorry for your frustration.

          Is it acceptable to request that you modify your logging configuration, as described in <http://wikis.sun.com/display/GlassFish/JavaServerFacesRI#JavaServerFacesRI-HowcanIturnonlogging%3F> to prevent that logging message from being displayed?

          Specifically, modify your logging.properties like this:

          — logging.properties 2011-07-19 21:42:46.000000000 -0400
          +++ logging_GLASSFISH-15809.properties 2011-09-26 11:40:23.000000000 -0400
          @@ -113,3 +113,4 @@
          javax.enterprise.system.ssl.security.level=INFO
          ShoalLogger.level=CONFIG
          org.eclipse.persistence.session.level=INFO
          +javax.faces.level=INFO

          Does that help?

          Show
          Ed Burns added a comment - Hello Björn, I am sincerely sorry for your frustration. Is it acceptable to request that you modify your logging configuration, as described in < http://wikis.sun.com/display/GlassFish/JavaServerFacesRI#JavaServerFacesRI-HowcanIturnonlogging%3F > to prevent that logging message from being displayed? Specifically, modify your logging.properties like this: — logging.properties 2011-07-19 21:42:46.000000000 -0400 +++ logging_ GLASSFISH-15809 .properties 2011-09-26 11:40:23.000000000 -0400 @@ -113,3 +113,4 @@ javax.enterprise.system.ssl.security.level=INFO ShoalLogger.level=CONFIG org.eclipse.persistence.session.level=INFO +javax.faces.level=INFO Does that help?
          Hide
          bjornstenfeldt added a comment -

          It will definitely fix it (javax.faces.level=SEVERE), but I worry that it might disables a lot of other information or warnings too, which is why I've been hesitating to use this method.

          Show
          bjornstenfeldt added a comment - It will definitely fix it (javax.faces.level=SEVERE), but I worry that it might disables a lot of other information or warnings too, which is why I've been hesitating to use this method.
          Hide
          Ed Burns added a comment -

          I can assure you that even though a logger such as javax.faces seems very "low level", there are very few log messages controlled by that logger. The vast majority of JSF related log messages are in the javax.enterprise.resource.webcontainer.jsf and sub loggers.

          Show
          Ed Burns added a comment - I can assure you that even though a logger such as javax.faces seems very "low level", there are very few log messages controlled by that logger. The vast majority of JSF related log messages are in the javax.enterprise.resource.webcontainer.jsf and sub loggers.
          Hide
          bjornstenfeldt added a comment -

          Alright, I'll give it a chance.

          Show
          bjornstenfeldt added a comment - Alright, I'll give it a chance.

            People

            • Assignee:
              Ed Burns
              Reporter:
              bjornstenfeldt
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: