• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Buggy ENthuware Questions

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consider the following code snippet appearing in a client of an enterprise JavaBean. Assuming that line 11 always prints the sum of all integers passed in the add() calls by this client, what can be said about the client and the bean?





1) This code is bugy because it assumes that it is the sole user of the bean.

2) This code is bugy because it is reusing the bean remote reference.

3) This is a valid client code and the bean is an EJB 2.0 Entity bean.

4) This is a valid client code and the bean is a stateful session bean.

5) This is a valid client code and the bean is a stateless session bean.


the correct answer given is 4.

it can be only correct answer if this 6 line of code is replaced by

 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you think that the String in context lookup must be "java:comp/env/test/MyBean/local"? Isn't it immaterial to the question ?

BTW, the subject line of your post is quite misleading
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. The string ought to be "java:comp/env/test/MyBean/local".
But looking at the options you have here, it seems the string is immaterial to the question.
If you assumed that the string is not important to this question (based on the options you've got), then Option 4 is the most appropriate answer.
 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply.

Don't you think, using this line of code, the code will work or not ?



Because i have seen some enthuware questions, based upon these line's- whether java:comp/env is present or not.
It makes the difference in answer.
 
reply
    Bookmark Topic Watch Topic
  • New Topic