• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Why transaction attributes can't be specified for session bean home interface?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the spec it says that

A transaction attribute is a value associated with a method of a session or entity bean�s home or component interface or with the onMessage method of a message-driven bean. The transaction attribute specifies how the Container must manage transactions for a method when a client invokes the method
via the enterprise bean�s home or component interface or when the method is invoked as the result of the arrival of a JMS message.
The transaction attribute must be specified for the following methods:
� 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.

In the first para it says that "A transaction attribute is a value associated with a method of a session or entity bean�s home or component interface " and in the last para it says that "Transaction attributes must not be specified for the methods of a session bean�s home interface".

Can some body please explain what's going on here,iam confused.Thanks for your help.
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Transaction attributes must be specified for the business methods of both entity and session beans. They must not be specified for the methods of a session bean's home interface because these methods are not part of a client's transaction. However, an entity bean's home interface has methods like create() and remove() which involve database operations and are therefore transactional.
 
We can walk to school together. And we can both read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic