fractals wrote:
> 
> 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') ?
Where does it say that? You mean for a finder that returns multiples?
Hurt me harder, please!

But at any rate for the finders, JBoss CMP does exactly what you
suggest.
Here's what jaws does for a Collection findByBlah( yada )

      String sql = "SELECT " + getPkColumnList() +
                   " FROM "+jawsEntity.getTableName()+ " WHERE ";
      
      sql += cmpField.getColumnName() + "=?";
Confidential e-mail for addressee only.  Access to this e-mail by anyone else is 
unauthorized.
If you have received this message in error, please notify the sender immediately by 
reply e-mail 
and destroy the original communication.


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to