Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

is a method in a class part of a transaction?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following problem to be solved. Your response is appreciated.

There are two beans, BeanA and BeanB, and a class ClassC. The BeanA has a method fooA(), and BeanB has a method fooB().
In Deployment Descriptor, the methods fooA and fooB are declared required. The Client calls the method fooA() which in turn calls the method
fooB(). The method fooB() calls a method execute() in ClassC, which is not a bean. The execute() method does an update on a DataBase.
My question is whether the execute() method is part of the transaction that BeanA starts with?
Thanks in advance.
Thambi
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, everything in ClassC#execute() is part of transaction of BeanB, which in its turn (according to your DD) is the same transaction as BeanA. But make sure you do not start separated threads in any of your classes
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also ensure that you are obtained the JDBC connection from the DataSource...
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic