File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Transactions - DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Transactions - DD " Watch "Transactions - DD " New topic
Author

Transactions - DD

Goan Balchao
Ranch Hand

Joined: Mar 25, 2002
Posts: 93
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 ?


Hemant Kamat<br />SCJP2<br />SCWCD<br />SCBCD<br />SCEA-I
Constantino Cronemberger
Greenhorn

Joined: Mar 03, 2004
Posts: 12
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.
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transactions - DD