congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ApplicationContextHolder.setApplicationContext
Code IndexAdd Tabnine to your IDE (free)

How to use
setApplicationContext
method
in
org.finra.herd.core.ApplicationContextHolder

Best Java code snippets using org.finra.herd.core.ApplicationContextHolder.setApplicationContext (Showing top 7 results out of 315)

origin: org.finra.herd/herd-tools-common

  /**
   * Creates and returns the Spring application context.
   *
   * @return the application context
   */
  protected ApplicationContext createApplicationContext()
  {
    // Create the Spring application context and register the JavaConfig classes we need.
    // We will use core (in case it's needed), the service aspect that times the duration of the service method calls, and our specific beans defined in
    // the data bridge configuration. We're not including full service and DAO configurations because they come with database/data source dependencies
    // that we don't need and don't want (i.e. we don't want the database to be running as a pre-requisite for running the uploader).
    AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
    ApplicationContextHolder.setApplicationContext(applicationContext);
    applicationContext.register(CoreSpringModuleConfig.class, DataBridgeSpringModuleConfig.class, DataBridgeAopSpringModuleConfig.class,
      DataBridgeEnvSpringModuleConfig.class);
    applicationContext.refresh();
    return applicationContext;
  }
}
origin: FINRAOS/herd

  /**
   * Creates and returns the Spring application context.
   *
   * @return the application context
   */
  private ApplicationContext createApplicationContext()
  {
    // Create the Spring application context and register the JavaConfig classes we need.
    // We will use core (in case it's needed), the service aspect that times the duration of the service method calls, and our specific beans defined in
    // the data bridge configuration. We're not including full service and DAO configurations because they come with database/data source dependencies
    // that we don't need and don't want (i.e. we don't want the database to be running as a pre-requisite for running the application).
    AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
    ApplicationContextHolder.setApplicationContext(applicationContext);
    applicationContext.register(CoreSpringModuleConfig.class, DataBridgeSpringModuleConfig.class, DataBridgeAopSpringModuleConfig.class,
      DataBridgeEnvSpringModuleConfig.class);
    applicationContext.refresh();
    return applicationContext;
  }
}
origin: FINRAOS/herd

  /**
   * Creates and returns the Spring application context.
   *
   * @return the application context
   */
  protected ApplicationContext createApplicationContext()
  {
    // Create the Spring application context and register the JavaConfig classes we need.
    // We will use core (in case it's needed), the service aspect that times the duration of the service method calls, and our specific beans defined in
    // the data bridge configuration. We're not including full service and DAO configurations because they come with database/data source dependencies
    // that we don't need and don't want (i.e. we don't want the database to be running as a pre-requisite for running the uploader).
    AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
    ApplicationContextHolder.setApplicationContext(applicationContext);
    applicationContext.register(CoreSpringModuleConfig.class, DataBridgeSpringModuleConfig.class, DataBridgeAopSpringModuleConfig.class,
      DataBridgeEnvSpringModuleConfig.class);
    applicationContext.refresh();
    return applicationContext;
  }
}
origin: FINRAOS/herd

  /**
   * Creates and returns the Spring application context.
   *
   * @return the application context
   */
  private ApplicationContext createApplicationContext()
  {
    // Create the Spring application context and register the JavaConfig classes we need.
    // We will use core (in case it's needed), the service aspect that times the duration of the service method calls, and our specific beans defined in
    // the data bridge configuration. We're not including full service and DAO configurations because they come with database/data source dependencies
    // that we don't need and don't want (i.e. we don't want the database to be running as a pre-requisite for running the application).
    AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
    ApplicationContextHolder.setApplicationContext(applicationContext);
    applicationContext.register(CoreSpringModuleConfig.class, DataBridgeSpringModuleConfig.class, DataBridgeAopSpringModuleConfig.class,
      DataBridgeEnvSpringModuleConfig.class);
    applicationContext.refresh();
    return applicationContext;
  }
}
origin: FINRAOS/herd

  @Override
  protected void prepareContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)
  {
    // Set the application context in the context holder for access by static @Bean methods.
    ApplicationContextHolder.setApplicationContext(context);

    // Perform standard functionality.
    super.prepareContext(context, mergedConfig);
  }
}
origin: FINRAOS/herd

  @Override
  protected void prepareContext(GenericApplicationContext context)
  {
    // Set the application context in the context holder for access by static @Bean methods.
    ApplicationContextHolder.setApplicationContext(context);

    // Perform standard functionality.
    super.prepareContext(context);
  }
}
origin: org.finra.herd/herd-app

/**
 * Initializes the context loader listener which bootstraps Spring and provides access to the application context.
 *
 * @param servletContext the servlet context.
 */
protected void initContextLoaderListener(ServletContext servletContext)
{
  // Add the context loader listener for the base (i.e. root) Spring configuration.
  // We register all our @Configuration annotated classes with the context so Spring will load all the @Bean's via these classes.
  // We also set the application context in an application context holder before "registering" so static @Bean's
  // (e.g. PropertySourcesPlaceholderConfigurer) will have access to it since they can't take advantage of autowiring or having a class be
  // ApplicationContextAware to get it.
  AnnotationConfigWebApplicationContext contextLoaderListenerContext = new AnnotationConfigWebApplicationContext();
  ApplicationContextHolder.setApplicationContext(contextLoaderListenerContext);
  contextLoaderListenerContext
    .register(CoreSpringModuleConfig.class, DaoSpringModuleConfig.class, DaoEnvSpringModuleConfig.class, ServiceSpringModuleConfig.class,
      ServiceEnvSpringModuleConfig.class, UiSpringModuleConfig.class, UiEnvSpringModuleConfig.class, RestSpringModuleConfig.class,
      AppSpringModuleConfig.class);
  servletContext.addListener(new ContextLoaderListener(contextLoaderListenerContext));
}
org.finra.herd.coreApplicationContextHoldersetApplicationContext

Popular methods of ApplicationContextHolder

  • getApplicationContext

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Collectors (java.util.stream)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now