Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Entity bean - NameNotFoundException

 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A sample mock question:
When a CMP entity bean tries to access the javax.transaction.UserTransaction thru a JNDI lookup,
then it would result which exception?
A. javax.Naming.NameNotFoundException
B. IllegalStateException
Answer: javax.Naming.NameNotFoundException
Is that correct?
[ December 30, 2003: Message edited by: Vish Kumar ]
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, offhand, I do not know the answer to this, and in fact, I do not know if the type of exception is specified in the EJB spec (and I haven't tried it). But if it is NOT defined in the spec, then it is not a valid question (and I *can* tell you that this is not in the exam! )
Perhaps someone else has found this in the specification, but I am not aware of it, and for the purpose of the exam, I would not worry about this particular scenario.
cheers,
kathy
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kathy,
As long as it is not in the exam, I am fine...
I found this Q in SoftLearn-Systems mock exam and wasn't sure.
Out of curiosity, now I tried to search for the word namenotfoundexcetpion
in the spec and to my surprise, I came up with this...
page: 431, 20.7
"The Container must not make the UserTransaction interface available to the enterprise beans that are not allowed to use this interface. The Container should throw javax.naming.NameNotFoundException if an instance of an enterprise bean that is not allowed to use the UserTransaction
interface attempts to look up the interface in JNDI." :roll:
[ December 30, 2003: Message edited by: Vish Kumar ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic