File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Question on exercise pg 108 HFE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Question on exercise pg 108 HFE" Watch "Question on exercise pg 108 HFE" New topic
Author

Question on exercise pg 108 HFE

Shreyas Reddy
Ranch Hand

Joined: Oct 09, 2003
Posts: 49
I am debating about the answer for the question on page 108 of HFE. These are my answers. Can someone post their opinions/answers.
Thanks,
---------------------------------------------------------
1. "Guaranteed to survive a container crash" --->Doesn't this apply to all types of beans?Stateful session beans state is probably saved somewhere by the container, entity beans has a persistent store, message driven beans dont have the problem.I am doubtful about stateless session beans.
2.Has a client view --> stateful and stateless session beans, entity beans
3.Allows asyn. communiction --> Only Message driven beans
4.Multiple clients can have a ref. tot he same bean --> stateless session bean, entity bean
5. Represents process -> stateful and stateless session beans
6. represents thing -> entity beans
Vitaliy Geraymovych
Greenhorn

Joined: Jun 15, 2004
Posts: 24
Originally posted by Shreyas Reddy:
I am debating about the answer for the question on page 108 of HFE. These are my answers. Can someone post their opinions/answers.
Thanks,
---------------------------------------------------------
1. "Guaranteed to survive a container crash" --->Doesn't this apply to all types of beans?Stateful session beans state is probably saved somewhere by the container, entity beans has a persistent store, message driven beans dont have the problem.I am doubtful about stateless session beans.
2.Has a client view --> stateful and stateless session beans, entity beans
3.Allows asyn. communiction --> Only Message driven beans
4.Multiple clients can have a ref. tot he same bean --> stateless session bean, entity bean
5. Represents process -> stateful and stateless session beans
6. represents thing -> entity beans



Here are my answers:

1. "Guaranteed to survive a container crash" - Only Entity beans, because they represent persistent entities in the store. Stateless and MDB do not survive, container will recreate them after the crash. I am not sure about statefull, it could depend on the vendor implementation but in general passivation doesn't mean persistance, beans is passivated only when client is inactive but will be destroyed after client times out.
2. "Has a client view" - same, Session and Entity.
3. "Allows asyn. communiction" - same, only MDB.
4. "Multiple clients can have a ref. to the same bean" - only Entity beans. If both clients looks for entity bean #10 they will get reference to the same bean instance. NOT for Stateless bean. Container will associate the bean instance with the EJB object only for the time for the call.
5. "Represents process" - Statefull, stateless, MDB. MDB is a process too, only asynchronous.
6. same.

Vitaliy


SCBCD 1.3<br />SCJP 1.2<br /> <br />"Every time I learn something new, it pushes some old stuff out of my brain" H.Simpson
 
Consider Paul's rocket mass heater.
 
subject: Question on exercise pg 108 HFE