Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD4C970C4 for ; Fri, 19 Aug 2011 20:27:19 +0000 (UTC) Received: (qmail 97836 invoked by uid 500); 19 Aug 2011 20:27:19 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 97729 invoked by uid 500); 19 Aug 2011 20:27:18 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 97721 invoked by uid 99); 19 Aug 2011 20:27:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2011 20:27:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ryanzoerner@gmail.com designates 209.85.213.169 as permitted sender) Received: from [209.85.213.169] (HELO mail-yx0-f169.google.com) (209.85.213.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2011 20:27:13 +0000 Received: by yxn35 with SMTP id 35so1862595yxn.0 for ; Fri, 19 Aug 2011 13:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=EZXNJLFMjXzgdpuaK2HXfLvNZcqHoEBh2E421xzW97U=; b=PsAeGpi0J1V2g1WLRA4mw/SZRBHGNfE9CvraPKZSW+/2ecbI8jP7aHqrhKKfhRsGak TQvCSjpe49oJwTHl1TkgUsRI5Uux7kC17kBU851318tjcxx6DDy+j8KujYyjPpLGsyGQ IWRvwZjlSpSRovxd0J2ZBdNPWqhjXtI4SdNqc= MIME-Version: 1.0 Received: by 10.42.148.72 with SMTP id q8mr197506icv.481.1313785612491; Fri, 19 Aug 2011 13:26:52 -0700 (PDT) Received: by 10.42.174.136 with HTTP; Fri, 19 Aug 2011 13:26:52 -0700 (PDT) Date: Fri, 19 Aug 2011 15:26:52 -0500 Message-ID: Subject: JAXRS EJB ResourceProvider and Invoker From: Ryan Zoerner To: dev@cxf.apache.org Cc: easybeans@ow2.org Content-Type: multipart/alternative; boundary=90e6ba6e8b54be5b2704aae18cc4 --90e6ba6e8b54be5b2704aae18cc4 Content-Type: text/plain; charset=ISO-8859-1 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.) --90e6ba6e8b54be5b2704aae18cc4--