Examples of ApplicationContext


Examples of co.cask.cdap.api.app.ApplicationContext

        .add(new FilePermission(outputFile.getAbsolutePath(), "write"))
        .apply();
 
      // Now, we call configure, which returns application specification.
      DefaultAppConfigurer configurer = new DefaultAppConfigurer(app);
      app.configure(configurer, new ApplicationContext());
      ApplicationSpecification specification = configurer.createApplicationSpec();

      // Convert the specification to JSON.
      // We write the Application specification to output file in JSON format.
      try {
View Full Code Here

Examples of com.antlersoft.appcontext.ApplicationContext

    analyzerThreadCount = 1;
  }
 
  public static AppContext createContextWithLegacyCommandLine( String argv[])
  {
    ApplicationContext ac=new ApplicationContext(argv);
    if ( ac.getParameter(DATABASE_PROPERTY_KEY)==null && argv.length>0 &&
        ! argv[argv.length-1].contains("="))
      ac=new ApplicationContext( argv[argv.length-1], argv);
    return ac;
  }
View Full Code Here

Examples of com.caucho.config.scope.ApplicationContext

      } catch (Throwable e) {
        log.log(Level.FINEST, e.toString(), e);
      }

      _singletonScope = new SingletonScope();
      _applicationScope = new ApplicationContext();
     
      addContext(new RequestContext());
      addContext("com.caucho.server.webbeans.SessionScope");
      addContext("com.caucho.server.webbeans.ConversationContext");
      addContext("com.caucho.server.webbeans.TransactionScope");
View Full Code Here

Examples of com.esri.gpt.framework.context.ApplicationContext

   * If not, use THRESHOLD_MAXRECORDS.
   * @return max records threshold
   */
  private static synchronized int getMaxRecordsThreshold() {
    if (maxRecordsThreshold==null) {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      ApplicationConfiguration appCfg = appCtx.getConfiguration();
      StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
      String value = parameters.getValue("lucene.maxrecords.threshold");
      maxRecordsThreshold = Val.chkInt(value, THRESHOLD_MAXRECORDS);
    }
    return maxRecordsThreshold;
View Full Code Here

Examples of com.firefly.core.ApplicationContext

    Assert.assertThat((Long) obj2[1], is(10000000000L));
  }

  @Test(expected = ClassCastException.class)
  public void testIdTypeError() {
    ApplicationContext context = new XmlApplicationContext("firefly2.xml");
    CollectionService collectionService = context
        .getBean("collectionService");
    for (Integer i : collectionService.getSet())
      i++;

  }
View Full Code Here

