Package org.qi4j.library.spring.bootstrap

Examples of org.qi4j.library.spring.bootstrap.Qi4jApplicationBootstrap

Importing Spring beans as services

  1. Application bootstrap class must implement interface {@link ApplicationContextAware}.
  2. In the application bootstrap import service to the module using method {@link ModuleAssembly#importedServices(Class)}.
  3. Set concrete Spring bean as meta-data of the imported service.

Look at org.qi4j.library.spring.bootstrap.Qi4jExportServiceTest for sample implementation.


    private static final String CLASS = "class";

    @Override
    public final BeanDefinition parse( Element anElement, ParserContext aParserContext )
    {
        Qi4jApplicationBootstrap bootstrap = createQi4jApplicationBootstrap( anElement, aParserContext );
        AbstractBeanDefinition factoryBeanDefinition = createQi4jApplicationFactoryBeanDefinition( bootstrap );
        registerBean( aParserContext, factoryBeanDefinition );
        return factoryBeanDefinition;
    }
View Full Code Here


            readerContext.error( CLASS + "attribute is not an instance of [" + Qi4jApplicationBootstrap.class.getName()
                    + "] class", anElement );
            return null;
        }

        Qi4jApplicationBootstrap bootstrap = null;
        try
        {
            bootstrap = (Qi4jApplicationBootstrap) instantiateClass( bootstrapClass );
        } catch ( BeanInstantiationException e )
        {
View Full Code Here

TOP

Related Classes of org.qi4j.library.spring.bootstrap.Qi4jApplicationBootstrap

Copyright © 2018 www.massapicom. 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.