Results 1 to 3 of 3

Thread: Do I need a distributed transaction ?

  1. #1

    Default Do I need a distributed transaction ?

    I was wondering if this is possible without the use of JTA
    I have DAO that a Business Object uses ... and transactions are currently declared at this level via spring declarative transaction managment (On the business service that is). The datasource is currently against one database. Is it possible to use another dao inside this business object that makes a read only call to another database ?

    --> transaction declared to start @ service level in application conifig against local system
    public MyService {

    --> Call external system to get read only value from DAO1
    --> Insert into local system value received from external system using DAO2

    }

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    AFAIK JTA allows to synchronize multiple database access (insert, update, delete). As you need a read only access to database 2, you do not have to synchronize that r/o access with the ongoing transaction. So you do not need to use JTA for this case.
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    It's certainly possible without JTA. If you are doing a read only call on DB2 (you are) and all other access to it is not distributed across the two DB (it sounds like it isn't) you won't get stale reads, so you are OK.

Similar Threads

  1. Replies: 0
    Last Post: Oct 19th, 2005, 10:00 PM
  2. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  3. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  4. Replies: 4
    Last Post: Nov 5th, 2004, 03:59 AM
  5. Transaction pb Hibernate/MySQL
    By syluser in forum Data
    Replies: 2
    Last Post: Aug 28th, 2004, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •