• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

acknowledge-mode in MDB

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I read in HFE p.460 as well as in spec 15.4.8 p.317 that if the message driven bean uses container managed transaction demarcation, message acknowledgment is handled automatically as a part of the transaction commit. (that is, if I unserstand well, if transaction commits, the receipt will is acknowledged by the container and if the transaction fails, no receipt and the JMS provider will resend the message).

But, as far as I know, it's allowed to specify two attributes for a transaction in CMT: Required and NotSupported.
For Required, what the spec explains is OK, because there's a valid transaction context.
But if NotSupported is specified, there's no valid transaction context present and I don't understand how in this case, acknowledgment should be tied to the transaction.
In this case, should'nt we use the tag <acknowledge-mode> too, as we do for BMT?

Thanks for youe responses,
[ November 15, 2004: Message edited by: cyril vidal ]
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought that in case of NotSupported, the acknowledgement depends on if the method completed properly or threw an exception.
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is nothing in EJB 2.0 related to NotSupported and
But we know the NotSupported is unspacifed transaction context and for this type of Trancsation context the EJB 2.0 does not have proper specification how container should implement this unspacified context see 17.4.1 of ejb specs and 352 page for this.

So when we chose the MDB with the Unspacifed tracsaction context we are not going for the assured message processing after delivery in onMessage() so here the Transaction acknowlege-mode dose not play part in case of CMT.
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic