<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi everyone,</div><div><br></div><div>There is some fairly major refactoring I would like to do ti the EJB/EE subsystem, I just thought I would run it by everyone to see if anyone had any suggestions / objections.</div><div><br></div><div>1) Remove AbstractAnnotationEJBProcessor, and replace it with a system that attaches annotation information directly to EEModuleClassDescription </div><div><br></div><div>I have a prototype of this at: </div><div><br></div><a href="https://github.com/stuartwdouglas/jboss-as/compare/jbossas:master...stuartwdouglas:ee-reorg">https://github.com/stuartwdouglas/jboss-as/compare/jbossas:master...stuartwdouglas:ee-reorg</a><div><br></div><div>This approach has a number of advantages:</div><div><br></div><div>- AbstractAnnotationEJBProcessor does not handle annotations in different sub deployments properly, so if a bean inherits from classes in another sub deployment those annotations will not be processed (this has potential security implications for things like the EJB security annotations).</div><div><br></div><div>- This should remove a lot of boilerplate code that is present in the annotation processors (I know at the moment the patch increases the total loc slightly, but after all the processors are converted it should reduce it)</div><div><br></div><div>- It should give us a more consistent approach to merging, at the moment there is a deployment descriptor processor, and annotation processor, and a merging processor, that are mostly copied / pasted all over the place. With this change there will only by 1 processor, that is responsible for merging the annotation and descriptor data, and attaching it to the description/configuration. </div><div><br></div><div><br></div><div>2) Subclass ComponentConfiguration for each component type</div><div><br></div><div>At the moment there is no where to store post class loading metadata for EJB components. This has been worked around with nasty hacks, either by storing post-class loading stuff in the description:</div><div><br></div><div><a href="https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/session/SessionBeanComponentDescription.java#L132">https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/session/SessionBeanComponentDescription.java#L132</a></div><div><br></div><div>Or by performing configuration work in the ComponentCreateService that should really be done in DUP's / configurators:</div><div><br></div><div><a href="https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/EJBComponentCreateService.java#L86">https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/EJBComponentCreateService.java#L86</a></div><div><br></div><div>In some cases this has resulted in EjbComponent's using maps keyed on MethodIdentifier internally, rather than a faster IdentityMap with the actual method objects from the reflection index. </div><div><br></div><div><a href="https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/singleton/SingletonComponent.java#L66">https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/singleton/SingletonComponent.java#L66</a></div><div><a href="https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/singleton/SingletonComponent.java#L151">https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/singleton/SingletonComponent.java#L151</a></div><div><br></div><div>There are also places in the code where we go from a Method object, store a MethodIdentifer, and then later re-resolve the original Method object, which is not ideal.</div><div><br></div><div>Does all this sound reasonable?</div><div><br></div><div>Stuart</div></body></html>