geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Katia Aresti Gonzalez" <kaare...@hotmail.com>
Subject Re: Adding EJB-QL to CMP beans
Date Fri, 22 Apr 2005 09:02:19 GMT
<html><div style='background-color:'><DIV class=RTE>
<P>Yes, I did and it works perfect!! By the way, I will try to change my cmp to 2.0.
and try it. </P>
<P>Thant you!!</P>
<P>Katia<BR></P></DIV>
<DIV></DIV>&gt;From: Jeremy Boynes &lt;jboynes@apache.org&gt;
<DIV></DIV>&gt;Reply-To: user@geronimo.apache.org
<DIV></DIV>&gt;To: user@geronimo.apache.org
<DIV></DIV>&gt;Subject: Re: Adding EJB-QL to CMP beans
<DIV></DIV>&gt;Date: Thu, 21 Apr 2005 16:56:08 -0700
<DIV></DIV>&gt;
<DIV></DIV>&gt;Katia Aresti Gonzalez wrote:
<DIV></DIV>&gt;&gt;Thank you Jeremy!
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;Katia
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;From: Jeremy Boynes &lt;jboynes@apache.org&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;Reply-To: user@geronimo.apache.org
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;To: user@geronimo.apache.org
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;Subject: Re: Adding EJB-QL
to CMP beans
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;Date: Thu, 21 Apr 2005
08:09:09 -0700
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;Katia Aresti Gonzalez wrote:
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;Hi everybody!!
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;Im
migrating a program with 3 CMP Beans. The thing it that to
<DIV></DIV>&gt;&gt;use
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;de container managed
persistence, i need to add EJB-QL, because
<DIV></DIV>&gt;&gt;the
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;examples, all of
them have finAll() or findByPromaryKey, and
<DIV></DIV>&gt;&gt;these
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;doenst give any
problems, the problems are the other select.
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;What
do I need to add EJB-QL support for CMP sql selects??
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;thank you very
much for your help!
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;Assuming you have the basic
fields mapped, you should just be
<DIV></DIV>&gt;&gt;able
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;to specify the EJB-QL in
the standard deployment descriptor; we
<DIV></DIV>&gt;&gt;will
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;automatically convert that
to the appropriate SQL.
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;We chatted a little on IRC - Katia's EJB's are 1.x so there
is no
<DIV></DIV>&gt;way to specify the query in the standard DD.
<DIV></DIV>&gt;
<DIV></DIV>&gt;Instead, we support this by allowing EJB-QL from 2.x to be
used in
<DIV></DIV>&gt;the app-server specific deployment plan for a 1.x bean e.g.
<DIV></DIV>&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/resource-ref&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;query&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;query-method&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;method-name&gt;findAll&lt;/method-name&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;method-params
/&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/query-method&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;ejb-ql&gt;SELECT OBJECT(u) FROM UsuarioEJB as u&lt;/ejb-ql&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/query&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;--
<DIV></DIV>&gt;Jeremy
<DIV></DIV></div><br clear=all><hr>Busca a la vez en Internet,
en directorios, en enciclopedias...  <a href="http://g.msn.com/8HMAESES/2740??PS=47575"
target="_top">Atrévete con el nuevo MSN Search</a> </html>


Mime
View raw message