Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

test question  RSS feed

 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is a question from a mock test for IBM 484. I dont think I understand the question well enough.
Given an Order entity EJB and a single class loader, which of the following is a Singleton? (choose one only)

A. OrderHomeRemote

B. OrderBean

C. OrderRemote

D. Order

Although I dont understand the question very well, A and C dont make sense at all. Since there is nothing called a OrderHomeRemote and OrderRemote. I would rather choose D because there can be many instances of the bean and making it a singleton makes little sense.
Am I on the right track? Any ideas?
PK
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say this is a very vaugu question. Without any giving any scenario
making anything singleton never makes sense.
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Folks,
I remember this question from the pre-assessment/sample test.
And I have passed the 484 back in August!
I think the best answer is "A", by process of elimination:
  • "D" is kind of stupid (they are trying to catch you).
  • "B" cannot be correct... the containers has a pool to work with.
  • "C" cannot be correct... there will be a remote for every client.


  • Ta da!
     
    Radha Damera
    Ranch Hand
    Posts: 35
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Prakash...
    The answer for this question is A.I don't know what the test IBM 484 is about.But i learnt EJB using WSAD.So if u look the redbooks on WSAD,we will be given sample code as to how to locate beans using JNDI.There the utlity class uses a method called singleton, which is used to call the beans. There we have to specify the remote home interface as a parameter in calling the bean.
    So obviously the answer is A, which is the home remote interface name of the order entity bean.
    Hope this clears a bit.
    Radha.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!