Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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.
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic