Re: Prettyfaces causes wep app to hang

Splash Forums PrettyFaces Users Prettyfaces causes wep app to hang Re: Prettyfaces causes wep app to hang

#21227

Hey there! Sorry! Had had a few busy weeks so I didn’t find time to look into this up until now.

I just tried to reproduce this with JBoss AS 7.0.0 but everything seems to work fine. The startup time looks good:

13:10:55,454 INFO  [com.ocpsoft.pretty.PrettyFilter] (MSC service thread 1-4) PrettyFilter starting up...
13:10:55,553 INFO [com.ocpsoft.pretty.PrettyFilter] (MSC service thread 1-4) PrettyFilter initialized.

And accessing a page mapped via PrettyFaces loads very fast.

I can confirm that PrettyFaces rebuild its configuration on every request (with a minimum time span between reload of 2 seconds) when in development mode. So don’t worry if you see many Digester log messages on DEBUG level. This is OK.

The strange issue here is that something during the initialization procedure seems to be very slow in you app. I doubt that it is caused by the parsing. Parsing a few smaller XML files cannot take soooo long. In theory another suspect would be the annotation scanning. You could try to disable this an check if the situation gets better. Just add this to your web.xml:

<context-param>
<param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
<param-value>none</param-value>
</context-param>

Could you perhaps also post your web.xml? Perhaps we find any clue here.

Another option for you would be to do a few thread dumps during the 10 seconds that the PrettyFilter needs to start up. This way we could see what is happening during this time. You could either use jstack for this or perhaps JConsole.