• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Transaction

 
vivek kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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?
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • 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"?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic