Examples of ApplicationContextFactory


Examples of com.volantis.mcs.application.ApplicationContextFactory

    private void registerPrerendererApplication() {
        // Create servlet and internal application context factory.
        // TODO: There's no internal context factory, because
        // it's not needed for now.
        if (!skipApplicationRegistration) {
            ApplicationContextFactory servletContextFactory = new ServletPrerendererApplicationContextFactory();
            ApplicationContextFactory internalContextFactory = null;

            // Create registry container with servlet and internal context
            // factories.
            ApplicationRegistryContainer registryContainer = new ApplicationRegistryContainer();
            registryContainer
View Full Code Here

Examples of com.volantis.mcs.application.ApplicationContextFactory

            MarinerURL requestURL =
                    volantisBean.getClientAccessibleURL(
                            new MarinerURL("internalRequest"));

            ApplicationContext appContext;
            ApplicationContextFactory acf =
                    applicationRegistryContainer
                    .getInternalApplicationContextFactory();


            // Save away a reference to the enclosing MarinerRequestContext
            // if any.
            enclosingRequestContext = getCurrent(request);
            if (enclosingRequestContext != null) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Saving reference to "
                            + enclosingRequestContext
                            + " from " + request);
                }
            }

            // Get a MarinerPageContext object.
            final MarinerPageContext context;

            if (enclosingRequestContext != null) {
                context =
                        ContextInternals.getMarinerPageContext(
                                enclosingRequestContext);
            } else {
                context = volantisBean.createMarinerPageContext();
            }

            // Create and initialise the EnvironmentContext, do this after the
            // MarinerPageContext has been allocated but before it has been
            // initialised as this is needed during the initialisation.
            environmentContext.initialise(context);
            environmentContext.initialiseSession();

            ExpressionContext exprContext =
                    environmentContext.getExpressionContext();

            // If there is an expression context then it must have been associated
            // with an enclosing request context since we are still initialising
            // this instance of MarinerServletRequestContext. We now must associate
            // the expression context with this MarinerServletRequestContext.
            //
            // An expression context can be associated with more than one request
            // context, although not concurrently. When the request context is no
            // longer needed, the expression context (if any) should be reset to
            // the enclosing request context.
            if (exprContext == null) {
                ExpressionSupport.createExpressionEnv(this,
                        volantisBean, environmentContext,
                        context.getDevicePolicyAccessor());
            } else {
                exprContext.setProperty(MarinerRequestContext.class, this,
                        false);
            }

            ContextInternals.setEnvironmentContext(this, environmentContext);

            if (enclosingRequestContext != null) {
                // Copy our application context, as nothing has changed from an
                // application point of view.
                appContext =
                        ContextInternals.getApplicationContext(
                                enclosingRequestContext);
                if (logger.isDebugEnabled()) {
                    logger.debug("Retrieved applicationContext " + appContext);
                }
            } else {
                // We are the top level request so initialise an application context
                // for this application
                appContext = acf.createApplicationContext(this);
                if (logger.isDebugEnabled()) {
                    logger.debug(
                            "Created new applicationContext " + appContext);
                }
            }
View Full Code Here

Examples of com.volantis.mcs.application.ApplicationContextFactory

            MarinerURL requestURL = createRequestURL(request);
            requestURL = volantisBean.getClientAccessibleURL(requestURL);

            ApplicationContext appContext;
            ApplicationContextFactory acf =
                    applicationRegistryContainer.getServletApplicationContextFactory();


            // Save away a reference to the enclosing MarinerRequestContext
            // if any.
            enclosingRequestContext = getCurrent(request);
            if (enclosingRequestContext != null) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Saving reference to "
                            + enclosingRequestContext
                            + " from " + request);
                }
            }

            // Get a MarinerPageContext object.
            final MarinerPageContext context;

            if (enclosingRequestContext != null) {
                context =
                        ContextInternals.getMarinerPageContext(
                                enclosingRequestContext);
            } else {
                context = volantisBean.createMarinerPageContext();
            }

            // Create and initialise the EnvironmentContext, do this after the
            // MarinerPageContext has been allocated but before it has been
            // initialised as this is needed during the initialisation.
            environmentContext.initialise(context);
            environmentContext.initialiseSession();

            ExpressionContext exprContext =
                    environmentContext.getExpressionContext();

            // If there is an expression context then it must have been associated
            // with an enclosing request context since we are still initialising
            // this instance of MarinerServletRequestContext. We now must associate
            // the expression context with this MarinerServletRequestContext.
            //
            // An expression context can be associated with more than one request
            // context, although not concurrently. When the request context is no
            // longer needed, the expression context (if any) should be reset to
            // the enclosing request context.
            if (exprContext == null) {
                ExpressionSupport.createExpressionEnv(this,
                        volantisBean, environmentContext,
                        context.getDevicePolicyAccessor());
            } else {
                exprContext.setProperty(MarinerRequestContext.class, this,
                        false);
            }

            ContextInternals.setEnvironmentContext(this, environmentContext);

            if (enclosingRequestContext != null) {
                // Copy our application context, as nothing has changed from an
                // application point of view.
                appContext =
                        ContextInternals.getApplicationContext(
                                enclosingRequestContext);
                if (logger.isDebugEnabled()) {
                    logger.debug("Retrieved applicationContext " + appContext);
                }
            } else {
                // We are the top level request so initialise an application context
                // for this application
                appContext = acf.createApplicationContext(this);
                if (logger.isDebugEnabled()) {
                    logger.debug(
                            "Created new applicationContext " + appContext);
                }
            }
View Full Code Here

Examples of org.springframework.batch.core.configuration.support.ApplicationContextFactory

  @ServiceActivator
  public Collection<JobInfo> loadJobs(Resource resource) throws DuplicateJobException {

    Collection<JobInfo> result = new ArrayList<JobInfo>();

    ApplicationContextFactory factory = createApplicationContextFactory(parent, resource);
    Collection<Job> jobs = jobLoader.reload(factory);

    for (Job job : jobs) {
      String name = job.getName();
      int count = 0;
View Full Code Here

Examples of org.trpr.platform.runtime.impl.bootstrapext.spring.ApplicationContextFactory

        // store the thread's context class loader for later use in on the fly loading of proxy handler app contexts
        this.tccl = Thread.currentThread().getContextClassLoader();

        // The common proxy handler beans context is loaded first using the Platform common beans context as parent
        // load this from classpath as it is packaged with the binaries
        ApplicationContextFactory defaultCtxFactory = null;
        for (BootstrapExtension be : this.loadedBootstrapExtensions) {
            if (ApplicationContextFactory.class.isAssignableFrom(be.getClass())) {
                defaultCtxFactory = (ApplicationContextFactory) be;
                break;
            }
        }
        // we look up the unique instance of ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG. This call would throw an exception if multiple are found
        String commonProxyBeansFileName = FileLocator.findUniqueFile(ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG).getAbsolutePath();
        ServiceProxyComponentContainer.commonProxyHandlerBeansContext = new ClassPathXmlApplicationContext(new String[]{ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG}, defaultCtxFactory.getCommonBeansContext());
        // add the common proxy beans independently to the list of proxy handler contexts as common handlers are declared there
        this.handlerConfigInfoList.add(new HandlerConfigInfo(new File(commonProxyBeansFileName), null, ServiceProxyComponentContainer.commonProxyHandlerBeansContext));

        // Get the Config Service Bean
        this.configService = (SPConfigServiceImpl<T>) ServiceProxyComponentContainer.commonProxyHandlerBeansContext.getBean(ServiceProxyComponentContainer.CONFIG_SERVICE_BEAN);
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.