Package org.glassfish.ejb.deployment.descriptor

Examples of org.glassfish.ejb.deployment.descriptor.EjbMessageBeanDescriptor


     */
    protected EjbDescriptor createEjbDescriptor(String elementName,
            AnnotationInfo ainfo) throws AnnotationProcessorException {

        AnnotatedElement ae = ainfo.getAnnotatedElement();
        EjbMessageBeanDescriptor newDescriptor = new EjbMessageBeanDescriptor();
        Class ejbClass = (Class)ae;
        newDescriptor.setName(elementName);
        newDescriptor.setEjbClassName(ejbClass.getName());
        return newDescriptor;
    }
View Full Code Here


            EjbDescriptor ejbDesc, AnnotationInfo ainfo)
            throws AnnotationProcessorException {

        MessageDriven mdAn = (MessageDriven)ainfo.getAnnotation();
        Class ejbClass = (Class)ainfo.getAnnotatedElement();
        EjbMessageBeanDescriptor ejbMsgBeanDesc =
                (EjbMessageBeanDescriptor)ejbDesc;
  
        HandlerProcessingResult procResult =
            setMessageListenerInterface(
                    mdAn, ejbMsgBeanDesc, ejbClass, ainfo);

        doDescriptionProcessing(mdAn.description(), ejbMsgBeanDesc);
        doMappedNameProcessing(mdAn.mappedName(), ejbMsgBeanDesc);

        for (ActivationConfigProperty acProp : mdAn.activationConfig()) {
            EnvironmentProperty envProp = new EnvironmentProperty(
                    acProp.propertyName(), acProp.propertyValue(), "");
                                                // with empty description
            // xml override
            if (ejbMsgBeanDesc.getActivationConfigValue(envProp.getName()) == null) {
                ejbMsgBeanDesc.putActivationConfigProperty(envProp);
            }
        }

        return procResult;
    }
View Full Code Here

        isMessageDriven = true;

        appEJBName_ = desc.getApplication().getRegistrationName() + ":"
                + desc.getName();

        EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor) desc;

        EjbInvocation ejbInvocation = null;
        try {

            // Register the tx attribute for each method on MessageListener
            // interface. NOTE : These method objects MUST come from the
            // MessageListener interface, NOT the bean class itself. This
            // is because the message bean container clients do not have
            // access to the message bean class.
            Method[] msgListenerMethods = msgBeanDesc
                    .getMessageListenerInterfaceMethods(loader);

            for (int i = 0; i < msgListenerMethods.length; i++) {
                Method next = msgListenerMethods[i];
                addInvocationInfo(next, MethodDescriptor.EJB_BEAN, null);
View Full Code Here

  Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();

        boolean oneFailed = false;
        try{
            EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor)descriptor;
            String jmsDurableName = msgBeanDesc.getDurableSubscriptionName();
            if(jmsDurableName != null){
                if(jmsDurableName.length()==0)
                {
                    addErrorDetails(result, compName);
                    result.failed(smh.getLocalString(getClass().getName()+".failed",
                        "FAILED [AS-EJB ejb] : jms-durable-subscription-name cannot be an empty string value"));
                }else{
                    addGoodDetails(result, compName);
                    result.passed(smh.getLocalString(getClass().getName()+".passed",
                        "PASSED [AS-EJB ejb] : jms-durable-subscription-name is {0}", new Object[]{jmsDurableName}));
                }
            }else{
                if(descriptor instanceof EjbMessageBeanDescriptor){
                    if(msgBeanDesc.hasTopicDest() && msgBeanDesc.hasDurableSubscription()){
                        boolean failed = false;
                        int count = getCountNodeSet("sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/mdb-resource-adapter");
                        if (count > 0) {
                            String value = getXPathValue("sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/mdb-resource-adapter/resource-adapter-mid");
                            if(value==null || value.length()==0){
View Full Code Here

                    }
                    else {
                        failed = true;
                    }
                    if (failed) {
                        EjbMessageBeanDescriptor mdbDesc = (EjbMessageBeanDescriptor)descriptor;
                        if(mdbDesc.hasTopicDest() && mdbDesc.hasDurableSubscription()){
                            oneFailed = true;
                            addErrorDetails(result, compName);
                            result.failed(smh.getLocalString(getClass().getName()+".failed2",
                                "FAILED [AS-EJB ejb] : mdb-connection-factory has to be defined for an MDB with destination-type " +
                                "as Topic and subscription-durability as Durable"));
View Full Code Here

        isMessageDriven = true;

        appEJBName_ = desc.getApplication().getRegistrationName() + ":"
                + desc.getName();

        EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor) desc;

        try {

            // Register the tx attribute for each method on MessageListener
            // interface. NOTE : These method objects MUST come from the
            // MessageListener interface, NOT the bean class itself. This
            // is because the message bean container clients do not have
            // access to the message bean class.
            Method[] msgListenerMethods = msgBeanDesc
                    .getMessageListenerInterfaceMethods(loader);

            for (int i = 0; i < msgListenerMethods.length; i++) {
                Method next = msgListenerMethods[i];
                addInvocationInfo(next, MethodDescriptor.EJB_BEAN, null);
View Full Code Here

    }

    @Override
    public EjbMessageBeanDescriptor getEjbDescriptor() {
        if (descriptor == null) {
            descriptor = new EjbMessageBeanDescriptor();
            descriptor.setEjbBundleDescriptor((EjbBundleDescriptorImpl) getParentNode().getDescriptor());
        }
        return descriptor;
    }
View Full Code Here

        isMessageDriven = true;

        appEJBName_ = desc.getApplication().getRegistrationName() + ":"
                + desc.getName();

        EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor) desc;

        try {

            // Register the tx attribute for each method on MessageListener
            // interface. NOTE : These method objects MUST come from the
            // MessageListener interface, NOT the bean class itself. This
            // is because the message bean container clients do not have
            // access to the message bean class.
            Method[] msgListenerMethods = msgBeanDesc
                    .getMessageListenerInterfaceMethods(loader);

            for (int i = 0; i < msgListenerMethods.length; i++) {
                Method next = msgListenerMethods[i];
                addInvocationInfo(next, MethodDescriptor.EJB_BEAN, null);
View Full Code Here

        isMessageDriven = true;

        appEJBName_ = desc.getApplication().getRegistrationName() + ":"
                + desc.getName();

        EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor) desc;

        try {

            // Register the tx attribute for each method on MessageListener
            // interface. NOTE : These method objects MUST come from the
            // MessageListener interface, NOT the bean class itself. This
            // is because the message bean container clients do not have
            // access to the message bean class.
            Method[] msgListenerMethods = msgBeanDesc
                    .getMessageListenerInterfaceMethods(loader);

            for (int i = 0; i < msgListenerMethods.length; i++) {
                Method next = msgListenerMethods[i];
                addInvocationInfo(next, MethodDescriptor.EJB_BEAN, null);
View Full Code Here

    }

    @Override
    public EjbMessageBeanDescriptor getEjbDescriptor() {
        if (descriptor == null) {
            descriptor = new EjbMessageBeanDescriptor();
            descriptor.setEjbBundleDescriptor((EjbBundleDescriptorImpl) getParentNode().getDescriptor());
        }
        return descriptor;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.ejb.deployment.descriptor.EjbMessageBeanDescriptor

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.