• 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
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

mock question

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
     
    Ranch Hand
    Posts: 44
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    Greenhorn
    Posts: 13
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
     
    Yes, my master! Here is the tiny ad you asked for:
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic