Return-Path: X-Original-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1244C988C for ; Wed, 7 Mar 2012 02:06:17 +0000 (UTC) Received: (qmail 31870 invoked by uid 500); 7 Mar 2012 02:06:16 -0000 Delivered-To: apmail-incubator-deltaspike-dev-archive@incubator.apache.org Received: (qmail 31764 invoked by uid 500); 7 Mar 2012 02:06:15 -0000 Mailing-List: contact deltaspike-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltaspike-dev@incubator.apache.org Delivered-To: mailing list deltaspike-dev@incubator.apache.org Received: (qmail 31754 invoked by uid 99); 7 Mar 2012 02:06:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 02:06:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of john.d.ament@gmail.com designates 209.85.160.47 as permitted sender) Received: from [209.85.160.47] (HELO mail-pw0-f47.google.com) (209.85.160.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 02:06:11 +0000 Received: by pbcum15 with SMTP id um15so79480pbc.6 for ; Tue, 06 Mar 2012 18:05:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=YNsFXLd7XFLygjXJ2wQCvDM/HKmyml/zBxjFAqeszs8=; b=07/JEu1JOP2iqmFokOo88uWDOj3OcnNNbTqtvNWTbzZE4OCXLSWTP2idVDgGRxhIzB yaZ9Q560NayIR6eMd5tteKNyCTWcjNvQNL/1nrYMnW+jXAajA+NSj5Thw6SHBZ4zsoqR fjYP36AbCaHnXeBDRme2vx9gGCKdh9zwFzPxzm3kDrp9LbpfNJeomwfncWmVDeNBHNcq E7er9/gxqErlHv03ZAc4PgxE90T+lRvKoeUcPjFxPzYkYrNDD1pisLmbv52fvJzYFsEL y9xSNOxtYHkV/MtZsIRrEDOI0dATQwgd5osuMI+pHBwSoYKsW8UWcabNWNePLl+9ef8j DEmg== MIME-Version: 1.0 Received: by 10.68.234.71 with SMTP id uc7mr1283458pbc.6.1331085950416; Tue, 06 Mar 2012 18:05:50 -0800 (PST) Received: by 10.68.8.138 with HTTP; Tue, 6 Mar 2012 18:05:50 -0800 (PST) In-Reply-To: <1331056715.52980.YahooMailNeo@web171505.mail.ir2.yahoo.com> References: <9D65F312-2E45-41C5-9BA3-021EA611781C@redhat.com> <1331056715.52980.YahooMailNeo@web171505.mail.ir2.yahoo.com> Date: Tue, 6 Mar 2012 21:05:50 -0500 Message-ID: Subject: Re: [DISCUSS] [DELTASPIKE-113] Review and Discuss ServiceHandler From: "John D. Ament" To: deltaspike-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b33db623d767a04ba9d9919 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33db623d767a04ba9d9919 Content-Type: text/plain; charset=ISO-8859-1 @mark I don't think it's a hard requirement for it to be on an interface. One of the best use-cases we built at my job is using it for calling PL/SQL. The JDBC bindings do work, but not pretty. we were able to create a fairly clean wrapper API, generic enough for binding in/out parameters. JOhn On Tue, Mar 6, 2012 at 12:58 PM, Mark Struberg wrote: > actually I don't really see a real benefit. I just don't yet grok the use > case for real world projects. > > Why would one intercept an Interface and delegate the calls to a method > handler? > This could be neat for mocking, but there are better frameworks for that. > > thus > > -0.2 > > LieGrue, > strub > > > > ----- Original Message ----- > > From: Gerhard Petracek > > To: deltaspike-dev@incubator.apache.org > > Cc: > > Sent: Tuesday, March 6, 2012 5:15 PM > > Subject: Re: [DISCUSS] [DELTASPIKE-113] Review and Discuss ServiceHandler > > > > if you have a lot of shared code, you can extract it in 1-n method/s or > an > > abstract class which is still easier than a new concept. > > at least i haven't seen an use-case which really needed it. that was the > > reason for a +0 (which still means that i'm ok with adding it). > > > > regards, > > gerhard > > > > > > > > 2012/3/6 Pete Muir > > > >> So, you mean just write a bean with all the boilerplate code in it? > >> > >> On 6 Mar 2012, at 15:58, Gerhard Petracek wrote: > >> > >> > hi pete, > >> > > >> > instead of the interface you can just implement a bean which does the > >> same. > >> > > >> > regards, > >> > gerhard > >> > > >> > > >> > > >> > 2012/3/6 Pete Muir > >> > > >> >> What CDI mechanism would you use instead? > >> >> > >> >> On 5 Mar 2012, at 08:47, Gerhard Petracek wrote: > >> >> > >> >>> +0 > >> >>> no -1 because there are use-cases for it. > >> >>> no +1 because i would use std. cdi mechanisms instead. > >> >>> > >> >>> regards, > >> >>> gerhard > >> >>> > >> >>> > >> >>> > >> >>> 2012/3/4 Gerhard Petracek > >> >>> > >> >>>> hi john, > >> >>>> > >> >>>> the sub-task is perfectly fine. > >> >>>> > >> >>>> regards, > >> >>>> gerhard > >> >>>> > >> >>>> > >> >>>> > >> >>>> 2012/3/4 John D. Ament > >> >>>> > >> >>>> Hi All > >> >>>>> > >> >>>>> I wanted to bring up the subject of ServiceHandler. I > > added 113 as a > >> >>>>> child > >> >>>>> of DELTASPIKE-2, looked appropriate but not 100% sure > > (so please let > >> me > >> >>>>> know if you think it's not appropriate as a > > child). ServiceHandler > >> is > >> >> a > >> >>>>> feature in Solder that allows you to define an > > interceptor that > >> manages > >> >>>>> generic calls against an injected interface. The API > > is as follows: > >> >>>>> > >> >>>>> - @ServiceHandlerType(Class clazz) - placed > > on an annotation that > >> >> would > >> >>>>> be placed on the interface. Indicates what > > interceptor would be > >> >> invoked > >> >>>>> for calls against this interface. > >> >>>>> > >> >>>>> It's then up to the application > > developer/framework author to define > >> >>>>> annotations that go on methods, as well as the > > interceptor itself > >> that > >> >>>>> will > >> >>>>> be invoked. The feature for ServiceHandler would be > > to provide the > >> >> API of > >> >>>>> the type and then the infrastructure required to make > > the interceptor > >> >> be > >> >>>>> called. Existing documentation of the feature: > >> >>>>> > >> >>>>> > >> >> > >> > > > http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/solder-servicehandler.html > >> >>>>> > >> >>>>> Regards, > >> >>>>> > >> >>>>> john > >> >>>>> > >> >>>> > >> >>>> > >> >> > >> >> > >> > >> > > > --047d7b33db623d767a04ba9d9919--