Package org.jboss.as.ejb3.component.stateful

Examples of org.jboss.as.ejb3.component.stateful.StatefulComponentDescription$StatefulRemoveMethod


        SessionBeanComponentDescription.SessionBeanType sessionBeanType = source.getSessionBeanType();
        switch (sessionBeanType) {
            case STATELESS:
                return new StatelessComponentDescription(source.getComponentName(), source.getComponentClassName(), ejbModuleDescription);
            case STATEFUL:
                return new StatefulComponentDescription(source.getComponentName(), source.getComponentClassName(), ejbModuleDescription);
            case SINGLETON:
                return new SingletonComponentDescription(source.getComponentName(), source.getComponentClassName(), ejbModuleDescription);
            default:
                throw new IllegalArgumentException("Unknown session bean type: " + sessionBeanType + " for bean " + source.getEJBName());
        }
View Full Code Here


        switch (sessionType) {
            case Stateless:
                sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription);
                break;
            case Stateful:
                sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription);
                break;
            case Singleton:
                sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription);
                break;
            default:
View Full Code Here

            switch (sessionBeanType) {
                case STATELESS:
                    sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription);
                    break;
                case STATEFUL:
                    sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription);
                    break;
                case SINGLETON:
                    sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription);
                    break;
                default:
View Full Code Here

            switch (sessionBeanType) {
                case STATELESS:
                    sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnitServiceName);
                    break;
                case STATEFUL:
                    sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnitServiceName);
                    break;
                case SINGLETON:
                    sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnitServiceName);
                    break;
                default:
View Full Code Here

        switch (sessionType) {
            case Stateless:
                sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName());
                break;
            case Stateful:
                sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName());
                break;
            case Singleton:
                sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName());
                break;
            default:
View Full Code Here

            switch (sessionBeanType) {
                case STATELESS:
                    sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnitServiceName, beanMetaData);
                    break;
                case STATEFUL:
                    sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnitServiceName, beanMetaData);
                    break;
                case SINGLETON:
                    sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnitServiceName, beanMetaData);
                    break;
                default:
View Full Code Here

        switch (sessionType) {
            case Stateless:
                sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName(), sessionBean);
                break;
            case Stateful:
                sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName(), sessionBean);
                break;
            case Singleton:
                sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName(), sessionBean);
                break;
            default:
View Full Code Here

    }

    private static void processSessionSynchronization(final SessionBean31MetaData metaData, final SessionBeanComponentDescription sessionBeanComponentDescription) {
        if (!(sessionBeanComponentDescription instanceof StatefulComponentDescription))
            return;
        final StatefulComponentDescription description = (StatefulComponentDescription) sessionBeanComponentDescription;

        if (metaData.getAfterBeginMethod() != null)
            description.setAfterBegin(null, metaData.getAfterBeginMethod().getMethodName());
        if (metaData.getAfterCompletionMethod() != null)
            description.setAfterCompletion(null, metaData.getAfterCompletionMethod().getMethodName());
        if (metaData.getBeforeCompletionMethod() != null)
            description.setBeforeCompletion(null, metaData.getBeforeCompletionMethod().getMethodName());
    }
View Full Code Here

            return;
        }

        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
        final StatefulComponentDescription sessionBean = (StatefulComponentDescription) moduleDescription.getComponentByName(beanMetaData.getEjbName());
        final DeploymentReflectionIndex reflectionIndex = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.REFLECTION_INDEX);
        final Module module = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE);
        if(module == null) {
            return;
        }
        if(sessionBean == null) {
            //should not happen
            return;
        }

        final Class<?> componentClass;
        try {
            componentClass = module.getClassLoader().loadClass(sessionBean.getComponentClassName());
        } catch (ClassNotFoundException e) {
            throw new DeploymentUnitProcessingException("Could not load EJB class " + sessionBean.getComponentClassName());
        }

        for(final RemoveMethodMetaData removeMethod : beanMetaData.getRemoveMethods()) {
            final NamedMethodMetaData methodData = removeMethod.getBeanMethod();
            final Method method = MethodResolutionUtils.resolveMethod(methodData, componentClass, reflectionIndex);
            sessionBean.addRemoveMethod(MethodIdentifier.getIdentifierForMethod(method), removeMethod.isRetainIfException());
        }
    }
View Full Code Here

        switch (sessionType) {
            case Stateless:
                sessionBeanDescription = new StatelessComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName());
                break;
            case Stateful:
                sessionBeanDescription = new StatefulComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName());
                break;
            case Singleton:
                sessionBeanDescription = new SingletonComponentDescription(beanName, beanClassName, ejbJarDescription, deploymentUnit.getServiceName());
                break;
            default:
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.component.stateful.StatefulComponentDescription$StatefulRemoveMethod

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.