Examples of com.google.refine.rdf.app.ApplicationContext

  Repository expected;
  RdfSchema schema;
  @BeforeClass
  public void init()throws Exception{
    expected = buildExpectedModel();
    ApplicationContext ctxt = new ApplicationContext();
    schema = getRdfSchema();
    project = buildTheSampleProject(schema);
    engine = new Engine(project);
    exporter = new RdfExporter(ctxt,RDFFormat.RDFXML);
    ControlFunctionRegistry.registerFunction("urlify", new Urlify());
View Full Code Here

Examples of com.khs.sherpa.context.ApplicationContext

      configLocation = SHERPA_CONFIG_LOCATION;
    }
   
    SherpaSettings settings = new SherpaSettings(configLocation);
   
    ApplicationContext applicationContext = null;
   
    // check if sherpa for spring application context is available
    // if not, then use non-spring app context
    Class<?> springApplicationContextClass = null;
    try {
      springApplicationContextClass = Class.forName(SPRING_APP_CONTEXT_CLASS_NAME);
      LOGGER.info("USING SHERPA SPRING APPLICATION CONTEXT");
    } catch (ClassNotFoundException e1) {
      springApplicationContextClass = null;
    }
   
    if(springApplicationContextClass != null) {
      try {
        applicationContext = (ApplicationContext) springApplicationContextClass.getDeclaredConstructor(ServletContext.class).newInstance(servletContextEvent.getServletContext());
      } catch (InstantiationException e) {
        e.printStackTrace();
        throw new SherpaRuntimeException(e);
      } catch (IllegalAccessException e) {
        e.printStackTrace();
        throw new SherpaRuntimeException(e);
      } catch (IllegalArgumentException e) {
        e.printStackTrace();
        throw new SherpaRuntimeException(e);
      } catch (SecurityException e) {
        e.printStackTrace();
        throw new SherpaRuntimeException(e);
      } catch (InvocationTargetException e) {
        e.printStackTrace();
        throw new SherpaRuntimeException(e);
      } catch (NoSuchMethodException e) {
        e.printStackTrace();
        throw new SherpaRuntimeException(e);
      }
    } else {
      applicationContext = new GenericApplicationContext();
    }
   
    ManagedBeanFactory managedBeanFactory = applicationContext.getManagedBeanFactory();
   
    applicationContext.setAttribute(ApplicationContext.CONTEXT_PATH,
        servletContextEvent.getServletContext().getContextPath());
   
    applicationContext.setAttribute(ApplicationContext.SETTINGS_JSONP, settings.jsonpSupport());
    applicationContext.setAttribute(ApplicationContext.SETTINGS_ADMIN_USER, settings.sherpaAdmin());
    applicationContext.setAttribute(ApplicationContext.SETTINGS_ENDPOINT_AUTH, settings.endpointAuthenication());
   
    applicationContext.setAttribute(StringParamParser.DEFAULT, settings.encoding());
    applicationContext.setAttribute(DateParamParser.DEFAULT, settings.dateFormat());
    applicationContext.setAttribute(CalendarParamParser.DEFAULT, settings.dateFormat());
   
    // Settings
    applicationContext.setAttribute(SherpaSettings.SETTINGS_SERVER_URL, settings.serverUrl());
    applicationContext.setAttribute(SherpaSettings.SETTINGS_SERVER_TOKEN, settings.serverToken());
   
    if(InitManageBeanFactory.class.isAssignableFrom(managedBeanFactory.getClass())) {
      ((InitManageBeanFactory)managedBeanFactory).init(settings, servletContextEvent.getServletContext());
      ((InitManageBeanFactory)managedBeanFactory).loadManagedBeans(settings.endpoint());
    }
View Full Code Here

Examples of com.structis.fichesst.shared.config.ApplicationContext

  ClientUtilsateurGrpService serviceUser;
  @Autowired
  ClientRoleService serviceRole;
  @Override
  public ApplicationContext loadappli() {
    ApplicationContext context=new ApplicationContext();
    List<ChantierModel> chantierModels=serviceChantier.findAll();
    Map<String,ChantierModel> mapChantier=new HashMap<String, ChantierModel>();
    for (ChantierModel chantierModel : chantierModels) {
      mapChantier.put(chantierModel.getNom(), chantierModel);
    }
    context.setMapChantier((HashMap<String,ChantierModel>) mapChantier);
    return context;
  }
View Full Code Here

Examples of com.vaadin.service.ApplicationContext

                response.setHeader("Retry-After", "" + RETRY_AFTER_MILLISECONDS);
                return;
            }

            // de-serialize or create application context, store in session
            ApplicationContext ctx = getApplicationContext(request, memcache);

            super.service(request, response);

            // serialize
            started = new Date().getTime();
View Full Code Here

Examples of com.volantis.mcs.context.ApplicationContext

     */
    public ApplicationContext createApplicationContext(
            MarinerRequestContext requestContext)
                throws RepositoryException {

        ApplicationContext applicationContext = null;

        // Get the Volantis bean.
        Volantis volantisBean = Volantis.getInstance();
        if (volantisBean == null) {
            throw new IllegalStateException
View Full Code Here
TOP
Copyright © 2015 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.