Examples of Loader


Examples of org.apache.sling.jcr.base.internal.loader.Loader

     *
     * @param session The JCR {@code Session} to define name spaces on
     * @throws RepositoryException if an error occurrs defining the name spaces
     */
    final void defineNamespacePrefixes(final Session session) throws RepositoryException {
        final Loader localHandler = this.getLoader();
        if (localHandler != null) {
            // apply namespace mapping
            localHandler.defineNamespacePrefixes(session);
        }

        // call namespace mappers
        final NamespaceMapper[] nsMappers = getNamespaceMapperServices();
        if (nsMappers != null) {
View Full Code Here

Examples of org.apache.sling.launchpad.base.shared.Loader

     */
    private void startSling() {

        try {
            File launchpadHome = getLaunchpadHome(slingHome);
            this.loader = new Loader(launchpadHome) {
                @Override
                protected void info(String msg) {
                    log(msg);
                }
            };
View Full Code Here

Examples of org.apache.sling.launchpad.base.shared.Loader

        }

        info("Starting Apache Sling in " + slingHome, null);
        this.started = true;

        Loader loaderTmp = null;
        try {
            final File launchpadHome = getLaunchpadHome(slingHome,
                commandLineArgs);
            loaderTmp = new Loader(launchpadHome) {
                @Override
                protected void info(String msg) {
                    Main.info(msg, null);
                }
            };
View Full Code Here

Examples of org.apache.sqoop.job.etl.Loader

        Configuration conf = null;
        if (!isTest) {
          conf = context.getConfiguration();
          loaderName = conf.get(JobConstants.JOB_ETL_LOADER);
        }
        Loader loader = (Loader) ClassUtils.instantiate(loaderName);

        // Objects that should be pass to the Executor execution
        PrefixContext subContext = null;
        Object configConnection = null;
        Object configJob = null;
        Schema schema = null;

        if (!isTest) {
          // Propagate connector schema in every case for now
          // TODO: Change to coditional choosing between HIO and Connector schema
          schema = ConfigurationUtils.getConnectorSchema(conf);

          switch (ConfigurationUtils.getJobType(conf)) {
            case EXPORT:
              subContext = new PrefixContext(conf, JobConstants.PREFIX_CONNECTOR_CONTEXT);
              configConnection = ConfigurationUtils.getConfigConnectorConnection(conf);
              configJob = ConfigurationUtils.getConfigConnectorJob(conf);
              break;
            case IMPORT:
              subContext = new PrefixContext(conf, "");
              configConnection = ConfigurationUtils.getConfigFrameworkConnection(conf);
              configJob = ConfigurationUtils.getConfigFrameworkJob(conf);
              break;
            default:
              throw new SqoopException(MapreduceExecutionError.MAPRED_EXEC_0023);
          }
        }

        // Create loader context
        LoaderContext loaderContext = new LoaderContext(subContext, reader, schema);

        LOG.info("Running loader class " + loaderName);
        loader.load(loaderContext, configConnection, configJob);
        LOG.info("Loader has finished");
      } catch (Throwable t) {
        readerFinished = true;
        LOG.error("Error while loading data out of MR job.", t);
        // Release so that the writer can tell the framework something went
View Full Code Here

Examples of org.apache.tomcat.Loader

     *
     * @param loader The newly associated loader
     */
    public void setLoader(Loader loader) {

  Loader oldLoader = this.loader;
  this.loader = loader;
  if (this.loader != null)
      this.loader.setContainer(this);
  support.firePropertyChange("loader", oldLoader, this.loader);

View Full Code Here

Examples of org.apache.tomcat.Loader

  if (servletClass == null)
      throw new ServletException
    (sm.getString("standardWrapper.noServlet"));

  // Acquire an instance of the class loader to be used
  Loader loader = ((Context) getParent()).getLoader();
  if (loader == null)
      throw new ServletException
    (sm.getString("standardWrapper.noLoader"));
  ClassLoader classLoader = loader.getClassLoader();

  // Load and initialize an instance of the specified servlet class
  try {
      Class classClass = classLoader.loadClass(servletClass);
      Servlet servlet = (Servlet) classClass.newInstance();
View Full Code Here

Examples of org.apache.turbine.modules.Loader

     * @param type The Type of the Assembler
     * @return A Loader instance for the requested type
     */
    public Loader getLoader(String type)
    {
        Loader loader = null;

        if (isCaching && loaderCache.containsKey(type))
        {
            loader = loaderCache.get(type);
            log.debug("Found " + type + " loader in the cache!");
View Full Code Here

Examples of org.hibernate.annotations.Loader

    //SQL overriding
    SQLInsert sqlInsert = property.getAnnotation( SQLInsert.class );
    SQLUpdate sqlUpdate = property.getAnnotation( SQLUpdate.class );
    SQLDelete sqlDelete = property.getAnnotation( SQLDelete.class );
    SQLDeleteAll sqlDeleteAll = property.getAnnotation( SQLDeleteAll.class );
    Loader loader = property.getAnnotation( Loader.class );
    if ( sqlInsert != null ) {
      collection.setCustomSQLInsert( sqlInsert.sql().trim(), sqlInsert.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlInsert.check().toString().toLowerCase() )
      );

    }
    if ( sqlUpdate != null ) {
      collection.setCustomSQLUpdate( sqlUpdate.sql(), sqlUpdate.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlUpdate.check().toString().toLowerCase() )
      );
    }
    if ( sqlDelete != null ) {
      collection.setCustomSQLDelete( sqlDelete.sql(), sqlDelete.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDelete.check().toString().toLowerCase() )
      );
    }
    if ( sqlDeleteAll != null ) {
      collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDeleteAll.check().toString().toLowerCase() )
      );
    }
    if ( loader != null ) {
      collection.setLoaderName( loader.namedQuery() );
    }

    //work on association
    boolean isMappedBy = !BinderHelper.isDefault( mappedBy );
    collection.setInverse( isMappedBy );
View Full Code Here

Examples of org.hibernate.search.engine.Loader

      DocumentExtractor extractor = new DocumentExtractor( searchFactoryImplementor, indexProjection );
      for (int index = first; index <= max; index++) {
        //TODO use indexSearcher.getIndexReader().document( hits.id(index), FieldSelector(indexProjection) );
        infos.add( extractor.extract( hits, index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      return new IteratorImpl( infos, loader );
    }
    catch (IOException e) {
      throw new HibernateException( "Unable to query Lucene index", e );
    }
View Full Code Here

Examples of org.hibernate.search.engine.Loader

    try {
      hits = getHits( searcher );
      int first = first();
      int max = max( first, hits );
      DocumentExtractor extractor = new DocumentExtractor( searchFactory, indexProjection );
      Loader loader = getLoader( (Session) this.session, searchFactory );
      return new ScrollableResultsImpl( searcher, hits, first, max, fetchSize, extractor, loader, searchFactory );
    }
    catch (IOException e) {
      //close only in case of exception
      try {
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.