Package org.glassfish.ejb.deployment.descriptor

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


                appendTextChild(principalNode, RuntimeTagNames.NAME,raid.getPrincipal());
            }
        }
 
  if (ejbDescriptor instanceof EjbMessageBeanDescriptor) {
      EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor) ejbDescriptor;
           
            // mdb-connection-factory?
            if (ejbDescriptor.getIASEjbExtraDescriptors().getMdbConnectionFactory()!=null) {
                MDBConnectionFactoryNode mcfNode = new MDBConnectionFactoryNode();
                mcfNode.writeDescriptor(ejbNode, RuntimeTagNames.MDB_CONNECTION_FACTORY,
                    ejbDescriptor.getIASEjbExtraDescriptors().getMdbConnectionFactory());
            }
           
            // jms-durable-subscription-name
      if (msgBeanDesc.hasDurableSubscription()) {
    appendTextChild(ejbNode, RuntimeTagNames.DURABLE_SUBSCRIPTION,
      msgBeanDesc.getDurableSubscriptionName());
      }
      appendTextChild(ejbNode, RuntimeTagNames.JMS_MAX_MESSAGES_LOAD,
        String.valueOf(ejbDescriptor.getIASEjbExtraDescriptors().getJmsMaxMessagesLoad()));
  }
 
  // ior-configuration
        IORConfigurationNode iorNode = new IORConfigurationNode();
        for (EjbIORConfigurationDescriptor iorConf : ejbDescriptor.getIORConfigurationDescriptors()) {
            iorNode.writeDescriptor(ejbNode,RuntimeTagNames.IOR_CONFIG, iorConf);
        }              
       
  appendTextChild(ejbNode, RuntimeTagNames.IS_READ_ONLY_BEAN,
    String.valueOf(ejbDescriptor.getIASEjbExtraDescriptors().isIsReadOnlyBean()));
  appendTextChild(ejbNode, RuntimeTagNames.REFRESH_PERIOD_IN_SECONDS,
    String.valueOf(ejbDescriptor.getIASEjbExtraDescriptors().getRefreshPeriodInSeconds()));
  appendTextChild(ejbNode, RuntimeTagNames.COMMIT_OPTION,
    ejbDescriptor.getIASEjbExtraDescriptors().getCommitOption());
  appendTextChild(ejbNode, RuntimeTagNames.CMT_TIMEOUT_IN_SECONDS,
    String.valueOf(ejbDescriptor.getIASEjbExtraDescriptors().getCmtTimeoutInSeconds()));
  appendTextChild(ejbNode, RuntimeTagNames.USE_THREAD_POOL_ID,
    ejbDescriptor.getIASEjbExtraDescriptors().getUseThreadPoolId());
 
        // gen-classes
        writeGenClasses(ejbNode, ejbDescriptor);
       
  // bean-pool
  BeanPoolDescriptor beanPoolDesc = ejbDescriptor.getIASEjbExtraDescriptors().getBeanPool();
  if (beanPoolDesc!=null) {
      BeanPoolNode bpNode = new BeanPoolNode();
      bpNode.writeDescriptor(ejbNode, RuntimeTagNames.BEAN_POOL, beanPoolDesc);
  }
 
  // bean-cache
  BeanCacheDescriptor beanCacheDesc = ejbDescriptor.getIASEjbExtraDescriptors().getBeanCache();
  if (beanCacheDesc!=null) {
      BeanCacheNode bcNode = new BeanCacheNode();
      bcNode.writeDescriptor(ejbNode, RuntimeTagNames.BEAN_CACHE, beanCacheDesc);
  }
 
  if (ejbDescriptor instanceof EjbMessageBeanDescriptor) {
      EjbMessageBeanDescriptor msgBeanDesc = (EjbMessageBeanDescriptor) ejbDescriptor;     
            if (msgBeanDesc.hasResourceAdapterMid()) {
                MDBResourceAdapterNode mdb = new MDBResourceAdapterNode();
                mdb.writeDescriptor(ejbNode, RuntimeTagNames.MDB_RESOURCE_ADAPTER, msgBeanDesc);
            }
        } else if( ejbDescriptor instanceof EjbSessionDescriptor ) {
           
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

    }

    @Override
    public EjbMessageBeanDescriptor getEjbDescriptor() {
        if (descriptor == null) {
            descriptor = new EjbMessageBeanDescriptor();
            descriptor.setEjbBundleDescriptor((EjbBundleDescriptorImpl) getParentNode().getDescriptor());
        }
        return descriptor;
    }
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;

        EjbInvocation ejbInvocation = null;
        try {

            Class<?> beanClass = loader.loadClass(desc.getEjbClassName());
            messageListenerType_ = loader.loadClass(msgBeanDesc.getMessageListenerType());

            Class<?> messageListenerType_1 = messageListenerType_;
            if (isModernMessageListener(messageListenerType_1)) {
                // Generate interface and subclass for EJB 3.2 No-interface MDB VIew
                MessageBeanInterfaceGenerator generator = new MessageBeanInterfaceGenerator(loader);
                messageBeanInterface_ = generator.generateMessageBeanInterface(beanClass);
                messageBeanSubClass_ = generator.generateMessageBeanSubClass(beanClass, messageBeanInterface_);
            }

            // 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;

        ComponentInvocation componentInvocation = null;
        try {

            Class<?> beanClass = loader.loadClass(desc.getEjbClassName());
            messageListenerType_ = loader.loadClass(msgBeanDesc.getMessageListenerType());

            Class<?> messageListenerType_1 = messageListenerType_;
            if (isModernMessageListener(messageListenerType_1)) {
                // Generate interface and subclass for EJB 3.2 No-interface MDB VIew
                MessageBeanInterfaceGenerator generator = new MessageBeanInterfaceGenerator(loader);
                messageBeanInterface_ = generator.generateMessageBeanInterface(beanClass);
                messageBeanSubClass_ = generator.generateMessageBeanSubClass(beanClass, messageBeanInterface_);
            }

            // 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

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.