Package org.jboss.seam.annotations

Examples of org.jboss.seam.annotations.Scope


    public Object invoke(Invocation invocation) throws Throwable
    {
        MethodInvocation mi = (MethodInvocation)invocation;
        KernelControllerContext context = (KernelControllerContext)mi.getArguments()[0];
        Name name = (Name)invocation.resolveClassAnnotation(Name.class);
        Scope scope = (Scope)invocation.resolveClassAnnotation(Scope.class);
        ScopeType scopeType = scope != null ? scope.value() : null;
        if ("setKernelControllerContext".equals(mi.getMethod().getName()) && name != null)
        {
            Object target = context.getTarget();
            boolean unmockApplication = false;
            if (!Contexts.isApplicationContextActive())
View Full Code Here


                // TODO stateless components should not / need not be cached
                // autowire the component if not done yet
                if (!namedComponents.containsKey(compName)) {
                    boolean required = inAnnotation.required();
                    boolean autoCreate = implType.isAnnotationPresent(AutoCreate.class);
                    Scope scopeAnn = implType.getAnnotation(Scope.class);
                    boolean stateless = false;
                    if (scopeAnn != null) {
                        stateless = scopeAnn.value() == ScopeType.STATELESS;
                    }
                    boolean mayCreate = inAnnotation.create() || autoCreate || stateless;
                    if (required && !mayCreate) {
                        String msg = "Not allowed to create required component "+compName+" with impl "+implType+". Try @AutoCreate or @In(create=true).";
                        if (ignoreNonResolvable) {
View Full Code Here

TOP

Related Classes of org.jboss.seam.annotations.Scope

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.