On 12/12/06, Gary VanMatre <[EMAIL PROTECTED]> wrote:
The Shale Tiger library uses annotations to declare meta-data that in some cases would have been configured using a central XML configuration file. Shale gathers the annotation data at the startup of the application by loading the classes. Some have expressed concern that loading the classes at startup will not scale well with very large web applications.
Two things have happened that can reduce the overhead of this: * Shale only looks at classes in the WEB-INF/classes directory, plus in WEB-INF/lib jar files that have an embedded "META-INF/faces-config.xml" resource. * There's a context init parameter you can use to explicitly list jar files and/or package trees to be scanned, so you can narrow down the efforts. I was wondering if Shale should provide a maven plug-in that scans the
classes before packaging. The Mojo could generate a faces configuration file that is added to the web project before packaging.
That could work for annotated managed beans and JSF components, but won't address the current functionality for things like annotated view controllers. Or, maybe the plug-in could generate a configuration file that listed the
classes containing annotations to process. This would be similar to the JPA out-of-container requirement for entity beans.
Try out the current support by setting context init parameter " org.apache.shale.tiger.SCAN_PACKAGES". The value is a comma delimited list of individual JAR filenames (shale-tiger.jar) and package prefixes ( org.apache.shale.foo). And yes, this *really* needs to be documented :-). Any thoughts?
Gary
Craig