Candide,
If you are using CMP JBoss provides finder methods (for free!) for all of
the bean attributes. Example:
public class MyBean implements EntityBean {
public String name;
public Integer height;
....
...
}
In your home i/f you can just declare methods:
public collection findByName () throws FinderException, RemoteException;
public collection findByHeight () throws FinderException,
RemoteException;
The naming convention is significant - there is documentation on the web
site regarding this.
This is one of the really nice featues about JBoss.
Ian.
----- Original Message -----
From: "fractals" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 05, 2001 8:08 AM
Subject: [JBoss-user] CMP vs BMP
>
> First of all, thanks to Sacha Labourey and Chris Kimpton: everything works
> fine now, and fast. I just had to understand that ejb's don't necesseraly
> HAVE TO be used everywhere.
> Now, another performance-related question:
>
> I've read somewhere in the JBoss tutorial that the default behavior of the
> container when asked to search for a specific information concerning an
> ejb's field is to instantiate all the beans and do a lookup inside the
> fields of each object. I wrote myself a couple of finder methods which
> return primary keys. Why in the world can't JBoss write the trivial SQL
> itself for such things as a "field lookup" (say for something like: select
> id from users where firstname='Candide') ?
>
> However, I can always write the trivial SQL myself, but what a pitty,
don't
> you think ?
>
> Candide Kemmler
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user