• 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

it should be msg.setRollbackOnly() ,NOT mdc.setRollbackOnly();

 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using this link as tutorial.
http://weblogs.java.net/blog/kalali/archive/2006/05/step_by_step_to.html

why it mdc.setRollbackOnly() in catch block.It should be msg.setRollbackOnly()
Because there is no mdc variable here.


 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Samanthi perera wrote:It should be msg.setRollbackOnly()
Because there is no mdc variable here.




You do have the "mdc" variable, look carefully.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Plus there isn't a setRollbackOnly() method on TextMessage.

I mean... the code wouldn't have compiled if there wasn't an "mdc" variable, nor if you had changed it to "msg". I'm confused.

That's a pretty old tutorial.
 
reply
    Bookmark Topic Watch Topic
  • New Topic