when to choose session beans / entity beans

can anybody help out , i am new to EJB i am not understanding when to choose session bean or entity beans . i know that entity beans are meant for persistence and session beans are for to maintain the state . explain the diff by taking real time scenarios. Thx in advance.
[279 byte] By [balu45a] at [2007-11-26 18:23:14]
# 1

Hi,

Session beans, as the name suggest are used to execute a business transaction while the client session is alive. During this time entity bean could be used to represent the data manipulated by the sesion bean.

For e.g. adding a book to your shopping cart.

Session Bean - add a book to shopping cart.

Entity Bean - A book.

for more information about difference between both the bean types ... read.. http://forum.java.sun.com/emailmessage!default.jspa?messageID=9502230

javaProa at 2007-7-9 5:57:07 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...