Package org.apache.wink.common.internal.lifecycle

Examples of org.apache.wink.common.internal.lifecycle.ObjectFactory


            // use ClassUtils.loadClass instead of Class.forName so we have
            // classloader visibility into the Web module in J2EE environments
            appClass = (Class<? extends Application>)ClassUtils.loadClass(initParameter);
           
            // let the lifecycle manager create the instance and process fields for injection
            ObjectFactory of = LifecycleManagerUtils.createSingletonObjectFactory(appClass);
           
            return (Application)of.getInstance(null);
        }
        String appLocationParameter = getInitParameter(APP_LOCATION_PARAM);
        if (appLocationParameter == null) {
            logger.warn(Messages.getMessage("propertyNotDefined", APP_LOCATION_PARAM)); //$NON-NLS-1$
        }
View Full Code Here


            // classloader visibility into the Web module in J2EE environments
            appClass = (Class<? extends Application>)ClassUtils.loadClass(initParameter);

            // let the lifecycle manager create the instance and process fields
            // for injection
            ObjectFactory of = configuration.getOfFactoryRegistry().getObjectFactory(appClass);
            configuration.addApplicationObjectFactory(of);
            return (Application)of.getInstance(null);
        }
        String appLocationParameter = getInitParameter(APP_LOCATION_PARAM);
        if (appLocationParameter == null) {
            if (logger.isWarnEnabled()) {
                logger.warn(Messages.getMessage("propertyNotDefined", APP_LOCATION_PARAM)); //$NON-NLS-1$
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void releaseInstance(RuntimeContext context) {
        if (instance != null) {
            ObjectFactory of = record.getObjectFactory();
            of.releaseInstance(instance, context);
        }
    }
View Full Code Here

            // classloader visibility into the Web module in J2EE environments
            appClass = (Class<? extends Application>)ClassUtils.loadClass(initParameter);

            // let the lifecycle manager create the instance and process fields
            // for injection
            ObjectFactory of = configuration.getOfFactoryRegistry().getObjectFactory(appClass);
            configuration.addApplicationObjectFactory(of);

            return (Application)of.getInstance(null);
        }
        String appLocationParameter = getInitParameter(APP_LOCATION_PARAM);
        if (appLocationParameter == null) {
            if (logger.isWarnEnabled()) {
                logger.warn(Messages.getMessage("propertyNotDefined", APP_LOCATION_PARAM)); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.apache.wink.common.internal.lifecycle.ObjectFactory

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.