Re: finder or select methods - how to....
Konstantin Ignatyev <[email protected]> Sat, 23 Mar 2002 16:00:57 -0800 (PST)
| Newsgroups | gmane.comp.java.ejb.general |
|---|---|
| Message-ID | <[email protected]> |
Do you mean DB independence( portability?)? I do not believe in that. But if you will use SQL92 than your SQL code will be portable enough. Again, do not create objects, unless you are going to perform CRUD. Performance etc. EJBs suppose to have only storage logic... All your business logic should go to SessionBeans. Read really good book Core EJB Pattern for more information. --- niksa_os <[email protected]> wrote: > > 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!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.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/