[
https://issues.jboss.org/browse/RF-10259?page=com.atlassian.jira.plugin.s...
]
Jay Balunas commented on RF-10259:
----------------------------------
I think this needs to be done in a separate branch so that changes do not effect
4.0.0.Final release. I think the changes are good, but there are 30+ managed beans, and
being so close to release I'm concerned over collateral damage, and timing.
If you could provide a patch with the changes it might make this a lot easier since it
sounds like you have already done this.
These items would also make a great wiki article up on the RichFaces site.
Richfaces-showcase: GAE start time decreasing
---------------------------------------------
Key: RF-10259
URL:
https://issues.jboss.org/browse/RF-10259
Project: RichFaces
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: examples
Affects Versions: 4.0.0.Milestone6
Reporter: Ara Minosian
Assignee: Jay Balunas
Fix For: 4.Next
I found a way to reduce JSF based application to start faster on GAE.
1. Register all managed beans statically in faces-config.xml
2. Use metadata-complete="true" attribute, so faces-config.xml boilerplate is:
<?xml version='1.0' encoding='UTF-8'?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0"
metadata-complete="true">
<!--Your stuff here-->
</faces-config>
Using this technique you force JSF not to scan classes for beans. You can leave bean
annotations in source code for user's clarity. It will not produce any error.
3. Force JSF not to check xml syntax. I hope IDE do it instead. In web.xml set context
parameter as here:
<context-param>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
</description>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>false</param-value>
</context-param>
Using these tricks I reduce GAE start time by two seconds. Not bad.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira