I have come to the conclusion that the EJB, when supplied from the easybeans factory, can be assumed to be container managed by easybeans, provided that easybeans works properly.
Any exceptions thrown by CXF, while processing the EJB should be managed by ExceptionMapper. Will such exceptions exist, that are not, inherently, cxf exceptions? Any exceptions thrown in the process of the EJB container management. Are they not handled by the EJB container? If they are propagated to CXF, then CXF can still handle. Because RP and Invoker simply return and release class instances, the same as in non-EJB cxf interaction, cxf processing should not be affected by what instance is being returned. (Any details of lifecycle management in JAXRSInvoker, or any subclasses, may need altering, but I doubt it, except that they may not take the proper steps to release an instance, if they do not do it through the RP. So any non-RP lifecycle management will need to delegate directly to the RP, possibly via the Invoker. The RP releases the instance via the factory.) The interceptors will go over the resource class, and will process based on JAX-RS and JAXB annotations. EJB annotations are not paid attention to. The main thing is that the correct class(to the interceptor) and instance(to the m.invoke(..) method) are supplied. Only @Stateless beans are acceptable beans for a webservice. In normal non-ejb jaxrs cxf usage, only the resource class is supplied by the invoker. The invoker-supplied class calls the remainder of the supporting classes. A question that I have is: what if these other classes are EJB classes. How will the EJB container know about these classes, when CXF is deploying the main @Stateless bean. Is it through a deployment descriptor? Here are links to the EJB CXF RP and Invoker, as I have them. There will be no need to decide which type of EJB Factory to use, such as Stateless, Stateful, etc. All webservice bean instances will be Stateless. http://pages.cs.wisc.edu/~zoerner/downloads/dev/Invoker_bundle/JAXRS_EJB_Resource_Provider.java http://pages.cs.wisc.edu/~zoerner/downloads/dev/Invoker_bundle/JAXRS_EJB_Invoker.java These files are not guaranteed to not be edited. I will not add future versions of them at some other address. The ExceptionMapper is quite simple to write, and for that reason, I haven't typed it up yet. Thanks, Ryan Zoerner (easybeans, I'm wondering if you know about lifecycle management of supporting EJB classes.) (thanks.)
