Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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

soft scbcd test questions?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1) The statement is true or false:
In a session bean's setSessionContext(SessionContext) method the
component interface of the session bean can be obtained by calling
javax.ejb.SessionContext's getEJBObject() or getEJBLocalObject() method

Answer is FALSE. I think it should be TRUE


(2) The statement is true or false: Transaction attributes are specified at the ejb-jar file level i.e., they are applicable to all the enterprise beans in the same ejb-jar file

Answer - FALSE . why?

(3) A message-driven bean instance can not concurrently serve multiple clients.
if this is true then session / entity beans can serve clients concurrently?

Regards,
Yamini
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by yamini nadella:
(1) The statement is true or false:
In a session bean's setSessionContext(SessionContext) method the
component interface of the session bean can be obtained by calling
javax.ejb.SessionContext's getEJBObject() or getEJBLocalObject() method

Answer is FALSE. I think it should be TRUE



ONLY Bean thing you can do in set<Session/Entity>Context(...) method is
Use your <Session/Entity>Context -> to get a reference to your home
(HFEJB page 196)
So answer should be FALSE.

Originally posted by yamini nadella:
[QB(2) The statement is true or false: Transaction attributes are specified at the ejb-jar file level i.e., they are applicable to all the enterprise beans in the same ejb-jar file

Answer - FALSE . why?
[/QB]


Transaction attributes are described on per method basis. See following DD example


So you describe both ejb name and method name and trans-attributes are described on per method basis.
Hence the answer should be FALSE

Originally posted by yamini nadella:
[QB(3) A message-driven bean instance can not concurrently serve multiple clients.
if this is true then session / entity beans can serve clients concurrently?
[/QB]



A single Stateless session bean can handle multiple clients as long as only one client at a time is in the middle of a method. (HFEJB Page 103)

But clients never share the bean.

Entity beans, client share the home and may share the bean (HFJEB page 99)
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add to the previous answer to:

Originally posted by yamini nadella:
[QB(3) A message-driven bean instance can not concurrently serve multiple clients.
if this is true then session / entity beans can serve clients concurrently?
[/QB]



I'm currently running through the EJB 2.0 spec, and came across the following which may help with regards to the entity beans part of your questions.
The EJB 2.0 spec, page 119, just before section 9.7.1 states:

Multiple clients can access the same entity object concurrently. Transactions are used to isolate the clients' work from each other.



Cheers,
Roger
SCJP 1.2,1.4, studying for SCBCD
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic