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

Mock Question

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following method declarations for a session bean class are valid?
Choices:
A. public void ejbCreate(String name) throws CreateException {}
B. public void ejbCreateBigCart() throws CreateException{}
C. public void ejbCreate(String name) {}
D. public static void ejbCreateSmallCart() {}
E. public final PKeyType ejbCreate() {}
F. public PKeyType ejbCreateLargeAccount() {}

Given Answer is A,B
But According me answer should be A,B,C

Please help
Thanks
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you right, because ejbCreate may throw javax.ejb.CreateExeption and arbitrary application exception defined by bean provider.

Please correct me if I'm wrong .
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

because ejbCreate may throw javax.ejb.CreateExeption and arbitrary application exception defined by bean provider.



The CreateException is mandatory, thats why C is not right.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CreateException is not mandatory in the bean class however it needs to be declared in the home interface of the bean.
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic