2 Replies Latest reply on Nov 26, 2008 12:52 AM by Scott Stark

    Inheritance of annotations in PropertyInfo

    Scott Stark Master

      What is the expected behavior of annotations on properties when subclasses override the accessors? I'm seeing that annotations are only visible if the overridden method also copies the annotations, as in this managedConnectionFactoryProperties example:

      public class ManagedConnectionFactoryDeploymentMetaData
       implements Serializable, ConnectionPoolMetaData
      {
       @ManagementProperty(name="config-property", managed=true, includeInTemplate=true)
       public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
       {
       return managedConnectionFactoryProperties;
       }
      ...
      
      public abstract class NonXADataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
      {
       @ManagementProperty(name="config-property",
       description="The connection factory property info",
       managed=true, includeInTemplate=true)
       public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
      
      


      This is true even if @Inherited is a meta-annotation on the annotation. Is that expected behavior?