Java Code Examples for org.springframework.web.context.support.SpringBeanAutowiringSupport#processInjectionBasedOnCurrentContext()

The following examples show how to use org.springframework.web.context.support.SpringBeanAutowiringSupport#processInjectionBasedOnCurrentContext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SituationTriggerInstanceListener.java    From container with Apache License 2.0 5 votes vote down vote up
@PostPersist
public void startSituationTriggerInstanceObserver(final SituationTriggerInstance instance) {
    final SituationTriggerInstanceObserver obs = new SituationTriggerInstanceObserver(instance);
    // this performs service injection for us
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(obs);

    SituationTriggerInstanceListener.obs.add(obs);
    new Thread(obs).start();
}
 
Example 2
Source File: SituationListener.java    From container with Apache License 2.0 5 votes vote down vote up
@PostUpdate
void situationAfterUpdate(final Situation situation) {
    Collection<SituationsMonitor> monis = sitMonRepo.findSituationMonitorsBySituationId(situation.getId());

    // this SHOULD inject the managementBus dependency when we use it
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    for (SituationsMonitor moni : monis) {
        sendServiceInstanceAdaptionEvent(moni);
    }
}
 
Example 3
Source File: ResendMessagesJob.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public ResendMessagesJob() {
//First recover context of the job since it is created by Quartz, not Spring
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
   }
 
Example 4
Source File: CCExportServlet.java    From sakai with Educational Community License v2.0 4 votes vote down vote up
@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
Example 5
Source File: CalendarServlet.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public void init() {
	SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
Example 6
Source File: ApplicationStarted.java    From codenjoy with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void contextInitialized(ServletContextEvent sce) {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    timer.start();
}
 
Example 7
Source File: ApplicationStarted.java    From codenjoy with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void contextInitialized(ServletContextEvent sce) {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    timer.start();
}
 
Example 8
Source File: PeriodicTableAdminWS.java    From softwarecave with GNU General Public License v3.0 4 votes vote down vote up
@PostConstruct
protected void init() {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
Example 9
Source File: PeriodicTableAccessWS.java    From softwarecave with GNU General Public License v3.0 4 votes vote down vote up
@PostConstruct
protected void init() {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    logger.info("Injected " + periodicTableService);
}
 
Example 10
Source File: CCExportServlet.java    From sakai with Educational Community License v2.0 4 votes vote down vote up
@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}