One issue that showed up in JBCTS-717 was metadata that looked like xml input but was missing the required mapped name. This is metadata being generated from the deployment annotations. I added logic similar to what existed for the @Resource processing for known types like UserTransaction and ORB. I suppose this logic should be in the ReferenceMetaDataResolverDeployer.

We are also doing duplicate annotation processing, so how that gets dropped from the ejb3 container needs to be discussed.

The logic can't be in metadata, because it's also valid to create an injection target on UserTransaction in xml only. Or we must specify this as a post-condition of metadata.

I also don't like it in ReferenceMetaDataResolverDeployer, because then it won't be reusable for EJB Standalone.

For now I would say a post-condition on metadata that these simple resource injections must have the correct mapped name.Note that in the end the EJB container will still optimize an injection. So the code in ResourceHandler must stay.

For now I would say a post-condition on metadata that these simple resource injections must have the correct mapped name.Note that in the end the EJB container will still optimize an injection. So the code in ResourceHandler must stay.

The only thing that can set the mapped name is the annotation creator if its not going to be a deployer.