• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Transactions - DD

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
On page 353 of the spec, there is a statement as follows :
Statement > "It is required that all the methods specified in a single container-transaction element be methods of the same enterprise bean".
But the syntax of the DD is
<container-transaction>
<method>
<ejb-name>
<method-name>
</method>
.
<trans-attribute>
</container-transaction>
Why is <ejb-name> encapsulated within <method> instead of <container-transaction> if the above given statement holds good ?
Wouldn't it make more sense if
<container-transaction>
<ejb-name>
<method>
<method-name>
</method>
.
<trans-attribute>
</container-transaction>
so that one container-transaction would have declarations for all methods of one bean for a transaction type ?
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And there is one more point to this question. If that statement on page 353 of the spec is really right, it means that the example given on page 504 of the Head First EJB book is wrong, because it refers to methods on different beans in the same container-transaction element.
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Akasmat: You have a valid point here. But SUN is known for its weird naming conventions and DD xml syntax elements is no exception.
Constantino : Brilliant! .....spot-on!
It is mentioned in the errata at the OReilly site.
http://www.oreilly.com/catalog/hfjejb/errata/hfjejb.unconfirmed
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic