• Post Reply Bookmark Topic Watch Topic
  • New Topic

EPractice Labs final exam question 35

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You want to implement a scheduler to process reporting algorithm. The report will not be shared and it will emailed to only root administrator.

A: Create a stateless session bean and register with the EJB timer service for time-based event notification.
...
C. Create a singleton session bean and register with the EJB timer service for time-based event notification.

The model answer : C.


But the answer should be A because there is a key word "the report will not shared". If a singleton is used as the model answer says, the variables in the singleton will be shared across the application and among different clients.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36032
432
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed. Maybe there thinking there is no state so they don't need a pool? I'd use a stateless bean here too.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!