Skip to content

Commit

Permalink
[3021] Allow SemanticDataInitializer to trigger other listeners
Browse files Browse the repository at this point in the history
Bug: #3021
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
  • Loading branch information
pcdavid committed Mar 4, 2024
1 parent 19efd22 commit 0ac5358
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.sirius.web.domain.boundedcontexts.semanticdata.services.api.ISemanticDataCreationService;
import org.springframework.data.jdbc.core.mapping.AggregateReference;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.event.TransactionalEventListener;

Expand All @@ -35,7 +36,7 @@ public SemanticDataInitializer(ISemanticDataCreationService semanticDataCreation
this.semanticDataCreationService = Objects.requireNonNull(semanticDataCreationService);
}

@Transactional
@Transactional(propagation = Propagation.REQUIRES_NEW)
@TransactionalEventListener
public void onProjectCreatedEvent(ProjectCreatedEvent event) {
this.semanticDataCreationService.create(AggregateReference.to(event.project().getId()));
Expand Down

0 comments on commit 0ac5358

Please sign in to comment.