Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 80610 invoked from network); 28 Feb 2006 05:54:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Feb 2006 05:54:22 -0000 Received: (qmail 9303 invoked by uid 500); 28 Feb 2006 05:54:13 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 9194 invoked by uid 500); 28 Feb 2006 05:54:13 -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 9165 invoked by uid 99); 28 Feb 2006 05:54:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2006 21:54:13 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of phanibalaji.madgula@gmail.com designates 64.233.182.202 as permitted sender) Received: from [64.233.182.202] (HELO nproxy.gmail.com) (64.233.182.202) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2006 21:54:12 -0800 Received: by nproxy.gmail.com with SMTP id d4so680214nfe for ; Mon, 27 Feb 2006 21:53:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=QFghSXzZym+6fAmWpPE3aIL7U5Ks7uQpkaRkxUZzBzHCdjN2hOK8X7bkLf0agxvZj222MdEKUB7lcPm4JumaRRqgFjfeWVCqHCIJnoOYgZmgXqifTr/i6jjFYfC5MZ6ZpVL6ArQgbcwZRmMmaP1zOJJceUByVEqo70xMacUtRqU= Received: by 10.49.6.17 with SMTP id j17mr488802nfi; Mon, 27 Feb 2006 21:53:50 -0800 (PST) Received: by 10.49.35.14 with HTTP; Mon, 27 Feb 2006 21:53:50 -0800 (PST) Message-ID: <83e2fc4d0602272153o5b46b345p8ced56dc8e9afd56@mail.gmail.com> Date: Tue, 28 Feb 2006 11:23:50 +0530 From: "Phani Madgula" To: user@geronimo.apache.org Subject: Re: Dynamic Query In-Reply-To: <44030FEB.3080504@optusnet.com.au> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_23513_23484824.1141106030422" References: <43FB1546.70002@datasul.com.br> <43FDAF01.8010102@optusnet.com.au> <83e2fc4d0602232121s625b5686i451b93b3bda18c23@mail.gmail.com> <44030FEB.3080504@optusnet.com.au> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_23513_23484824.1141106030422 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D new QueryManagerLocator(); > QueryManager qm =3D locator.locate("cmp/QueryManager"); > > * the QueryManager allows the creation of queries: > Query query =3D qm.createQuery("select H from HoldingEJB H where > H.holdingID =3D ?", 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 =3D query.getSingleResult(); > or > List results =3D 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 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 > > > > > > > > > > > > > > > ------=_Part_23513_23484824.1141106030422 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
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 stand= ard 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 <gian= ny.damour@optusnet.com.au> wrote:
Hi Phani,

In a first step= , we will add support for standard EJBQL statements. The
current impl. i= s as follows:

* in the vendor specific deployment descriptor, a specific GBean is=
bound to the ENC. This looks like this:
    &nbs= p;      <gbean-ref>
   &nb= sp;           <ref-nam= e>cmp/QueryManager</ref-name>
            &nb= sp;  <ref-type>ModuleCmpEngine</ref-type>
  &= nbsp;            <= ;gbean-locator>

<application>geronimo/daytrader-derby-jetty= /1.1-SNAPSHOT/car</application>
     &nbs= p;             = <module> daytrader-ejb-1.1-SNAPSHOT.jar</module>
    &n= bsp;            = ;  <type>EJBModule</type>
     = ;            &n= bsp; <name>moduleCmpEngine</name>
    &n= bsp;          </gbean-locat= or>
           <= /gbean-ref>

* from the J2EE component having the above gbean-ref, we following<= br>snippet retrieves a QueryManager:
   QueryManagerLocator lo= cator =3D new QueryManagerLocator();
   QueryManager qm =3D lo= cator.locate("cmp/QueryManager");

* the QueryManager allows the creation of queries:
   = Query query =3D qm.createQuery("select H from HoldingEJB H where
H.= holdingID =3D ?", new Class[] {Integer.class});

* parameters ar= e then set:
   query.setParameter(0, new Integer(1));

* when the p= arameters have been set, the query is then executed and
return the resul= t as a single object or a list:
   Object result =3D query.get= SingleResult();
or
   List results =3D query.getResultList();

I am in t= he process of testing the impl.; meanwhile, if you think that
the above = can be improved, then let us know.

Thanks,
Gianny


Phan= i 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 a= llow multiple expressions in
> SELECT class.
> That is, we can'= t have SELECT OBJECT(e), e.name < http://e.name> FROM
> ... like statements.
>
> wil= l dynamic query feature allow above statement?
>
> Thx
> = phani
>
>
>
> **
> **
> **
>
> **
>
>
>
>
> On 2/23/06, *Gianny Damour*= <gianny.damour@optusne= t.com.au
> <mailto: gianny.damour@optusnet.com.au>> wrote:
>
>  = ;   Hi Glaucio,
>
>     It is not= yet possible to create dynamic queries in Geronimo. This
> &nbs= p;   feature is currently being progressed and will be available = next
>     week.
>
>   &nb= sp; Thanks,
>     Gianny
>
> &nb= sp;   Glaucio Scheibel wrote:
>
>   &n= bsp; > Hi,
>     >
>   = ;  > I am looking how to create dynamic queries in geronimo. Is thi= s
>     > possible? I didn't find any info abou= t this.
>     >
>    = ; > Thanks in advance
>     > Glaucio
&g= t;     >
>     >
>= ;
>
>



------=_Part_23513_23484824.1141106030422--