Examples of BeanManagerLocator


Examples of org.jboss.solder.beanManager.BeanManagerLocator

                    "org.jboss.weld.environment.servlet.javax.enterprise.inject.spi.BeanManager");
        }

        // lookup via BeanManagerLocator
        if (beanManager == null) {
            BeanManagerLocator locator = new BeanManagerLocator();
            if (locator.isBeanManagerAvailable()) {
                beanManager = locator.getBeanManager();
            }
        }

        // place BeanManager in the known attribute
        sce.getServletContext().setAttribute(BEANMANAGER_SERVLETCONTEXT_KEY, beanManager);
View Full Code Here

Examples of org.jboss.solder.beanManager.BeanManagerLocator

    @Override
    public ExternalContext getExternalContext(final Object context, final Object request, final Object response)
            throws FacesException {
        try {
            BeanManager manager = new BeanManagerLocator().getBeanManager();

            SeamExternalContext seamExternalContext = BeanManagerUtils
                    .getContextualInstance(manager, SeamExternalContext.class);
            seamExternalContext.setWrapped(parent.getExternalContext(context, request, response));
View Full Code Here

Examples of org.jboss.solder.beanManager.BeanManagerLocator

    @Override
    public Application getApplication() {

        // retrieve SeamApplicationWrapper and set parent correctly
        if (applicationWrapper == null) {
            BeanManager beanManager = new BeanManagerLocator().getBeanManager();
            applicationWrapper = BeanManagerUtils.getContextualInstance(beanManager, SeamApplicationWrapper.class);
            applicationWrapper.setParent(delegate.getApplication());
        }

        return applicationWrapper;
View Full Code Here

Examples of org.jboss.solder.beanManager.BeanManagerLocator

    }

    @Override
    public void validate(final FacesContext context) {
        context.getApplication().publishEvent(context, PreValidateEvent.class, UIValidateForm.class, this);
        BeanManager manager = new BeanManagerLocator().getBeanManager();
        manager.fireEvent(this, BEFORE);

        Validator validator = null;
        try {
            validator = context.getApplication().createValidator(getValidatorId());
View Full Code Here

Examples of org.jboss.solder.beanManager.BeanManagerLocator

        return parent.getNavigationCases();
    }

    @Override
    public void handleNavigation(final FacesContext context, final String fromAction, final String outcome) {
        BeanManager manager = new BeanManagerLocator().getBeanManager();
        NavigationHandler navigationHandler = context.getApplication().getNavigationHandler();

        NavigationCase navigationCase;
        if (navigationHandler instanceof ConfigurableNavigationHandler) {
            navigationCase = ((ConfigurableNavigationHandler) navigationHandler)
View Full Code Here

Examples of org.jboss.solder.beanManager.BeanManagerLocator

public class AuditEntityListener {
   
    @PrePersist
    public void persist(Object entity) {
        BeanManager beanManager = new BeanManagerLocator().getBeanManager();
        Set<Bean<?>> beans = beanManager.getBeans(PrePersistAuditListener.class);
        for (Bean<?> bean : beans) {
            PrePersistAuditListener result = (PrePersistAuditListener) beanManager.getReference(
                    bean, PrePersistAuditListener.class, beanManager.createCreationalContext(bean));
            result.prePersist(entity);
View Full Code Here

Examples of org.jboss.solder.beanManager.BeanManagerLocator

        }
    }
   
    @PreUpdate
    public void update(Object entity) {
        BeanManager beanManager = new BeanManagerLocator().getBeanManager();
        Set<Bean<?>> beans = beanManager.getBeans(PreUpdateAuditListener.class);
        for (Bean<?> bean : beans) {
            PreUpdateAuditListener result = (PreUpdateAuditListener) beanManager.getReference(
                    bean, PreUpdateAuditListener.class, beanManager.createCreationalContext(bean));
            result.preUpdate(entity);
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.