トランザクション構成のサブクラス化に問題があります。
私はこのメソッドを持つクラスAを持っています:
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public EventMessage<ModificaOperativitaRapporto> activate(EventMessage<ModificaOperativitaRapporto> eventMessage) {
// some dao operations
return eventMessage;
}
次に、クラスBサブクラスクラスAであり、activateメソッドをオーバーライドします。
InserimentoCanaleActivator extends ModificaOperativitaRapportoActivator ....
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public EventMessage<ModificaOperativitaRapporto> activate(EventMessage<ModificaOperativitaRapporto> eventMessage) {
// others dao operations
return super.activate(eventMessage);
スーパーメソッドを単独で実行する場合は独自のトランザクションが必要ですが、クラスBのメソッドを実行する場合は、すべての操作が同じトランザクションに参加する必要があります。
何か案が?