cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Zoerner <>
Subject some thoughts that I wanted to post, in regards to RP, CRI, Exceptions, and a class scanner
Date Tue, 24 May 2011 05:28:43 GMT
I have some thoughts that I wanted to post to the dev list.

Here they are:

The RP will need to choose between lifecylces, possibly just selecting which
existing cxf
resourceProvider to choose, based upon annotation. The annotations may be
found in the
class resource info object, obtainable from the JAXRSService. Look up the
EJB annotations
and find out which EJB-lifecycle this class is subscribing to, then call the
cxf RP. We will need to know which cxf RP, at the time of SF.setRP(EJB_RP);

"EJB_RP" will call Singleton- or per-request- RP's, or some other, based on

Exceptions: if thrown, what does cxf normally do with it? Does this vary
            exceptions. If cxf always passes it off to the server container,
            that is just fine. Need to get a list of all possible exceptions

            throwable and map them to exception responses, via

            will we need to have the exceptionMapper called automatically,
so that
            the user doesn't have to remember to set it, just to have cxf do

            what user should take for grantd?

What else do ejb annotation's do, besides dictate lifecycle? Does cxf
function handle, or need to handle any of these functions? Does java
handle them? Does a server typically handle any of them?

ClassScanner idea:
Ok, so in terms of lifecycle management, when an ejb class is declared as a
resource, it will need to be handled by a given resourceProvider. This will
handle the various lifecycles that EJB's provide. When the setResourceClass
called on an ejb-annotated root resource, cxf should have a mechanism in
to recognize the ejb annotation, as-such, by looking it up in a list, and
force cxf to use the custom resource provider. The annotations are part of
information that goes into the classResourceInfo object that resides with
JAXRSServiceFactory. There may be some way to listen for the creation of the

classResourceInfo object, and then use it, at that time, to decide whether
customResourceProvider should be the default.

Thank you.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message