Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70E291052D for ; Tue, 8 Oct 2013 17:59:58 +0000 (UTC) Received: (qmail 41685 invoked by uid 500); 8 Oct 2013 17:59:50 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 41463 invoked by uid 500); 8 Oct 2013 17:59:44 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 40805 invoked by uid 99); 8 Oct 2013 17:59:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 17:59:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=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.223.170 as permitted sender) Received: from [209.85.223.170] (HELO mail-ie0-f170.google.com) (209.85.223.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 17:59:18 +0000 Received: by mail-ie0-f170.google.com with SMTP id x13so21014662ief.29 for ; Tue, 08 Oct 2013 10:58:58 -0700 (PDT) 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=10Plrm6BPnP4CSxZGLF1i/ltS8DgYrI1JSO5ryNcpJk=; b=rhMzj61DPpnFzDsRgyT8duTgEQbEDB9UDdsLvccY4BoZdPvNIR6aHQQwoyWBeezHgI Cc+NbfFAe7LP4hV3GRVGzvvomMefvhr2mwNWkrbh4nKc0MS+5nbSPvSVuNSDqUn4Iyp7 taHxo8QfTtFUK7+5U8uDhf+JZsNG7CxLCIY/BRJ6+UWuetxoFockQhFIKKhLGLLHjjUl /LthipmHDHPYRIu8GMmwKtFrztdZNZD27xHgXWlQOj1nhe+r7omMEfdQxgogyV972gQY EmdV+y1eyza1cZC0f9TDsG8rhu4bk1QUc5d214aJ6F/nfLfdRUYirMie5uJipI/azTEl H1lQ== MIME-Version: 1.0 X-Received: by 10.50.126.74 with SMTP id mw10mr22634015igb.24.1381255137769; Tue, 08 Oct 2013 10:58:57 -0700 (PDT) Received: by 10.64.229.100 with HTTP; Tue, 8 Oct 2013 10:58:57 -0700 (PDT) In-Reply-To: References: Date: Tue, 8 Oct 2013 13:58:57 -0400 Message-ID: Subject: Re: Some getting started questions From: "John D. Ament" To: users@deltaspike.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I think right now the best way to see how it works is to look at the tests written for it. https://github.com/apache/deltaspike/tree/master/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean The actual implementation is here: https://github.com/apache/deltaspike/blob/master/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/shared/TestPartialBeanHandler.java Which may help in understand what's required to build one. On Tue, Oct 8, 2013 at 1:55 PM, David Hooker wrote: > Ok - I guess my question is more of a how-to. Is there a blog post or > simple guide > for how to use partial beans? > > From what I can gather with the examples, etc., it seems that what it does > is > let me define an interface (or abstract class, too), and annotate the class > with > my own partial bean annotation. Then, if I annotate an InvocationHandler > with the > same annotation, that IH becomes the implementation for the interface. Is > that > basically it? > > Hence my previous question... If I have multiple interfaces annotated, and > a single > IH, I assume the single IH will handle all requests to the > interfaces/beans. Further, > what happens if I have multiple IH implementations annotated with the same > partial bean annotation? > > > On Tue, Oct 8, 2013 at 6:38 AM, John D. Ament wrote: > >> The PartialBean support is basically an interceptor in CDI. You can >> reuse it as many times as you need. >> >> On Mon, Oct 7, 2013 at 11:26 PM, David Hooker wrote: >> > Hi John- >> > >> > Yeah, I was thinking that a JCR store was not my ultimate data storage - >> it >> > may be *one* of them, but not the only one. >> > >> > Basically, we will have data in an RDBMS, in a NoSQL store (like HBase), >> > one or more data grids (like Tibco, GridGain, Terracotta), file systems >> and >> > document storage systems (like Alfresco), Lucene/Solr, and potentially >> > others. >> > >> > We are already working on a generic canonical query language which can >> > represent lookups and queries across multiple stores and types of stores >> > like this. We can implement bindings/parsings from that representation >> to >> > the specifics of the store to perform queries and return data. We >> already >> > have a canonical data model, and will be generating language bindings and >> > transport representations of the data. This is all stuff we are >> designing >> > building. What I'm looking at here is the programming model for >> developers >> > to use to access the data - without knowing where or how it is stored and >> > retrieved. >> > >> > Therefore, I basically want to express the "query" in our own DSL (or >> maybe >> > use JPA-like builders? not sure yet), which we will parse into the >> generic >> > query representation... and then pass on to the appropriate data store. >> > >> > I'm still in the infancy of working out this model. CDI is fantastic >> > because it provides the exact framework that I had envisioned (and >> started >> > building on my own - but now don't have to). >> > >> > Your note leads me to another question - basically I have to figure out >> how >> > I'm going to put together the partial bean handlers and annotations to >> > create this programming model. Without a lot of documentation, I guess >> I'm >> > not sure yet the exact relationship between the annotated interfaces and >> > the invocation handlers. Is it strictly one-to-one? Or can it be >> > many-to-one? Many-to-many? How is it managed? >> > >> > Thanks, >> > -David- >> > >> >