4 Replies Latest reply on Mar 5, 2004 11:26 AM by Andrew Oswald

    Delay HTTP access until web app full deployed

    Bruce Wilson Newbie

      I'm using JBoss 3.0.7 with Jetty...

      Is there some way to disable HTTP access to any
      content until a web application is fully finished
      deploying ?

      What I'm finding is that I can access web pages, JSPs, etc
      in my web app very soon after it starts deploying in
      JBoss. But I'm initializing some background data in a
      servlet that's loaded on startup, and I'm finding that
      people can access JSPs before this data is finished
      being initialized, causing NullPointerExceptions and
      other nastiness. So I'd like to be able to disallow access
      to the JSPs until this initialization is done (and I'd like
      to avoid having to put checks all over my code on some
      kind of "initialized" flag).

      I tried to do the simple (dumb) thing, making the
      jbossweb MBean "depend" on the MBean for the WAR
      file that's being deployed, but (as I expected) this
      is a circular dependency - it's jbossweb
      that deploys the WARs in the first place.

      Thanks in advance for any advice,