Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 7002 invoked from network); 2 Mar 2006 12:02:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Mar 2006 12:02:32 -0000 Received: (qmail 92334 invoked by uid 500); 2 Mar 2006 12:03:16 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 92297 invoked by uid 500); 2 Mar 2006 12:03:15 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 92286 invoked by uid 99); 2 Mar 2006 12:03:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2006 04:03:15 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [211.29.133.158] (HELO mail21.syd.optusnet.com.au) (211.29.133.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2006 04:03:14 -0800 Received: from [127.0.0.1] (d220-236-201-216.dsl.nsw.optusnet.com.au [220.236.201.216]) (authenticated sender gianny.damour) by mail21.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k22C2ms7002809 for ; Thu, 2 Mar 2006 23:02:52 +1100 Message-ID: <4406DEE3.8060309@optusnet.com.au> Date: Thu, 02 Mar 2006 23:02:43 +1100 From: Gianny Damour User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: Dynamic Query References: <43FB1546.70002@datasul.com.br> <43FDAF01.8010102@optusnet.com.au> <83e2fc4d0602232121s625b5686i451b93b3bda18c23@mail.gmail.com> <44030FEB.3080504@optusnet.com.au> <83e2fc4d0602272153o5b46b345p8ced56dc8e9afd56@mail.gmail.com> In-Reply-To: <83e2fc4d0602272153o5b46b345p8ced56dc8e9afd56@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Phani, Sorry for this late reply - I was focused on completing the implementation of dynamic queries, which is now available in trunk. ModuleCMPEngine is not DayTrader specific. Basically, the idea it to bind a specific GBean to the ENC of the component from which you need to perform the dynamic query. "ModuleCmpEngine" is the j2eeType of the GBean to be bound; its type is "org.openejb.entity.cmp.ModuleCmpEngine"; its J2EE module type is "EJBModule"; its name is "moduleCmpEngine" and it is part of the EJB module defining the CMP for which you need to execute dynamic EJBQL queries. So, to bind it to the ENC you use something like this: cmp/QueryManager -- ENC name ModuleCmpEngine -- j2eeType org.openejb.entity.cmp.ModuleCmpEngine -- GBean type name_of_the_ejb_module -- name of the EJB module EJBModule -- J2EE module type moduleCmpEngine -- name of the GBean Thanks, Gianny Phani Madgula wrote: > Hi Gianny, > > Thanks for info. > > I understand following from the Query engine. > > 1. As a first step, we will have a query engine that allows only > standard EJB-QL. No additional capabilities. > > 2. From the tags mentioned in your previous mail, ModuleCMPEngine will > be part of DayTrader application? My question is, where is > ModuleCMPEngine located? > > > > Thx > phani > > > > > On 2/27/06, *Gianny Damour* > wrote: > > Hi Phani, > > In a first step, we will add support for standard EJBQL > statements. The > current impl. is as follows: > > * in the vendor specific deployment descriptor, a specific GBean is > bound to the ENC. This looks like this: > > cmp/QueryManager > ModuleCmpEngine > > > geronimo/daytrader-derby-jetty/1.1-SNAPSHOT/car > daytrader-ejb-1.1-SNAPSHOT.jar > EJBModule > moduleCmpEngine > > > > * from the J2EE component having the above gbean-ref, we following > snippet retrieves a QueryManager: > QueryManagerLocator locator = new QueryManagerLocator(); > QueryManager qm = locator.locate("cmp/QueryManager"); > > * the QueryManager allows the creation of queries: > Query query = qm.createQuery("select H from HoldingEJB H where > H.holdingID = ?", new Class[] {Integer.class}); > > * parameters are then set: > query.setParameter(0, new Integer(1)); > > * when the parameters have been set, the query is then executed and > return the result as a single object or a list: > Object result = query.getSingleResult(); > or > List results = query.getResultList(); > > I am in the process of testing the impl.; meanwhile, if you think that > the above can be improved, then let us know. > > Thanks, > Gianny > > > Phani Madgula wrote: > > > Hi Gianny, > > > > I just want to know more about this feature. > > > > Is it something like AG providing an API for CMP clients to execute > > EJBQL statements at runtime?. > > > > If yes, what kind of queries we can execute? are query capabilities > > extended? > > > > For example, currently EJB-QL does not allow multiple expressions in > > SELECT class. > > That is, we can't have SELECT OBJECT(e), e.name > < http://e.name> FROM > > ... like statements. > > > > will dynamic query feature allow above statement? > > > > Thx > > phani > > > > > > > > ** > > ** > > ** > > > > ** > > > > > > > > > > On 2/23/06, *Gianny Damour* > > >> wrote: > > > > Hi Glaucio, > > > > It is not yet possible to create dynamic queries in > Geronimo. This > > feature is currently being progressed and will be available > next > > week. > > > > Thanks, > > Gianny > > > > Glaucio Scheibel wrote: > > > > > Hi, > > > > > > I am looking how to create dynamic queries in geronimo. Is > this > > > possible? I didn't find any info about this. > > > > > > Thanks in advance > > > Glaucio > > > > > > > > > > > > > > >