Robert Krueger wrote:

> 
> ok, if complexity is your main concern I wouldn't say cmp (at least 1.1) is
> more complex than writing jdbc code to use bmp. of course you have to learn
> something you don't know yet but I wouldn't accept that as a reason not to
> use cmp. you would lose too much just to avoid a little spec-reading and
> exploring orion's deployment files. it's definitely worth the effort.
Besides it's not *that* difficult. Once you've got Orion up and running
and created the first CMP Bean, it might take you most of one day to get
the bean to work properly.
What I found a really huge advantage of CMP over BMP is that, in the
most simple case, say a CMP with 10 fields and the pri key being a
String and about 10 different finder methods, you would write some 100
lines of code:
Field decls:
public String key;
getters & setters
public void setKey(String value)[

the (abstract) finders in the home interface

and the XML stuff, which amounts to:
                        <finder-method query="$cgc=$1 AND $nome LIKE $2">
                                <!-- Generated SQL: "select Negativado.cgc_cpf, 
Negativado.cgc,
Negativado.nome, Negativado.rua, Negativado.numero, Negativado.bairro,
Negativado.cep, Negativado.cidade, Negativado.uf, Negativado.email,
Negativado.status, Negativado.telefone from Negativado where
Negativado.cgc = ? AND Negativado.nome LIKE ?" -->
                                <method>
                                        <ejb-name>Negativado</ejb-name>
                                        <method-name>findByAutorAndName</method-name>
                                        <method-params>
                                                
<method-param>java.lang.String</method-param>
                                                
<method-param>java.lang.String</method-param>
                                        </method-params>
                                </method>
                        </finder-method>

sven
-- 
======================================================================================
Sven E. van 't Veer                                          
http://www.cachoeiro.net
Java Developer                                                      [EMAIL PROTECTED]
======================================================================================

Reply via email to