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 appropriate 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 @'s. Exceptions: if thrown, what does cxf normally do with it? Does this vary between exceptions. If cxf always passes it off to the server container, then that is just fine. Need to get a list of all possible exceptions throwable and map them to exception responses, via customExMapper? 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 app-lifecycle function handle, or need to handle any of these functions? Does java normally 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 root resource, it will need to be handled by a given resourceProvider. This will handle the various lifecycles that EJB's provide. When the setResourceClass is called on an ejb-annotated root resource, cxf should have a mechanism in place 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 the information that goes into the classResourceInfo object that resides with the 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 the customResourceProvider should be the default. ----------------------------------------------------------------------------------- Thank you. Ryan