"alesj" wrote : A piece I forgot to mention:
|
| | Index: server/src/main/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
| | ===================================================================
| | --- server/src/main/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
(revision 76315)
| | +++ server/src/main/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
(working copy)
| | @@ -70,12 +70,11 @@
| |
| | import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
| | import org.jboss.deployers.spi.annotations.Element;
| | -import org.jboss.deployers.spi.deployer.DeploymentStages;
| | import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
| | import org.jboss.virtual.VirtualFile;
| |
| | /**
| | - * A PRE_REAL deployer which generates metadata from annotations.
| | + * A POST_CLASSLOADER deployer which generates metadata from annotations.
| | * Alternative option to its super class.
| | *
| | * @author Ales.Justin(a)jboss.org
| | @@ -89,7 +88,6 @@
| | public AltAnnotationMetaDataDeployer()
| | {
| | super();
| | - setStage(DeploymentStages.PRE_REAL);
| | setInput(AnnotationEnvironment.class);
| | // add annotations AnnotationMetaDataDeployer scans
| | addAnnotationClass(Stateful.class);
| | @@ -142,7 +140,12 @@
| |
| | Set<Class<?>> classes = new HashSet<Class<?>>();
| | for(Class<? extends Annotation> annotation : annotationOnClass)
| | - classes.addAll(env.classIsAnnotatedWith(annotation));
| | + {
| | + Class<Annotation> annotationClass =
(Class<Annotation>)annotation;
| | + Set<Element<Annotation, Class<?>>> elements =
env.classIsAnnotatedWith(annotationClass);
| | + for(Element<Annotation, Class<?>> elt : elements)
| | + classes.add(elt.getOwner());
| | + }
| | for(Class<? extends Annotation> annotation : annotationOnMethod)
| | {
| | Class<Annotation> annotationClass =
(Class<Annotation>)annotation;
| |
|
| See that removal of explicit DeploymentStage.PRE_REAL.
Yep that works.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168229#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...