This week's book giveaway is in the Raspberry Pi forum.
We're giving away four copies of Getting started with Java on the Raspberry Pi and have Frank DelPorte on-line!
See this thread for details.
Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Confirmation Required for session bean(Q-SCBCD Exam Kit)Manning Pub

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Which of the following methods can be called from the code of a stateless session
bean�s client?
a. ejbCreate()
b. remove()
c. create()
d. ejbRemove()
e. createDiscount()
Answer: B, C

I believe the answer should be b,c,e
as it has been asked about the valid methods from session bean client (can be called using reference of Home & Component interface) so createDiscount can be a business method that can be declared in component interface & its implementation can be in bean class as the spec says
The name of business method in bean class should not begin with ejb(can begin with create)
Let me know your opinion?
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To me the question sounds like, which method can be called from the client of a stateless session bean. Stateless session bean creates cannot have any other name apart from create. Hence, B and C are the right answers.
 
Awishek sinha
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But Can't we have a business method named createDiscount in session bean class as ejb spec can allow me have this named method.(specs says we cannot have business method starting with name ejb..)
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question looks like which methods on a Home interface of Stateless session bean.

According to the spec (section 7.11.6) only one create is allowed in
the home of Stateless session bean.



So last one is not a correct answer. Hope that clears your doubt.
 
Awishek sinha
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I too agree if it's using HomeInterface we can call only create() & remove() but question does not say home
Which of the following methods can be called from the code of a stateless session
bean�s client?
(not specified only home interface)
Let me know if i comrehend the question wrong
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In that case the question is not framed properly, From the methods given it looks like it should be Home interface.
The real exam would not have question where language is not clear.
 
Do you want ants? Because that's how you get ants. And a tiny ads:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic