[jboss-jira] [JBoss JIRA] Assigned: (JBJCA-512) AdminObject annotation scanning is not creating correct metadata
Stefano Maestri (JIRA)
jira-events at lists.jboss.org
Tue Mar 8 08:50:45 EST 2011
[ https://issues.jboss.org/browse/JBJCA-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Maestri reassigned JBJCA-512:
-------------------------------------
Assignee: Stefano Maestri (was: Jesper Pedersen)
> AdminObject annotation scanning is not creating correct metadata
> ----------------------------------------------------------------
>
> Key: JBJCA-512
> URL: https://issues.jboss.org/browse/JBJCA-512
> Project: IronJacamar
> Issue Type: Bug
> Components: Common
> Affects Versions: 1.0.0.Beta4
> Reporter: Stefano Maestri
> Assignee: Stefano Maestri
> Fix For: 1.0.0.Beta5
>
>
> It seems there is a bug that handle @AdministeredObject in Ironjacamar.
> public @interface AdministeredObject
> {
> Class[] adminObjectInterfaces() default { };
> }
> public interface AdminObject extends IdDecoratedMetadata, CopyableMetaData
> {
> public abstract XsdString getAdminobjectInterface();
> public abstract XsdString getAdminobjectClass();
> ....
> }
> The key line(611) in the AbstractResourceAdapterDeployer
> if (aoMeta.getAdminobjectClass() != null &&
> aoMeta.getAdminobjectClass().getValue() != null)
> But for the annotation scan
> for (Annotation annotation : values)
> {
> AdministeredObject a = (AdministeredObject)
> annotation.getAnnotation();
> if (trace)
> log.trace("Processing: " + a);
> String aoName = null;
> if (a.adminObjectInterfaces().length > 0)
> {
> aoName = ((Class) Array.get(a.adminObjectInterfaces(),
> 0)).getName();
> }
> XsdString adminobjectInterface = new XsdString(aoName, null);
> adminObjs.add(new AdminObjectImpl(adminobjectInterface,
> null, null, null));
> }
> So it doesn't know AdminobjectClass any time.
> In the JSR-311 document, it isn't clear about @AdministeredObject in the
> annotation section. :(
> regards
> Jeff
> The annotation scanning is not creating the right AdminObject since it puts always to null the Imple class in metadata.
> Annotation scanning should take the scanned object and use its class as impl class. Use annotation.getClassNanme to obtain the annotated class.
> Don't forget to implement a unit test proving the bug and documenting the solution.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list