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

rollback messages

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All:
My question pertains to the following code.

Is the sending of the message part of the transaction and therefore does not occur because of the rollback?
Thanks.
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think yes, if your JMS provider is JTA aware. Also, you have to set up your app server to use XA JMS connection factory.
All my IMHO, never used it in practice.
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Serge,
I appreciate your response but what I'm looking for is what is guaranteed by the spec. Keep in mind that since this is a certification forum answers should reflect what is guaranteed by the spec and not what is possible outside of the spec.
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'll make a brain storm over this.
My answer would be yes, I'll tell why.
First of all to use the UserTransaction methods ur MDB HAS to be a BMT demarcated bean as the specs dictate. Then u're asking if your message will be rolled back and the specs is clear about this if u look at 17.1.1 where it says:
With bean-managed transaction demarcation, the enterprise bean code demarcates transactions using
the javax.transaction.UserTransaction interface. All resource manager[27] accesses
between the UserTransaction.begin and UserTransaction.commit calls are part of a
transaction.

then on the foot note:
[27]The terms resource and resource manager used in this chapter refer to the resources declared in the enterprise bean�s deployment
descriptor using the resource-ref element. This includes not only database resources, but also JMS Connections. These
resources are considered to be �managed� by the Container.
regards.
[ February 02, 2004: Message edited by: Marcos Maia ]
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marcos.
reply
    Bookmark Topic Watch Topic
  • New Topic