Package org.jboss.as.ejb3.component

Examples of org.jboss.as.ejb3.component.MethodIntf


        // views
        Collection<ViewDescription> overrideViews = override.getViews();
        if (overrideViews != null && !overrideViews.isEmpty()) {
            for (ViewDescription view : overrideViews) {
                String viewClassName = view.getViewClassName();
                MethodIntf viewType = ((EJBViewDescription) view).getMethodIntf();
                addView(mergedBean, viewClassName, viewType);
            }
        } else {
            Collection<ViewDescription> originalViews = original.getViews();
            if (originalViews != null) {
                for (ViewDescription view : originalViews) {
                    String viewClassName = view.getViewClassName();
                    MethodIntf viewType = ((EJBViewDescription) view).getMethodIntf();
                    addView(mergedBean, viewClassName, viewType);
                }
            }
        }
    }
View Full Code Here


        }
    }

    private void processViewAnnotations(CompositeIndex index, EJBComponentDescription componentDescription) throws DeploymentUnitProcessingException {
        for (String viewClassName : componentDescription.getViewClassNames()) {
            MethodIntf methodIntf = componentDescription.getMethodIntf(viewClassName);
            ClassInfo viewClass = index.getClassByName(DotName.createSimple(viewClassName));
            if (viewClass != null)
                processClassAnnotations(viewClass, methodIntf, index, componentDescription);
        }
    }
View Full Code Here

        viewTypes.put(getEJBClassName(), MethodIntf.LOCAL);
    }

    @Override
    public MethodIntf getMethodIntf(String viewClassName) {
        MethodIntf methodIntf = viewTypes.get(viewClassName);
        assert methodIntf != null : "no view type known for " + viewClassName;
        return methodIntf;
    }
View Full Code Here

                final Map<String, InjectedValue<ComponentView>> remoteViews = new HashMap<String, InjectedValue<ComponentView>>();
                final Map<String, InjectedValue<ComponentView>> localViews = new HashMap<String, InjectedValue<ComponentView>>();
                for (final ViewDescription view : ejbComponentDescription.getViews()) {
                    boolean remoteView = false;
                    if (view instanceof EJBViewDescription) {
                        final MethodIntf viewType = ((EJBViewDescription) view).getMethodIntf();
                        if (viewType == MethodIntf.HOME || viewType == MethodIntf.REMOTE) {
                            remoteView = true;
                        }
                    }
                    final InjectedValue<ComponentView> componentViewInjectedValue = new InjectedValue<ComponentView>();
View Full Code Here

        if (tx instanceof ForeignTransaction) {
            final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);

            //for timer invocations there is no view, so the methodInf is attached directly
            //to the context. Otherwise we retrieve it from the invoked view
            MethodIntf methodIntf = invocation.getPrivateData(MethodIntf.class);
            if (methodIntf == null) {
                final ComponentView componentView = invocation.getPrivateData(ComponentView.class);
                if (componentView != null) {
                    methodIntf = componentView.getPrivateData(MethodIntf.class);
                } else {
View Full Code Here

            try {
                viewClass = classIndex.classIndex(viewClassName);
            } catch (ClassNotFoundException e) {
                throw EjbMessages.MESSAGES.failToLoadEjbViewClass(e);
            }
            MethodIntf methodIntf = ((EJBViewDescription) view).getMethodIntf();
            MethodInterfaceType type = getMethodInterfaceType(methodIntf);
            EJBMethodSecurityAttribute classLevel = perms.getClassLevelAttribute(ejbClassName);
            if (classLevel != null && !classLevel.isDenyAll()) {
                denyOnAllViews = false;
            } else {
View Full Code Here

        throw (Exception) t;
    }

    public Object processInvocation(InterceptorContext invocation) throws Exception {
        final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);
        final MethodIntf methodIntf = MethodIntfHelper.of(invocation);
        final TransactionAttributeType attr = component.getTransactionAttributeType(methodIntf, invocation.getMethod());
        final int timeoutInSeconds = component.getTransactionTimeout(methodIntf, invocation.getMethod());
        switch (attr) {
            case MANDATORY:
                return mandatory(invocation, component);
View Full Code Here

                    final Set<ViewDescription> views = getViews();

                    final Set<EJBViewDescription> ejbsForViewName = new HashSet<EJBViewDescription>();
                    for (final ViewDescription view : views) {
                        if (view instanceof EJBViewDescription) {
                            final MethodIntf viewType = ((EJBViewDescription) view).getMethodIntf();
                            // @EJB injection *shouldn't* consider the @WebService endpoint view or MDBs
                            if (viewType == MethodIntf.SERVICE_ENDPOINT || viewType == MethodIntf.MESSAGE_ENDPOINT) {
                                continue;
                            }
                            ejbsForViewName.add((EJBViewDescription) view);
View Full Code Here

        }
    }

    @Override
    public MethodIntf getMethodIntf(String viewClassName) {
        MethodIntf methodIntf = viewTypes.get(viewClassName);
        assert methodIntf != null : "no view type known for " + viewClassName;
        return methodIntf;
    }
View Full Code Here

        // views
        Collection<String> overrideViews = override.getViewClassNames();
        if (overrideViews != null && !overrideViews.isEmpty()) {
            for (String view : overrideViews) {
                MethodIntf viewType = override.getMethodIntf(view);
                addView(mergedBean, view, viewType);
            }
        } else {
            Collection<String> originalViews = original.getViewClassNames();
            if (originalViews != null) {
                for (String view : originalViews) {
                    MethodIntf viewType = original.getMethodIntf(view);
                    addView(mergedBean, view, viewType);
                }

            }
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.component.MethodIntf

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.