I think we all know that for each finder method that returns N rows
that there are at least N+1 queries for the simple case
(one table - one bean).

Does it seem reasonable to instead perform only ONE select
statement and cache the results around myself ???

I could do the following:

1) Change Finder methods to select all of the data
   (Select * from table) and not just the primary key
   information.

2) Create customized Enumeration classes for our ejbFind methods.

  class TablePKEnum implements Enumeration
  {
    TablePKEnum(ResultSet rs)
    boolean hasMoreElements()

    // returns a TablePK AS NEEDED and
    // CACHES all other data
    Object nextElement()
  }

3) Check Cache during ejbLoad

All of the Entity beans are using TX_REQUIRED.

Are there any special considerations to take into account?

Is there a better way?

Thanks,
-Steven

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to