In have a service class configured with Spring.NET. DoWork accomplsihes two tasks which should run in two transactions. But Spring.NET seems not invoke any transactional AOP behaviour. I must annotate DoWork() with the Transaction attribute but this would wrap both Tasks in one transaction which I don't want. How can I solve the problem?
IMyService service.DoWork();
public class MyServiceImpl : IMyService
{
public DoWork()
{
Task1();
Task2();
}
[Transaction(ReadOnly=false)]
protected void Task1()
{
// do it
}
[Transaction(ReadOnly=false)]
protected void Task2()
{
// do it
}
}