This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Get Programming with Java (MEAP only) and have Peggy Fisher on-line!
See this thread for details.
Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Doubts on answers for Q 5,Q15 in Chapter 6  RSS feed

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure about the correct answers for Q5 and Q15 on chapter 6 of HFEJB

Q5) What are legal declarations for a CMP bean
The option B is right , but what is wrong with Option D

public int ejbCreate() throws CreateException

Q15) Which methods are always called in direct response to a client operation?

The options B) ejbCreate C) ejbRemove have been marked right
But option D) ejbActivate is left out. why is it so?

ejbActivate is called only on response to a client invoking some method and not by the container whenever it wants to ..

Can anyone throw some light on this?

Thanks,
Muthu
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Muthu,

Q5 answer D is not correct, because this method has to retunr the primary and the primary key has to be a class, not just a primitive. Integer instead of int would have been OK.

Q15 answer D is not correct, because the client cannot call the ejbActivate() method on the bean.

Hope this helps,
Herman
 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Herman for the response. I am clear with the first one, but not clear with the second one.

ejbActivate will not be called by the client directly as is the case with ejbCreate too.

The question was which methods wud be called on direct response to a client's action and 'ejbActivate' also fits that role..

Thanks,
Muthu
 
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!