Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

EJB Transaction

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I came across this question:-
Which of the following transaction attributes assigned to a business method willcause the container to throw java.lang.IllegalStateException when
the method calls EJBContext.getRollbackOnly?
a. Mandatory
b. Never
c. NotSupported
d. Required
e. RequiresNew
F. Supports

Answer: B, C, F
A method with Never, NotSupported, or Supports usually runs in an unspecified context.

I am not able to understand why Supports always run in unspecified context.
If the method is called from a transaction then this method should run under that transaction and there will not be any java.lang.IllegalStateException. Any help?
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree "Supports" is an odd-ball. Is it possible the wording of the question should be "could cause" instead of "will cause"?
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic