Examples of WebApplicationContext


Examples of org.springframework.web.context.WebApplicationContext

        SystemConfigConstants.DATE_FORMAT_JSP);
    getServletContext().setAttribute(
        BaseConstants.LOOKUP_DATE_TIME_FORMAT_PATTERN,
        SystemConfigConstants.DATE_TIME_FORMAT_JSP);

    WebApplicationContext wac = WebApplicationContextUtils
        .getWebApplicationContext(getServletContext());
    ISystemTaskService startupService = (ISystemTaskService) wac
        .getBean(BaseConstants.SERVICE_SYSTEM_TASK_LOOKUP);
    ISystemConfigService sysConfigService = (ISystemConfigService) wac
        .getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);

    SystemConfigVO sysConfigVO = sysConfigService.getSystemConfig();
    getServletContext().setAttribute(BaseConstants.ORGANIZATION_NAME, sysConfigVO.getOrganizationName());
    getServletContext().setAttribute(BaseConstants.ORGANIZATION_SHORT_NAME, sysConfigVO.getOrganizationShortName());
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  public void execute(JobExecutionContext context)
      throws JobExecutionException {

        try{
                    WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
                    IMemberService memService = (IMemberService) wac.getBean(BaseConstants.SERVICE_MEMBER_LOOKUP)
                    ISystemConfigService sysConfigService = (ISystemConfigService) wac.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);
           
                    SystemConfigVO sysConfigVO = sysConfigService.getSystemConfig();
           
                    // This job simply prints out its job name and the
                    // date and time that it is running
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

     * @exception JspException
     * @return int
     */
    public final int doStartTag() throws JspException
    {
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        xlatService = (IXlatService) wac.getBean(BaseConstants.SERVICE_XLAT_LOOKUP);
        memberService = (IMemberService) wac.getBean(BaseConstants.SERVICE_MEMBER_LOOKUP);
        systemConfigService = (ISystemConfigService) wac.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);

        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  @Override
public final int doStartTag() throws JspException
    {
        request = (HttpServletRequest) pageContext.getRequest();
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        systemConfigService = (ISystemConfigService) wac.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);
        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  @Override
public final int doStartTag() throws JspException
    {
        request = (HttpServletRequest) pageContext.getRequest();
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        systemConfigService = (ISystemConfigService) wac.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);
        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

                            {
                                resources.getLogger().info(
                                        String.format("Starting Spring (version %s)", SpringVersion
                                                .getVersion()));

                                WebApplicationContext context = loader
                                        .initWebApplicationContext(servletContext);

                                shutdownHub.addRegistryShutdownListener(shutdownListener);

                                applicationContextCreated.set(true);
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

    public void contextInitialized(ServletContextEvent event) {
        LOG.info("Starting up Pluto Portal Driver. . .");

        ServletContext servletContext = event.getServletContext();

        WebApplicationContext springContext = (WebApplicationContext)
                servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

        LOG.debug(" [1a] Loading DriverConfiguration. . . ");
        DriverConfiguration driverConfiguration = (DriverConfiguration)
                springContext.getBean("DriverConfiguration");

        driverConfiguration.init(servletContext);

        LOG.debug(" [1b] Registering DriverConfiguration. . .");
        servletContext.setAttribute(DRIVER_CONFIG_KEY, driverConfiguration);


        LOG.debug(" [2a] Loading Optional AdminConfiguration. . .");
        AdminConfiguration adminConfiguration = (AdminConfiguration)
                springContext.getBean("AdminConfiguration");

        if (adminConfiguration != null) {
            LOG.debug(" [2b] Registering Optional AdminConfiguration");
            servletContext.setAttribute(ADMIN_CONFIG_KEY, adminConfiguration);
        } else {
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

     *
     * @param servletContext the servlet context.
     */
    private void initContainer(ServletContext servletContext) {

        WebApplicationContext springContext = (WebApplicationContext)
                servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

        // Retrieve the driver configuration from servlet context.
        DriverConfiguration driverConfig = (DriverConfiguration)
                servletContext.getAttribute(DRIVER_CONFIG_KEY);

        try {
            LOG.info("Initializing Portlet Container. . .");

            LOG.debug(" [1] Loading RequiredContainerServices. . .");
            RequiredContainerServices required =
                    (RequiredContainerServices) springContext.getBean("RequiredContainerServices");

            LOG.debug(" [2] Loading OptionalContainerServices. . .");
            OptionalContainerServices optional =
                    (OptionalContainerServices) springContext.getBean("OptionalContainerServices");


            // Create portlet container.
            LOG.debug(" [3] Creating portlet container...");
            PortletContainerFactory factory =
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

    /**
     * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
     */
    public void contextInitialized( ServletContextEvent sce )
    {
        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext( sce
            .getServletContext() );

        // to simulate Plexus load on start with Spring
        Continuum continuum = (Continuum) wac.getBean( PlexusToSpringUtils.buildSpringId( Continuum.class ) );

        BuildsManager buildsManager = (BuildsManager) wac.getBean( PlexusToSpringUtils.buildSpringId( BuildsManager.class, "parallel" ) );

        TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
            .buildSpringId( TaskQueueExecutor.class, "prepare-release" ) );

        TaskQueueExecutor performRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
            .buildSpringId( TaskQueueExecutor.class, "perform-release" ) );

        TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
            .buildSpringId( TaskQueueExecutor.class, "rollback-release" ) );       
       
        TaskQueueExecutor purge = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
            .buildSpringId( TaskQueueExecutor.class, "purge" ) );

        TaskQueueExecutor prepareBuildProject = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
            .buildSpringId( TaskQueueExecutor.class, "prepare-build-project" ) );

        DistributedBuildManager distributedBuildManager = (DistributedBuildManager) wac.getBean( PlexusToSpringUtils
            .buildSpringId( DistributedBuildManager.class ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.