org.springframework.web.context.support.SpringBeanAutowiringSupport Java Examples

The following examples show how to use org.springframework.web.context.support.SpringBeanAutowiringSupport. 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: BootstrapServlet.java    From multiapps-controller with Apache License 2.0 6 votes vote down vote up
@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    try {
        SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
        initializeApplicationConfiguration();
        initializeProviders();
        initializeFileService();
        initExtras();
        executeAsyncDatabaseChanges();
        processEngine.getProcessEngineConfiguration()
                     .getAsyncExecutor()
                     .start();
        LOGGER.info(Messages.ALM_SERVICE_ENV_INITIALIZED);
    } catch (Exception e) {
        LOGGER.error("Initialization error", e);
        throw new ServletException(e);
    }
}
 
Example #2
Source File: CloudStartupServlet.java    From cloudstack with Apache License 2.0 6 votes vote down vote up
@Override
public void init(ServletConfig config) throws ServletException {
    LogUtils.initLog4j("log4j-cloud.xml");
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());

    // wait when condition is ready for initialization
    _timer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            if (ComponentContext.getApplicationContext() != null) {
                _timer.cancel();

                TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
                try {
                    ComponentContext.initComponentsLifeCycle();
                } finally {
                    txn.close();
                }
            }
        }
    }, 0, 1000);
}
 
Example #3
Source File: CloudStartupServlet.java    From cosmic with Apache License 2.0 6 votes vote down vote up
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());

    // wait when condition is ready for initialization
    _timer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            if (ComponentContext.getApplicationContext() != null) {
                _timer.cancel();

                final TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
                try {
                    ComponentContext.initComponentsLifeCycle();
                } finally {
                    txn.close();
                }
            }
        }
    }, 0, 1000);
}
 
Example #4
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 #5
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 #6
Source File: LessonManagerServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #7
Source File: ApiServlet.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
 
Example #8
Source File: NotificationServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #9
Source File: UserRoleServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #10
Source File: LearningDesignSVGServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #11
Source File: ConsoleProxyServlet.java    From cosmic with Apache License 2.0 4 votes vote down vote up
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
    s_keysMgr = _keysMgr;
}
 
Example #12
Source File: ApiServlet.java    From cosmic with Apache License 2.0 4 votes vote down vote up
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
 
Example #13
Source File: YggdrasilServlet.java    From authlib-agent with MIT License 4 votes vote down vote up
@Override
public void init() throws ServletException {
	SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, getServletContext());
}
 
Example #14
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 #15
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 #16
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 #17
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 #18
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 #19
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 #20
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 #21
Source File: ConsoleProxyServlet.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
@Override
public void init(ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
    s_keysMgr = _keysMgr;
}
 
Example #22
Source File: ExampleRichlet.java    From zkspringboot with Apache License 2.0 4 votes vote down vote up
@Override
public void init(RichletConfig config) {
	super.init(config);
	SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getWebApp().getServletContext());
}
 
Example #23
Source File: LoginRequestLtiServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #24
Source File: RecalculateTotalMarksForLessonServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #25
Source File: CompleteItemServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #26
Source File: CompleteItemServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #27
Source File: LogLessonMarkPushedToIntegrationsServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #28
Source File: RepopulateProgressMarksServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #29
Source File: PopulateMarksServlet.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
   public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
   }
 
Example #30
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);
   }