Examples of MessageDrivenBeanInfo


Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        ejbJar.addEnterpriseBean(new MessageDrivenBean(Orange.class));
        ejbJar.addEnterpriseBean(new MessageDrivenBean(Yellow.class));
        final EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);

        assertEquals(2, ejbJarInfo.enterpriseBeans.size());
        final MessageDrivenBeanInfo orange = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(0);
        final MessageDrivenBeanInfo yellow = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(1);

        assertEquals("20", orange.activationProperties.get("maxSessions"));
        assertEquals("100", orange.activationProperties.get("maxMessagesPerSessions"));
        assertEquals("javax.jms.Queue", orange.activationProperties.get("destinationType"));
        assertEquals("OVERRIDDEN.QUEUE", orange.activationProperties.get("destination"));
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

            final EjbModule ejbModule = new EjbModule(ejbJar, openejbJar);

            final EjbJarInfo ejbJarInfo = config.configureApplication(ejbModule);

            assertEquals(2, ejbJarInfo.enterpriseBeans.size());
            final MessageDrivenBeanInfo orange = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(0);
            final MessageDrivenBeanInfo yellow = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(1);

            assertEquals("20", orange.activationProperties.get("maxSessions"));
            assertEquals("100", orange.activationProperties.get("maxMessagesPerSessions"));
            assertEquals("javax.jms.Queue", orange.activationProperties.get("destinationType"));
            assertEquals("OVERRIDDEN.QUEUE", orange.activationProperties.get("destination"));

            assertEquals("20", yellow.activationProperties.get("maxSessions"));
            assertEquals("100", yellow.activationProperties.get("maxMessagesPerSessions"));
            assertEquals("javax.jms.Queue", yellow.activationProperties.get("destinationType"));
            assertEquals("OVERRIDDEN.QUEUE", yellow.activationProperties.get("destination"));
        }

        // Verify the openejb-jar level overrides do not affect other apps
        {
            final EjbJar ejbJar = new EjbJar();
            ejbJar.addEnterpriseBean(new MessageDrivenBean(Orange.class));
            ejbJar.addEnterpriseBean(new MessageDrivenBean(Yellow.class));
            final EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);

            assertEquals(2, ejbJarInfo.enterpriseBeans.size());
            final MessageDrivenBeanInfo orange = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(0);
            final MessageDrivenBeanInfo yellow = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(1);

            assertEquals("7", orange.activationProperties.get("maxSessions"));
            assertEquals("4", orange.activationProperties.get("maxMessagesPerSessions"));
            assertEquals("javax.jms.Queue", orange.activationProperties.get("destinationType"));
            assertEquals("ORANGE.QUEUE", orange.activationProperties.get("destination"));
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        ejbJar.addEnterpriseBean(new MessageDrivenBean("Yellow", Orange.class)); // just to make sure class name is not used
        ejbJar.addEnterpriseBean(new MessageDrivenBean("Orange", Yellow.class)); // just to make sure class name is not used
        final EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);

        assertEquals(2, ejbJarInfo.enterpriseBeans.size());
        final MessageDrivenBeanInfo orange = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(0);
        final MessageDrivenBeanInfo yellow = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(1);

        assertEquals("7", orange.activationProperties.get("maxSessions"));
        assertEquals("4", orange.activationProperties.get("maxMessagesPerSessions"));
        assertEquals("javax.jms.Queue", orange.activationProperties.get("destinationType"));
        assertEquals("ORANGE.QUEUE", orange.activationProperties.get("destination"));
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

            final EjbModule ejbModule = new EjbModule(ejbJar, openejbJar);

            final EjbJarInfo ejbJarInfo = config.configureApplication(ejbModule);

            assertEquals(2, ejbJarInfo.enterpriseBeans.size());
            final MessageDrivenBeanInfo orange = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(0);
            final MessageDrivenBeanInfo yellow = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(1);

            assertEquals("20", orange.activationProperties.get("maxSessions"));
            assertEquals("100", orange.activationProperties.get("maxMessagesPerSessions"));
            assertEquals("javax.jms.Queue", orange.activationProperties.get("destinationType"));
            assertEquals("OVERRIDDEN.QUEUE", orange.activationProperties.get("destination"));

            assertEquals("20", yellow.activationProperties.get("maxSessions"));
            assertEquals("100", yellow.activationProperties.get("maxMessagesPerSessions"));
            assertEquals("javax.jms.Queue", yellow.activationProperties.get("destinationType"));
            assertEquals("OVERRIDDEN.QUEUE", yellow.activationProperties.get("destination"));
        }

        // Verify the openejb-jar level overrides do not affect other apps
        {
            final EjbJar ejbJar = new EjbJar();
            ejbJar.addEnterpriseBean(new MessageDrivenBean(Orange.class));
            ejbJar.addEnterpriseBean(new MessageDrivenBean(Yellow.class));
            final EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);

            assertEquals(2, ejbJarInfo.enterpriseBeans.size());
            final MessageDrivenBeanInfo orange = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(0);
            final MessageDrivenBeanInfo yellow = (MessageDrivenBeanInfo) ejbJarInfo.enterpriseBeans.get(1);

            assertEquals("7", orange.activationProperties.get("maxSessions"));
            assertEquals("4", orange.activationProperties.get("maxMessagesPerSessions"));
            assertEquals("javax.jms.Queue", orange.activationProperties.get("destinationType"));
            assertEquals("ORANGE.QUEUE", orange.activationProperties.get("destination"));
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        for (org.apache.openejb.jee.oejb2.EnterpriseBean enterpriseBean : openejbJarType.getEnterpriseBeans()) {
            if (!(enterpriseBean instanceof MessageDrivenBeanType)) {
                continue;
            }
            MessageDrivenBeanType bean = (MessageDrivenBeanType) enterpriseBean;
            MessageDrivenBeanInfo messageDrivenBeanInfo = mdbs.get(bean.getEjbName());
            if (messageDrivenBeanInfo == null) {
                continue;
            }
            if (messageDrivenBeanInfo.containerId != null) {
                // containerId already set
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        return bean;
    }

    private EnterpriseBeanInfo initMessageBean(MessageDrivenBean mdb, Map m) throws OpenEJBException {
        MessageDrivenBeanInfo bean = new MessageDrivenBeanInfo();

        bean.timeoutMethod = toInfo(mdb.getTimeoutMethod());

        copyCallbacks(mdb.getAroundInvoke(), bean.aroundInvoke);
        copyCallbacks(mdb.getPostConstruct(), bean.postConstruct);
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        accessTimeout.unit = timeout.getUnit().toString();
        return accessTimeout;
    }

    private EnterpriseBeanInfo initMessageBean(final MessageDrivenBean mdb, final Map m) throws OpenEJBException {
        final MessageDrivenBeanInfo bean = new MessageDrivenBeanInfo();

        bean.timeoutMethod = toInfo(mdb.getTimeoutMethod());
        copyCallbacks(mdb.getAroundTimeout(), bean.aroundTimeout);

        copyCallbacks(mdb.getAroundInvoke(), bean.aroundInvoke);
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

                     *
                     * This code adjusts the container id for the associated MDBs by sticking the message listener interface on the end.
                     *
                     */
                    if (bean instanceof MessageDrivenBeanInfo && !containerIds.contains(d.getContainerId()) && !skipMdb(bean)) {
                        final MessageDrivenBeanInfo mdb = (MessageDrivenBeanInfo) bean;
                        final String newContainerId = d.getContainerId() + "-" + mdb.mdbInterface;
                        if (containerIds.contains(newContainerId)) {
                            d.setContainerId(newContainerId);
                        }
                    }
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        return bean;
    }

    private EnterpriseBeanInfo initMessageBean(MessageDrivenBean mdb, Map m) throws OpenEJBException {
        MessageDrivenBeanInfo bean = new MessageDrivenBeanInfo();

        bean.timeoutMethod = toInfo(mdb.getTimeoutMethod());

        copyCallbacks(mdb.getAroundInvoke(), bean.aroundInvoke);
        copyCallbacks(mdb.getPostConstruct(), bean.postConstruct);
View Full Code Here

Examples of org.apache.openejb.assembler.classic.MessageDrivenBeanInfo

        return bean;
    }

    private EnterpriseBeanInfo initMessageBean(MessageDrivenBean mdb, Map m) throws OpenEJBException {
        MessageDrivenBeanInfo bean = new MessageDrivenBeanInfo();

        bean.timeoutMethod = toInfo(mdb.getTimeoutMethod());

        copyCallbacks(mdb.getAroundInvoke(), bean.aroundInvoke);
        copyCallbacks(mdb.getPostConstruct(), bean.postConstruct);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.