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

Topic: Big doubt! Spec Page 361 -- IllegalStateException for Supports attribute.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I read Spec page 361: The Container must throw the java.lang.IllegalStateException if the EJBContext.setRollbackOnly() method is invoked from a business method executing with the Supports, NotSupported, or Never transaction attribute.

Why there's exception for Supports Attribute? I understand, there's no transaction context for 'never' attribute, and unspecified transaction context for 'NotSupported' attribute, but method with 'Supports' attribute can have a valid transaction context (as long as the invoking method -- which invokes this 'Supports' attribute method -- has a valid transaction context, the 'Supports' attribute method will use this transaction context, so, the setRollbackOnly() can be invoked --- Why still IllegalStateException? Unless the invoking method has no valid transaction context, then the IllegalStateException should be thrown

Wait for you guys' suggestion.

Hai
 
Seriously? That's what you're going with? I prefer this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic