• 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

transaction doubt

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can the setRollbackOnly() method be called in the absence of a transaction??

well...ucertify definitely agrees to this !!
 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

See 13.6.2.8 from JSR-220.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Aditya,

some of these questions are very tricky, when they say: can call or can call succesfully because you sure can call it beacuse EJBContext has been injected and available but you cant call it successfully and it will throw IllegalStateException. It depends on how a question is worded.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
only beans with persistence context CMT can call setRollbackOnly() method
[ July 20, 2008: Message edited by: Rafael Rocha ]
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually on exams, when sun asks: can the method be called?
Sun means: will the method call complete successfully?
The answer to the question is no, as far as I am concerned.
 
Vinay Nath
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well if the question is about Operations allowed, then I am pretty sure it is allowed. So if the question is asking whether you can call a method while a transaction context or not then you have to answer according to that.

When question asks: can this operation be sucessfully completed then you have to take into consideration whether it succeeds or not.

So how the question is worded is important, I wouldnt assume anything about Sun questions because the questions are worded in a very specific manner. So it becomes important to not only know if something is possible but also if it is right to do it or not.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic