-
1. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
alrubinger Jul 22, 2008 7:37 PM (in response to alrubinger)Ah, found "org.jboss.metadata.annotation.creator.Resource*Processor".
Looking like it might need to be hooked in more, I'll play around with it.
S,
ALR -
2. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
starksm64 Jul 22, 2008 7:38 PM (in response to alrubinger)org.jboss.metadata.annotation.creator.jboss.AbstractComponentProcessor adds all resource processors, and this is subclasses by all ejb processors.
-
3. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
alrubinger Jul 22, 2008 7:42 PM (in response to alrubinger)The static initializer does not account for javax.ejb.SessionContext (or any of javax.ejb.*), which is my injection target.
S,
ALR -
4. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
starksm64 Jul 22, 2008 7:56 PM (in response to alrubinger)SessionContext is the resource type, so what do you mean?
-
5. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
starksm64 Jul 22, 2008 8:00 PM (in response to alrubinger)Any type not handled by the AbstractResourceProcessor.resourceRefTypes is a ResourceEnvironmentReferencesMetaData.
-
6. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
alrubinger Jul 22, 2008 10:25 PM (in response to alrubinger)Hmm, AbstractComponentProcessor has no "process" method which handles a ResourceEnvironmentReferencesMetaData. Emanuel, does this look like the root cause why I'm not seeing these @Resource field-level annotations populated in my returned metadata?
S,
ALR -
7. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
starksm64 Jul 23, 2008 12:37 AM (in response to alrubinger)I don't know what your looking at as there are process methods on both:
package org.jboss.metadata.annotation.creator.jboss; * @version $Revision: 72364 $ public abstract class AbstractComponentProcessor<MD> extends AbstractProcessor<MD> { public void process(RemoteEnvironmentRefsGroupMetaData metaData, Class<?> type) { ... } public void process(EnvironmentRefsGroupMetaData metaData, Class<?> type) { ...
package org.jboss.metadata.annotation.creator; * @version $Revision: 76002 $ public abstract class AbstractComponentProcessor<MD> extends AbstractProcessor<MD> { public void process(RemoteEnvironmentRefsGroupMetaData metaData, Class<?> type) { } public void process(EnvironmentRefsGroupMetaData metaData, Class<?> type) { ... } }
? -
8. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
alrubinger Jul 23, 2008 1:24 AM (in response to alrubinger)Clearly this isn't my domain. :)
Added a quick unit test in JBMETA-80 to show what I'm talking about. This is tangential to a test I'm trying to create in EJB3 Core which requires @Resource injection on SessionContext.
S,
ALR -
9. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
starksm64 Jul 23, 2008 1:41 AM (in response to alrubinger)Ok, let me take a look. Just glancing at the bean/test it should be showing up.
-
10. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
alrubinger Jul 23, 2008 1:44 AM (in response to alrubinger)Sorry for leading you down the wrong road, then. At least I'm not crazy. :)
-
11. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
starksm64 Jul 23, 2008 2:04 AM (in response to alrubinger)Ok, the problem is that there is an inconsistency with the standard metadata class processors and the jboss extensions. The org.jboss.metadata.annotation.creator.jboss.AbstractComponentProcessor.process is calling processClass with the JBossEnvironmentRefsGroupMetaData.class as the processorType:
public void process(RemoteEnvironmentRefsGroupMetaData metaData, Class<?> type) { // @Resources/@Resource processClass(metaData, type, JBossEnvironmentRefsGroupMetaData.class); ...
but the Resource*Processors are only registered for the standard metadata as most of the envionrment metadata is simply standard descriptor stuff. If this is changed to the RemoteEnvironmentRefsGroupMetaData:public void process(RemoteEnvironmentRefsGroupMetaData metaData, Class<?> type) { // @Resources/@Resource processClass(metaData, type, RemoteEnvironmentRefsGroupMetaData.class); ...
Then the session context shows up under ResourceEnvironmentReferenceMetaData as expected:
22:57:44,333 INFO [SessionContextAddedToMetadataUnitTestCase] org.jboss.metadata.javaee.spec.ResourceEnvironmentReferenceMetaData@38b735af{context}
Assign the issue to Emanuel or Alexy as there are issues with registering jboss specific type processors to deal with this correctly. -
12. Re: [jboss-metadata] No ResourceProcessor for JBoss50Creator
alrubinger Jul 23, 2008 2:08 PM (in response to alrubinger)Emanuel's taken care of this. Making my dev cycle for SessionContext stuff go from 5+ minutes to 4 seconds. :)
S,
ALR