• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

TX data source and non TX data source

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In weblogic there are TX data sources and non TX Data sources
If we are using simple select queries, update etc then we donot need to use TX data sources.I believe the TX data source is there when you explicitly want to use transaction for data access.
But does it really harm the perforamce etc when we use TX data source for direct JDBC access where transaction is not needed??
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If your application meets any of the following criteria, you should use a TxDataSource in WebLogic Server:

Uses the Java Transaction API (JTA)
Uses the WebLogic Server EJB container to manage transactions
Includes multiple database updates during a single transaction.

 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case I have a class in ejb container that doen't use ejb container managed transaction and also doesn't uses JTA. What is the problem if I still use a TX data source??Is there a reason I shouldn't be using TX data source
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No problems. Theoretically, the non-tx JDBC driver might be faster due to some optimizations but you probably won't see any difference in practice.
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but then I wonder why do you need to provide a non TX data source if it is not faster also?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because then you don't need to implement the transaction management stuff.
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic