Example usage for org.springframework.context.support AbstractApplicationContext APPLICATION_EVENT_MULTICASTER_BEAN_NAME

List of usage examples for org.springframework.context.support AbstractApplicationContext APPLICATION_EVENT_MULTICASTER_BEAN_NAME

Introduction

In this page you can find the example usage for org.springframework.context.support AbstractApplicationContext APPLICATION_EVENT_MULTICASTER_BEAN_NAME.

Prototype

String APPLICATION_EVENT_MULTICASTER_BEAN_NAME

To view the source code for org.springframework.context.support AbstractApplicationContext APPLICATION_EVENT_MULTICASTER_BEAN_NAME.

Click Source Link

Document

Name of the ApplicationEventMulticaster bean in the factory.

Usage

From source file:org.jahia.services.SpringContextSingleton.java

private void multicastEvent(ApplicationEvent event, AbstractApplicationContext ctx) {
    if (!ctx.isActive()) {
        return;/* w  w  w.  ja v  a2  s. com*/
    }
    if (ctx.containsBean(AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME)) {
        ((ApplicationEventMulticaster) ctx
                .getBean(AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME))
                        .multicastEvent(event);
    } else {
        // fall back to publishEvent()
        ctx.publishEvent(event);
    }
}