2 Replies Latest reply on May 5, 2011 7:56 AM by aareshchanka

    Seam Debug Mode toggle

    kragoth

      Hey everybody,


      I've been toying with an idea recently that would allow me to toggle the seam debug mode on and off. I am referring to the functionality that allows access to the http://server:port/app/debug.jsf page.


      Preferably I would like to run the PROD system without Seam debug mode turned on purely for performance reasons. However as our system has only just been deployed there are times when being able to access the information provided by the debug page would be quite useful.


      So, I was hoping to be able the toggling on and off of the debug functionality while the server is running.


      I've not been trying to do this for very long so I'm not that far down the path of trying but, am posting here just in case someone else has done the leg work and can tell me their findings and what worked/didn't work.


      So far all I've tried is manually calling


      Init.instance().setDebug(true)
      



      Doing this certainly allowed me to access the debug page however the debug page did not have any of the data I would be expecting.


      All of the contexts were empty and thus the page really contained no information at all. So... No problem, I can figure this out. Sure enough the Seam beans that collect the relevant information for the debug.jsf page are marked as


      @Install(debug=true, ...)
      



      So, of course the components are not being registered in the Seam contexts and thus the EL expressions on the debug.jsf page resolve to null.


      This is pretty much as far as I have made it today. I have a couple of ideas but I'm not sure of the impact or possibility of some of them.


      Is it possible to get Seam to register a component and then deregister it later? If so how and what are some pitfalls I may need to watch out for?


      Any ideas or help will be appreciated.


      Thanks,
      Tim

        • 1. Re: Seam Debug Mode toggle
          ananymous7239

          Click HELP for text formatting instructions. Then edit this text and check the preview.



          Hi Tim,i have a problem with build.xml,i am running my project in production environment,upto now every thing working fine,now i am trying to build in development mode,to get out of restarting a server problem,but when i am trying to run server it is showing the deployment failed exception.if you have any idea about this please help me.

          • 2. Re: Seam Debug Mode toggle
            aareshchanka

            Try to use something like http://www.zeroturnaround.com/liverebel/
            you would be able to change your component config onfly without server restart.