You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
java: a published Spring application event reaches no listener, so @EventListener and ApplicationListener methods have no publisher #1391
A Spring application event published with ApplicationEventPublisher.publishEvent(new T(...)) never reaches its listener, whether that is an @EventListener method taking T or an ApplicationListener<T>. path from publisher to listener says "the two are independent in this graph", and impact on the listener says "nothing resolved depends on it, so the change is local". Measured on 0.1.3 at 0df257c.
@ServicepublicclassOrderService {
privatefinalApplicationEventPublisherpublisher;
privatefinalAuditaudit;
publicOrderService(ApplicationEventPublisherpublisher, Auditaudit) { this.publisher = publisher; this.audit = audit; }
publicvoidplace() { publisher.publishEvent(newOrderPlaced("1")); }
publicvoidship() { publisher.publishEvent(newOrderShipped()); }
publicvoidplaceDirect() { audit.direct(newOrderPlaced("2")); } // control
}
@ComponentpublicclassAudit {
@EventListenerpublicvoidon(OrderPlacede) { record(e.id); }
publicvoiddirect(OrderPlacede) { record(e.id); }
voidrecord(Strings) { }
}
@ComponentpublicclassShipimplementsApplicationListener<OrderShipped> {
@OverridepublicvoidonApplicationEvent(OrderShippede) { }
}
// OrderPlaced has a public final String id; OrderShipped is empty
@EventListener is used only as a name: graph/java/engine/config-resolution/knobs.dl:56 lists it in cfg_listener_ann and graph/java/engine/config-resolution/entry-points.dl:69 makes it a queue entry point. Its parameter type is never read.
graph/java/engine/framework-behavior/destinations.dl:20-22 names "an event published to an @eventlistener" as a hop for that phase, but no rule builds it, and the send side (cfg_sends_method / cfg_sends_owner, knobs.dl:184-209) has no publishEvent entry.
onApplicationEvent of an ApplicationListener implementation is not registered anywhere, so it is not an entry point.
A second publisher form with the same result: Spring Data publishes an aggregate's domain events when the repository saves it, with no publishEvent call in client code. Measured on 0.1.3 at 0df257c; pom.xml with no dependencies, each file in src/main/java/app/ with package app; and its imports.
axiomcode path OrderService.place OrderEvents.onPlaced .: "the two are independent in this graph".
axiomcode path OrderService.placeDirect OrderEvents.direct . (control): one known_edge hop.
axiomcode impact Order.domainEvents .: no entry point, "the change is local"; @DomainEvents and @AfterDomainEventPublication are in no knob list, so both methods have no caller.
CLI and MCP agree. The publisher here is CrudRepository.save/saveAll/delete on a repository whose entity type has a @DomainEvents method (or extends AbstractAggregateRoot), and the event is whatever that method returns.
Activity
swapnilpaliwal-sd commentedon Sep 27, 2026
A second publisher form with the same result: Spring Data publishes an aggregate's domain events when the repository saves it, with no
publishEventcall in client code. Measured on 0.1.3 at 0df257c;pom.xmlwith no dependencies, each file insrc/main/java/app/withpackage app;and its imports.axiomcode path OrderService.place OrderEvents.onPlaced .: "the two are independent in this graph".axiomcode path OrderService.placeDirect OrderEvents.direct .(control): oneknown_edgehop.axiomcode impact Order.domainEvents .: no entry point, "the change is local";@DomainEventsand@AfterDomainEventPublicationare in no knob list, so both methods have no caller.CLI and MCP agree. The publisher here is
CrudRepository.save/saveAll/deleteon a repository whose entity type has a@DomainEventsmethod (or extendsAbstractAggregateRoot), and the event is whatever that method returns.java: a published Spring application event reaches the listeners its …
impact: bump IMPACT_VERSION to 31, so a cache written before event di…
Merge pull request #1630 from AxiomCodeAI/fix/1391-spring-events-rfix
swapnilpaliwal-sd commentedon Sep 28, 2026
Fixed by #1630.