Hello,
I'm a newbie of AppFuse (1.9.4) and I have transaction management issues.
Here is my problem :
I have a manager class wich has to call a tool named 'DdlUtils' (from ASF),
to perform DB dumping. DdlUtils is able to connect to a DB, determines its
type (here : postgres), retrieves its structure and dump all of the data in
a XML file. DdlUtils mostly need a DataSource to do its job.
Before and after dump operation, some DB statements have to be executed.
Then All that must be in the same transaction.
The problem is that DdlUtils seems to be disconnected from the transaction,
then I have deadlocks.
At now, this is my implementation :
Manager class :
SynchronizationManagerImpl
...
private DataSourceTransactionManager transactionManager;
...
public DataSourceTransactionManager getTransactionManager() {
return transactionManager;
}
public void setTransactionManager(DataSourceTransactionManager
transactionManager) {
this.transactionManager = transactionManager;
}
public String synch(){
while(...) {
....
some db insert/update
...
ddltutils(transactionManager.getDataSource()) //
execution
....
some db insert/update
}
}
....
}
applicationContext-ibatis.xml :
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
applicationContext-service.xml :
<bean id="synchronizationManager"
class="com.myapp.SynchronizationManagerImpl">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
.... other properties and dao declarations
</bean>
I use Spring 2.0.7.
I've already tried with TransactionAwareDataSourceProxy and wrapped a
Connection&DataSource to supply always the same connection to DdlUtils, but
the pb stay the same, the transaction is not considered... So, I don't know
how to force DdlUtils to respect current transaction.
Any ideas, suggestions ?
Thx in advance.
Laurent.
--
View this message in context:
http://www.nabble.com/Transaction-transmission-issues-tp20770067s2369p20770067.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]