• Post Reply Bookmark Topic Watch Topic
  • New Topic

TX data source and non TX data source  RSS feed

 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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??
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because then you don't need to implement the transaction management stuff.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!