Hi Stateless session beans are also known as 'doers', they are usually implemented with a pattern called a 'Session Facade'. This facade wraps a business 'use case' into a method call. It, the facade or Session Bean, is the representation ofhte business logic associated with a bunch of data (called Entity Beans). The Entity beans are just 'things', or representations of data, the Session Bean uses them.
If you use client -> entity bean then you have to write the business logic on the client layer. This is a big no no if you want to have nice clean separation of layers. Hope this helps.. > -----Message d'origine----- > De : A mailing list for Enterprise JavaBeans development > [mailto:[EMAIL PROTECTED]]De la part de Tony Micheal > Envoye : Friday, April 05, 2002 2:15 PM > A : [EMAIL PROTECTED] > Objet : Is there an advantage of doing this ?? > > > Hi gurus, > > I've tried many EJB sample codes, and got a question. > I've seen many samples that client(java applicaton, servlet or JSP) > calls Session Beans which call Entity Bean. > Why ? > > Why many codes do like below ? > client --> session bean --> entity bean. > Why NOT like below ? > client --> entity bean. > > I guess that client calls entity bean directly is faster. > > hm...Are there any advantages of doing "client --> session bean --> > entity bean" ? > > or just For keeping a session between client and ejb ?? > > Thanks in advance > > ============================================================== > ============= > 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". > =========================================================================== 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".
