> -----Original Message-----
> From: KARR, DAVID (ATTCINW)
> Sent: Monday, January 11, 2010 8:42 AM
> To: [email protected]
> Subject: How to have a super class of the resource class use CXF
> annotations?
> 
> That subject isn't worded quite right, but hopefully I can clear that
> up.
> 
> I started out with a small handful of resource classes, each of which
> points to a separate portion of my domain classes.  I realized that
> there are some HTTP headers that I'd like to get automatically,
without
> specifying them explicitly in each method.  I realized I could just
> define an instance variable in the resource class and then put the
> "@HeaderParam annotation on the field.  That works fine.  However,
what
> I'd really like to do is have a base class that all the resource
> classes
> extend, which has the annotated instance variable.  All I did was
"pull
> up" the instance variable and the getter/setter to a base class and
> retested that, and I found that the instance variable was not set.
> 
> Is there something I have to do to get CXF to look at the base class
> for
> CXF annotations, or is this a scenario that isn't possible yet?

I could still use some help with this.  I started inspecting the source,
and I found the AnnotationProcessor, which seemed to be relevant (and
which does appear to try to process the base class annotations).  This
is referenced from ResourceInjector.  I set breakpoints in the
constructor for both of those classes, and they didn't appear to get
there.  Am I missing something?

Reply via email to