• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question on exercise pg 108 HFE

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
A magnificient life is loaded with tough challenges. En garde tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic