• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Container-Transaction tag ???

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MZ Study Notes say: It is required that all the methods specified in a single container-transaction element be methods of the SAME enterprise bean. However, HF (Page 504) shows an example of Container-Managed transaction tag where multiple methods of multiple beans are shown in it. Please reply which is correct.

Something like:

<container-transaction>
<method>
<ejb-name>BeanA</ejb-name>
<method-name>MethodA</method-name>
</method>
<method>
<ejb-name>BeanA</ejb-name>
<method-name>MethodB</method-name>
</method>
<method>
<ejb-name>BeanXYZ</ejb-name>
<method-name>MethodXYZ</method-name>
</method>
</container-transaction>
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I asked the same question --
https://coderanch.com/t/160523/java-EJB-SCBCD/certification/container-transaction-tag

Gemini
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The EJB 2.0 spec - 17.4.1 Transaction attributes did say:

The Application Assembler uses the container-transaction elements to define the transaction attributes for the methods of session and entity bean home and component interfaces and for the onMessage methods of message-driven beans. Each container-transaction element consists of a list of one or more method elements, and the trans-attribute element. The container-transaction element specifies that all the listed methods are assigned the specified transaction attribute value. It is required that all the methods specified in a single container-transaction element be methods of the same enterprise bean.

 
Deep Chand
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So that means, this is a mistake in HF. Correct?
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right. I corrected my post in the other thread. I just wonder why this is not true regarding the method-permission element. I checked the section 21.3.2 of the spec (Application Assembler responsibilities) regarding the method-permission and it does not say that all the methods must be from the same bean, althought the example shown in page 445 shows this arrangement - notice the role employee appearing in two method-permission elements. Any ideas?

Regards,
Stefan
 
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic