Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Query using Timer Service and Entity/Entity Beans

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a small confusion surrounding the following question from the JavaBeat SCBCD 5.0 Mock Exam:


7) Imagine that the Application you develop periodically sends some events to some other parts of the Application at some defined intervals. Which of the following enterprise bean(s) can be used in this scenario?

1. Entity Bean
2. Stateful Session Bean
3. Stateless Session Bean
4. Message Driven Bean
5. Timer Bean
6. None of the above.



From memory I felt that 1, 3, and 4 were correct, however, the stated answer is that only 3 and 4 are correct. Firstly, I am right is interpretting this question as looking for the understanding of where a Timer can be created? If so, I think that answer is wrong. Trawling my memory banks I clearly remembered a statement in O'Reilly EJB 3.0 book that stated Entity Beans can create timers. After a quick scan I found the following (p48):


Timers can be set on entity, stateless session, and message beans.



To further inestigate this I looked at the EJB 3.0 spec which clearly states that a EJB 3.0 Entity can not create a Timer whereas a EJB 2.x Entity Bean can.

Am I right in thinking that the correct use of the term Entity Bean is to refer to a EJB 2.x Entity Bean (managed by the container and thus able to create a Timer) and that the term Entity refers to a EJB 3.0 Entity (not managed by the container and thus unable to create a Timer)? If so then am I right is saying that answer to the JavaBeat question is wrong? (I'm fairly new to EJB 3.0 and the exam and its objectives so be kind!)

thanks,

Graeme
 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think you are right in your fact, they should mention in their question whether they are referring to EJB 2.X Entity Bean .

Because in EJB 3.0, there is no such concept of Entity Beans.

One Clue you can have is whether this exam is for EJB 3.0 or EJB 2.1.

If the exam is for EJB 3.0, just ignore the Entity Beans.
 
It's never done THAT before. Explain it to me tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic