Actually, there are significant differences. The obvious ones being that Entity beans provide modularity, extensibility and portability.
However, put in brief, direct JDBC access from a session bean (usually stateless) will [probably] result in better performance. But in this case, you have traded off modularity and extensibility for performance and complexity. That aside, a well designed EJB Container (such as ours ;) will provide fast, optimized access to entity beans. That is, though entity beans are transactional, an EJB Container (for e.g.) can instantiate as many instances as there are simultaneous transactions and run these instances in parallel. This means that performance numbers can be misleading. Raw JDBC (say) from a stateless session bean can be (say) twice as fast as that from a session bean via an entity bean to the database. But how does this solution scale and perform when you have 100 simultaneous clients? Or 10,000? Or more? Comments? -krish > -----Original Message----- > From: A mailing list for Enterprise JavaBeans development > [mailto:[EMAIL PROTECTED]]On Behalf Of EJB G > Sent: Friday, November 30, 2001 11:14 AM > To: [EMAIL PROTECTED] > Subject: Question On Architecture > > > What's Difference is following two approach > for server-side components. > > Approach 1 : > Using Coarsed Grained Session Beans to perform > business logic interacting with database directly. > Approach 2. > Using Session Beans to interact with entity beans > which in turn interact with database. > > As far as i know first approach gives better > performance than second one.Then why one should > go for Entity Beans. > We are bit confused whisc approach to follow. > > Thanks in Advance. > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > http://geocities.yahoo.com/ps/info1 > > =========================================================================== > 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".
