This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Two TransactionTemplate use my single application. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Two TransactionTemplate use my single application." Watch "Two TransactionTemplate use my single application." New topic
Author

Two TransactionTemplate use my single application.

selva raja
Ranch Hand

Joined: Nov 24, 2009
Posts: 69
Dear experts,

In my spring application i have used two different daos,DataSourceTransactionManager, and TransactionTemplate(module1,common1) in various places. Please find below code more info,


Dao1.xml:




Dao2.xml:




Is there going to create any performance issues?

Thanks,
SR

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

What is your purpose for having two of them. Are you talking to two different databases? Need XA DataSources? Two-phase commit?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
selva raja
Ranch Hand

Joined: Nov 24, 2009
Posts: 69
Thanks... I am using single database. These codes already there in production.
Is there going to create any performance issues?


Thanks,
SR
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

No the Template is using the TransactionManager. You would use the Template if you want to use a callback interface implementation to manually code Transactions yourself if you want to punish yourself. ;)

Mark
 
Don't get me started about those stupid light bulbs.
 
subject: Two TransactionTemplate use my single application.
 
Similar Threads
Error creating bean with name 'datasource': Invocation of init method failed; comp not bound
Understand regarding REQUIRED and REQUIRES_NEW
org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
java persistence error
Transaction issues in spring web mvc?