The Artima Developer Community
Sponsored Link

Legacy Design Forum
Composition Versus Inheritance



This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.



Posted by Tushar Parate on July 20, 2001 at 2:13 PM

> > How to go about deciding whether to use session beans and entity bean?
> > How to distrubute the responsibilties?
> >what is the difference between stateful and stateless beans?

Ans For 1 and 3
1) Session Bean:
session bean is a bean which is used for the perticular client session. If the client quit the application the session will finish.And it will not maintain the state of the client.It is not persitant. So Go for the session bean when you don't want to maintain the state of the application.

Entity Bean:
Entity Bean are those beans which maintain the state for the client.And it's transcation are maintain in the database.So go for the Entity bean when you want to maintain state and information in the database.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us