[jboss-dev-forums] [Design of POJO Server] - Re: Using AnnotationEnvironment in Seam
pete.muir@jboss.org
do-not-reply at jboss.com
Tue Aug 19 08:39:50 EDT 2008
Here are some questions/comments:
1) We currently only scan artifacts which have seam.properties (or META-INF/seam.properties or META-INF/components.xml). This includes:
* WEB-INF/classes
* Any lib in WEB-INF/lib
* Any lib declared in the manifest
* Any lib declared in the ear (e.g. in lib/, declared as an ejb in application.xml, declared in the manifest)
* Any lib in our parent classloaders
How do we replicate this behaviour?
2) We have other deployment handlers
e.g. org.jboss.seam.deployment.ComponentsXmlDeploymentHandler::handle
public void handle(String name, ClassLoader classLoader)
| {
| if (name.endsWith(".component.xml") || name.endsWith("/components.xml"))
| {
| // we want to skip over known meta-directories since Seam will
| // auto-load these without a scan
| if (!name.startsWith("WEB-INF/") && !name.startsWith("META-INF/"))
| {
| resources.add(name);
| }
| }
|
| }
For this approach to decrease deployment time, we need to not scan at all (or scan a very limited set of files), so can we get this metadata (files, based on their filename) from the MC?
If you want to look at the handlers which are relevant:
* org.jboss.seam.deployment.AnnotationDeploymentHandler (support for users to specify their own annotations to handle, the AnnotationEnv backed version can just be a facade)
* org.jboss.seam.deployment.ComponentDeploymentHandler
* org.jboss.seam.deployment.ComponentsXmlDeploymentHandler
* org.jboss.seam.deployment.DotPageDotXmlDeploymentHandler
* org.jboss.seam.deployment.NamespaceDeploymentHandler
* org.jboss.seam.bpm.PageflowDeploymentHandler
3) For the future, can we add support for metaannotations support? This will make it supereasy to use for WB.
E.g.
public interface AnnotationEnvironment
| {
| ...
| boolean hasClassMetaAnnotatedWith(Class<? extends Annotation> annotation);
|
| // etc.
|
annotationEnvironment.hasClassMetaAnnotatedWith(javax.webbeans.DeploymentType.class);
4) How does it handle exceptions loading classes? Throw them for us to catch?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171248#4171248
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171248
More information about the jboss-dev-forums
mailing list