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 question

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1) with entity beans, the container automatically generates implementations of all find methods at deploy time?

(A) True (B) false

it seems answer is false. why?

then when container generates implementations of find methods?

(2) what memory management techniques container uses in session beans
(A) bean pooling (B) bean purge (C) Bean passivation

Answers are A, C.
I thought answes are B and C.
because Bean pooling comes under performance management? how come it comes under memory management?
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As for the first one, I also missed that , I think answer is True. Any explainations are welcome.

As for second, SLSB are pooled and SFSB are passivated..this can be considered as MM techniques to me, I wont bark at question if Answers are A and B which I prefer.

Amol
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yamini nadella:
it seems answer is false. why?


  • This question doesn't make a distinction between a CMP or BMP bean.
  • I presume this question relates to SCEA part I (310-051) not SCBCD (310-090); the former uses EJB 1.1, not EJB 2.0.


  • In EJB 2.0 I found the following section:

    Chapter 14 EJB 1.1 Entity Bean Component Contract for Container-Managed Persistence
    ...
    14.1.6 finder methods
    ...
    Note that the ejbFind<METHOD> names and parameter signatures of EJB 1.1 entity beans do not provide the container tools with sufficient information for automatically generating the implementation of the finder methods for methods other than ejbFindByPrimaryKey.

    This leads me to believe that in EJB 1.1 finder methods are not generated. Just consult the appropriate specification to confirm.
     
    Akar Rafidj
    Ranch Hand
    Posts: 44
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Even with CMP 2.0, you must define EJBQL query for finders OTHER THAN findByPrimaryKey in the deploiment descriptor so the server can generate implementation.

    Akar
     
    Peer Reynders
    Bartender
    Posts: 2968
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Akar Rafidj:
    Even with CMP 2.0, you must define EJBQL query for finders OTHER THAN findByPrimaryKey


    Despite the presence of the EJB-QL, the container still is responsible for "generating the implementation" (implementing class) - there is no trace of an implementation of the finder method in the (abstract) CMP entity bean class.
     
    Pavel Grushetzky
    Greenhorn
    Posts: 13
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    1) Finder method implementations are not generated for BMP ecntity beans. Therefore statement is false.
    2) Bean pooling lets container to save resources by reusing bean instances

    Bean passivation allows to free some memory by serializing instance and restoring it later on demand.

    Bean purge is not a known term
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic