Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mock exam question

 
Vaithiya Sundaram
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJBs, Which two callback methods can be used for synchronizing the bean's state with the database

a. ejbStore() and ejbLoad()
b. ejbActivate() and ejbPassivate()
c. ejbStore() and ejbPasivate()
d. ejbLoad() and ejbActivate()

My answer is a
but mock exam answer is b.
 
Manju Singh
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also think you are right.
 
Dogra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right
 
Marcelo Sousa Ancelmo
Ranch Hand
Posts: 498
Eclipse IDE Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure you are right
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sun says at http://java.sun.com/developer/onlineTraining/EJBIntro/EJBIntro.html

The ejbLoad() and ejbStore() methods in CMP entities are invoked when the entity bean's state is being synchronized with the database. The ejbLoad() is invoked just after the container has refreshed the bean container-managed fields with its state from the database. The ejbStore() method is invoked just before the container is about to write the bean container-managed fields to the database. These methods are used to modify data as its being synchronized. This is common when the data stored in the database is different than the data used in the bean fields. The methods might be used, for example, to compress data before it is stored and decompress it when it is retrieved from the database.


-- Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic