Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Doubts on answers for Q 5,Q15 in Chapter 6

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic