Examples of VendorEjbDescriptor


Examples of org.codehaus.cargo.module.ejb.VendorEjbDescriptor

            while (ejbModules.hasNext())
            {
                String module = (String) ejbModules.next();
                EjbArchive ejbArchive = ear.getEjbModule(module);
                EjbJarXml descr = ejbArchive.getEjbJarXml();
                VendorEjbDescriptor vendorDescr = descr.getVendorDescriptor();
                if (vendorDescr == null)
                {
                    throw new BuildException("Failed to find vendor "
                                             + "deployment descriptor "
                                             + "for ejb jar " + module);
                }
                Iterator ejbs = descr.getSessionEjbs();
                while (ejbs.hasNext())
                {
                    Session ejb = (Session) ejbs.next();
                    String name = ejb.getName();
                    String local = ejb.getLocal();
                    String localHome = ejb.getLocalHome();
                    if (local != null)
                    {
                        log("Adding ejb-ref for local session ejb "
                            + ejb.getName(),
                            Project.MSG_VERBOSE);
                        CactifyWarTask.EjbRef ref = new CactifyWarTask.EjbRef();
                        ref.setType("Session");
                        ref.setName("ejb/" + name);
                        ref.setLocalInterface(local);
                        ref.setLocalHomeInterface(localHome);
                       
                        String jndiName = vendorDescr.getJndiName(ejb);
                        ref.setJndiName(jndiName);
                        cactusWar.addConfiguredEjbref(ref);
                    }
                }
                ejbs = descr.getEntityEjbs();
                while (ejbs.hasNext())
                {
                    Entity ejb = (Entity) ejbs.next();
                    String name = ejb.getName();
                    String local = ejb.getLocal();
                    String localHome = ejb.getLocalHome();
                    if (local != null)
                    {
                        log("Adding ejb-ref for local entity ejb "
                            + ejb.getName(),
                            Project.MSG_VERBOSE);
                        CactifyWarTask.EjbRef ref = new CactifyWarTask.EjbRef();
                        ref.setType("Entity");
                        ref.setName("ejb/" + name);
                        ref.setLocalInterface(local);
                        ref.setLocalHomeInterface(localHome);
                       
                        String jndiName = vendorDescr.getJndiName(ejb);
                        ref.setJndiName(jndiName);
                        cactusWar.addConfiguredEjbref(ref);
                    }
                }
            }
View Full Code Here

Examples of org.codehaus.cargo.module.ejb.VendorEjbDescriptor

            while (ejbModules.hasNext())
            {
                String module = (String) ejbModules.next();
                EjbArchive ejbArchive = ear.getEjbModule(module);
                EjbJarXml descr = ejbArchive.getEjbJarXml();
                VendorEjbDescriptor vendorDescr = descr.getVendorDescriptor();
                if (vendorDescr == null)
                {
                    throw new BuildException("Failed to find vendor "
                                             + "deployment descriptor "
                                             + "for ejb jar " + module);
                }
                Iterator ejbs = descr.getSessionEjbs();
                while (ejbs.hasNext())
                {
                    Session ejb = (Session) ejbs.next();
                    String name = ejb.getName();
                    String local = ejb.getLocal();
                    String localHome = ejb.getLocalHome();
                    if (local != null)
                    {
                        log("Adding ejb-ref for local session ejb "
                            + ejb.getName(),
                            Project.MSG_VERBOSE);
                        CactifyWarTask.EjbRef ref = new CactifyWarTask.EjbRef();
                        ref.setType("Session");
                        ref.setName("ejb/" + name);
                        ref.setLocalInterface(local);
                        ref.setLocalHomeInterface(localHome);
                       
                        String jndiName = vendorDescr.getJndiName(ejb);
                        ref.setJndiName(jndiName);
                        cactusWar.addConfiguredEjbref(ref);
                    }
                }
                ejbs = descr.getEntityEjbs();
                while (ejbs.hasNext())
                {
                    Entity ejb = (Entity) ejbs.next();
                    String name = ejb.getName();
                    String local = ejb.getLocal();
                    String localHome = ejb.getLocalHome();
                    if (local != null)
                    {
                        log("Adding ejb-ref for local entity ejb "
                            + ejb.getName(),
                            Project.MSG_VERBOSE);
                        CactifyWarTask.EjbRef ref = new CactifyWarTask.EjbRef();
                        ref.setType("Entity");
                        ref.setName("ejb/" + name);
                        ref.setLocalInterface(local);
                        ref.setLocalHomeInterface(localHome);
                       
                        String jndiName = vendorDescr.getJndiName(ejb);
                        ref.setJndiName(jndiName);
                        cactusWar.addConfiguredEjbref(ref);
                    }
                }
            }
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.