• 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

HFEJP p.520 Q3: Why MUST every business method have a transaction attribute?

 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I think that Answer B is is not correct. Even the question hints that there are only TWO correct answers.

Do you agree ?



Regards,
Darya
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I think option B is also correct. I found the following in EJB Specs Section 17.4.1 page 351


� For a session bean, the transaction attributes must be specified for the methods defined in the
bean�s component interface and all the direct and indirect superinterfaces of the component
interface, excluding the methods of the javax.ejb.EJBObject or
javax.ejb.EJBLocalObject interface. Transaction attributes must not be specified for
the methods of a session bean�s home interface.
� For an entity bean, the transaction attributes must be specified for the methods defined in the
bean�s component interface and all the direct and indirect superinterfaces of the component
interface, excluding the getEJBHome, getEJBLocalHome, getHandle, getPrimaryKey,
and isIdentical methods; and for the methods defined in the bean�s home interface
and all the direct and indirect superinterfaces of the home interface, excluding the
getEJBMetaData and getHomeHandle methods specific to the remote home interface.
� For a message-driven bean, the transaction attribute must be specified for the bean�s onMessage
method.



It doesn't clearly state about all business methods in all bean types but indirectly it means the same.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pranav,

seems that you are right . Your spec quote goes in hand with what I found on p. 498 in HFEJB where it says that "Business methods in the component interface" MUST be marked with an transaction attribute.

Thanks,
Darya
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic