Re: finder or select methods - how to....

"niksa_os" <[email protected]> Sat, 23 Mar 2002 14:01:43 +0100
Newsgroups gmane.comp.java.ejb.general,gmane.spam.detected
Message-ID <000201c1d26c$223fec00$47261dc3@z>
> Very rough outline:
>
> That is a common mistake to use EntityBeans methods to
> find list of objects just for browse. It kills
> performance and convenience.
> Possible solution:
> A Session bean should be aware of DB structure and
> should take care of browsing and searching. When time
> comes to CRUD (CreateReadUpdateDelete) for an object,
> then use EntityB and its finder methods.
>
> In your case I would suggest to create SQL dynamically
> on SessionBean depends on some meta-description(s).

Yes, I think about that, but in this case SessionBean is less portable
because of JDBC stuff. I can do this with properties but.........

What you think about this solution?
All code is in one Entity, and only expected numbers of EJB objects were
created.

For every field I make select method which return Set. And after that I call
all this select method in one ejbHome and make retainAll(Collection) which
return only expected numbers of EJB objects to the session.

What's your opinion? Lots SQLs to DB?


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Tiny Wireless Camera under $80!
Order Now! FREE VCR Commander!
Click Here - Only 1 Day Left!
http://us.click.yahoo.com/nuyOHD/7.PDAA/yigFAA/5cFolB/TM
---------------------------------------------------------------------~->

EJB-Developer group email addresses:
  Post message: [email protected]
  Subscribe:    [email protected]
  Unsubscribe:  [email protected]
  List owner:   [email protected]

Our other technical discussion groups:
 - For general Java (J2EE) questions/answers: http://groups.yahoo.com/group/Java_Developer
 - For peer-to-peer software development discussion: http://groups.yahoo.com/group/P2P-Developer

Web link to the EJB-Developer group:
  http://groups.yahoo.com/group/EJB-Developer

ATTENTION: You are receiving this message because you actively subscribed to the EJB-Developer technical discussion group on Yahoo! Groups.  All subscriptions come from Yahoo-verified email addresses and are logged; therefore subscriptions can be proved to any appropriate legal authority.  To unsubscribe, send a blank email from the email address receiving group messages to the "Unsubscribe" email address shown above.  If unsubscribing doesn't work, send a message concerning this problem to [email protected].  Only Yahoo! Groups is responsible for their own subscription services; the moderator will not perform these services at any time.

*** EJB-Developer - A free service brought to you by Democracy 2.0 (www.democracy2.org) *** 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/