• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

is a method in a class part of a transaction?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also ensure that you are obtained the JDBC connection from the DataSource...
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic