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 21F526E62 for ; Tue, 24 May 2011 05:29:16 +0000 (UTC) Received: (qmail 34375 invoked by uid 500); 24 May 2011 05:29:14 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 34046 invoked by uid 500); 24 May 2011 05:29:14 -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 34029 invoked by uid 99); 24 May 2011 05:29:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 May 2011 05:29:11 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,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.161.41 as permitted sender) Received: from [209.85.161.41] (HELO mail-fx0-f41.google.com) (209.85.161.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 May 2011 05:29:05 +0000 Received: by fxm18 with SMTP id 18so5459785fxm.0 for ; Mon, 23 May 2011 22:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=PvI+NxDCeUTkJ5R84XVP4CXtS9LK2znGrZG94QEWhmI=; b=vIGtt0Uc4+dQ3m9sQihKIXOG6cJYu67bewDTBKO0BAWdX28JdBbkB9/VtnrUvTOkbf n7JB/JZWWookggaeG5BX3jOwGBrioWRYEQb6XNn49DluSTy/GSFGxXiQQhdMuBRCjo82 T3/IS6LAoe1qlXfTYR/6pt/L6Ps4fqbkcJtbQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HbeQtwYOaATjpM4JVDltdiKs1BN/QR/xmgfATGSzC3Va8CX4AwHgOkGFKQLrXxOTAh Nz+FnwyeeSF2kkxOixo6+YurlFmNsTKPAnDBbuCT6bZCrAJ+/2b0DukTOzLKZvwW9Rvs 4HEQQ3eeDpbJoIHNiKXL4RjmTZ3LTgPD6fVRw= MIME-Version: 1.0 Received: by 10.223.73.133 with SMTP id q5mr3260729faj.127.1306214923701; Mon, 23 May 2011 22:28:43 -0700 (PDT) Received: by 10.223.93.199 with HTTP; Mon, 23 May 2011 22:28:43 -0700 (PDT) Date: Tue, 24 May 2011 00:28:43 -0500 Message-ID: Subject: some thoughts that I wanted to post, in regards to RP, CRI, Exceptions, and a class scanner From: Ryan Zoerner To: dev@cxf.apache.org Content-Type: multipart/alternative; boundary=0015174c1ab8870e9404a3fedce2 --0015174c1ab8870e9404a3fedce2 Content-Type: text/plain; charset=ISO-8859-1 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 --0015174c1ab8870e9404a3fedce2--