Win a copy of Terraform in Action this week in the Cloud 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

ejbRemove and transaction context

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HFEJB - q 18 page 371
The answer says that ejbRemove runs in the transaction context of the method that causes their invocations.
I read in the spec that a transaction type must be mentioned for ejbRemove(). If I am mentioning a transaction of 'RequiredNew' then how come ejbRemove would run under the tx of the invoker.
thanks.
- walk rustin
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ejbSelect() and ejbLoad() methods run in the transaction context of the called business method exposed in the remote interface.
ejbRemove() runs in the transaction context of the corresponding remove() method, present in the home/remote interface. (the transaction context attribute needs to be specified for both the remove methods in the home interface remove(handle),remove(primarykey) and also remove() method of the remote interface in the DD).
The question could have been properly phrased as :

Which method(s) run in the transaction context of the business method that causes their invocation?....

(the word business is missing in the actual question in the book)
then there are only 2 answers, ejbSelect() and ejbLoad(), else 3 answers including ejbRemove.
ejbActivate(), ejbPassivate() and setEntityContext() anyway run in an unspecified transaction context.
[ March 19, 2004: Message edited by: Vish Kumar ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic