Examples of EJBImplementation


Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

    }

    public EJBImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
       
        // Read an <implementation.ejb> element
        EJBImplementation implementation = implementationFactory.createEJBImplementation();
        implementation.setUnresolved(true);

        // Read the ejb-link attribute
        String ejbLink = getString(reader, "ejb-link");
        if (ejbLink != null) {
            implementation.setEJBLink(ejbLink);
           
            // Set the URI of the component type
            //implementation.setURI(ejbLink.replace('#', '/'));
            int hashPosition = ejbLink.indexOf('#');
            if ( hashPosition >= 0) {
                implementation.setURI(ejbLink.substring(hashPosition + 1));
            } else {
                implementation.setURI(ejbLink);
            }
        }

        // Skip to end element
        while (reader.hasNext()) {
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

    }

    public EJBImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.ejb> element
        EJBImplementation implementation = implementationFactory.createEJBImplementation();
        implementation.setUnresolved(true);

        // Read the ejb-link attribute
        String ejbLink = getString(reader, "ejb-link");
        if (ejbLink != null) {
            implementation.setEJBLink(ejbLink);

            // Set the URI of the component type
            //implementation.setURI(ejbLink.replace('#', '/'));
            int hashPosition = ejbLink.indexOf('#');
            if (hashPosition >= 0) {
                implementation.setURI(ejbLink.substring(hashPosition + 1));
            } else {
                implementation.setURI(ejbLink);
            }
        } else {
            error("EJBLinkAttributeMissing", reader);
        }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

            if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) {
                Composite composite = (Composite)artifact.getModel();
                Assert.assertEquals("Number of components", 1, composite.getComponents().size());
                Component component = composite.getComponents().get(0);
                Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
                EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
                Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                Service service = ejbImpl.getServices().get(0);
                Assert.assertEquals("Service name", "HelloworldService", service.getName());
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

            if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) {
                Composite composite = (Composite)artifact.getModel();
                Assert.assertEquals("Number of components", 1, composite.getComponents().size());
                Component component = composite.getComponents().get(0);
                Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
                EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
                Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                Service service = ejbImpl.getServices().get(0);
                Assert.assertEquals("Service name", "HelloworldService", service.getName());
            }
        }
       
        List<Composite> deployables = contribution.getDeployables();
        Assert.assertEquals("Deployable composites", 1, deployables.size());
        Composite composite = deployables.get(0);
        Assert.assertEquals("Number of components", 1, composite.getComponents().size());
        Component component = composite.getComponents().get(0);
        Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
        EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
        Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
        Service service = ejbImpl.getServices().get(0);
        Assert.assertEquals("Service name", "HelloworldService", service.getName());
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

                        Assert.assertTrue(component.getImplementation() instanceof WebImplementation);
                        WebImplementation webImpl = (WebImplementation)component.getImplementation();
                        Assert.assertEquals("Number of references", 1, webImpl.getReferences().size());
                    } else if(component.getName().equals("ejbComponent1")) {
                        Assert.assertTrue(component.getImplementation() instanceof EJBImplementation);
                        EJBImplementation ejbImpl = (EJBImplementation)component.getImplementation();
                        Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                        Assert.assertEquals("Number of references", 0, ejbImpl.getReferences().size());
                    } else if(component.getName().equals("ejbComponent2")) {
                        Assert.assertTrue(component.getImplementation() instanceof EJBImplementation);
                        EJBImplementation ejbImpl = (EJBImplementation)component.getImplementation();
                        Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                        Assert.assertEquals("Number of references", 1, ejbImpl.getReferences().size());
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

            if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) {
                Composite composite = (Composite)artifact.getModel();
                Assert.assertEquals("Number of components", 1, composite.getComponents().size());
                Component component = composite.getComponents().get(0);
                Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
                EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
                Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                Service service = ejbImpl.getServices().get(0);
                Assert.assertEquals("Service name", "HelloworldService", service.getName());
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

            if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) {
                Composite composite = (Composite)artifact.getModel();
                Assert.assertEquals("Number of components", 1, composite.getComponents().size());
                Component component = composite.getComponents().get(0);
                Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
                EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
                Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                Service service = ejbImpl.getServices().get(0);
                Assert.assertEquals("Service name", "HelloworldService", service.getName());
            }
        }
       
        List<Composite> deployables = contribution.getDeployables();
        Assert.assertEquals("Deployable composites", 1, deployables.size());
        Composite composite = deployables.get(0);
        Assert.assertEquals("Number of components", 1, composite.getComponents().size());
        Component component = composite.getComponents().get(0);
        Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
        EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
        Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
        Service service = ejbImpl.getServices().get(0);
        Assert.assertEquals("Service name", "HelloworldService", service.getName());
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

                        Assert.assertTrue(component.getImplementation() instanceof WebImplementation);
                        WebImplementation webImpl = (WebImplementation)component.getImplementation();
                        Assert.assertEquals("Number of references", 1, webImpl.getReferences().size());
                    } else if(component.getName().equals("ejbComponent1")) {
                        Assert.assertTrue(component.getImplementation() instanceof EJBImplementation);
                        EJBImplementation ejbImpl = (EJBImplementation)component.getImplementation();
                        Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                        Assert.assertEquals("Number of references", 0, ejbImpl.getReferences().size());
                    } else if(component.getName().equals("ejbComponent2")) {
                        Assert.assertTrue(component.getImplementation() instanceof EJBImplementation);
                        EJBImplementation ejbImpl = (EJBImplementation)component.getImplementation();
                        Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
                        Assert.assertEquals("Number of references", 1, ejbImpl.getReferences().size());
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

    }

    public EJBImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.ejb> element
        EJBImplementation implementation = implementationFactory.createEJBImplementation();
        implementation.setUnresolved(true);

        // Read the ejb-link attribute
        String ejbLink = getString(reader, "ejb-link");
        if (ejbLink != null) {
            implementation.setEJBLink(ejbLink);

            // Set the URI of the component type
            //implementation.setURI(ejbLink.replace('#', '/'));
            int hashPosition = ejbLink.indexOf('#');
            if (hashPosition >= 0) {
                implementation.setURI(ejbLink.substring(hashPosition + 1));
            } else {
                implementation.setURI(ejbLink);
            }
        } else {
            error("EJBLinkAttributeMissing", reader);
        }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.ejb.EJBImplementation

    }

    public EJBImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
       
        // Read an <implementation.ejb> element
        EJBImplementation implementation = implementationFactory.createEJBImplementation();
        implementation.setUnresolved(true);

        // Read the ejb-link attribute
        String ejbLink = getString(reader, "ejb-link");
        if (ejbLink != null) {
            implementation.setEJBLink(ejbLink);
           
            // Set the URI of the component type
            //implementation.setURI(ejbLink.replace('#', '/'));
            int hashPosition = ejbLink.indexOf('#');
            if (hashPosition >= 0) {
                implementation.setURI(ejbLink.substring(hashPosition + 1));
            } else {
                implementation.setURI(ejbLink);
            }
        }

        // Skip to end element
        while (reader.hasNext()) {
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.