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

ejb-jar.xml question. Please clarify

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<ejb-jar>
<display-name>MyEJB</display-name>
<enterprise-beans>
<session>
<ejb-name>MyEJB</ejb-name>
<home>MyEJBHome</home>
<remote>MyEJBRemote</remote>
<ejb-class>MyEJBBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MyEJB</ejb-name>
<method-name>Method1</method-name>
</method>
<trans-attribute>Mandatory</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>MassmodsDA</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Never</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>


Suppose this is my deployment descriptor.
What is transaction attribute associated to my method "Method1".

Is this "Mandatory" or "Never"? Does direct declaration of the method overwrites "*" declaration?

Please clarify.
Thanks.
[ April 15, 2008: Message edited by: nalini kumari ]
 
author & internet detective
Posts: 41775
887
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by nalini kumari:
Does direct declaration of the method overwrites "*" declaration?


Yes. The "*" only applies to methods you haven't specified directly when everything is in the deployment descriptor. (I recall the rule being more involved when some transaction settings are annotated in EJB 3 JPA beans.)
 
nalini kumari
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for clarifying.
 
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic