grimsell 2005/05/24 05:02:31 Modified: integration/ant/src/java/org/apache/cactus/integration/ant CactifyEarTask.java Log: Added logging and some errorhandling Revision Changes Path 1.3 +17 -5 jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java Index: CactifyEarTask.java =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CactifyEarTask.java 26 Apr 2005 09:57:59 -0000 1.2 +++ CactifyEarTask.java 24 May 2005 12:02:31 -0000 1.3 @@ -26,6 +26,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Ear; import org.apache.tools.ant.types.ZipFileSet; import org.apache.tools.ant.util.FileUtils; @@ -258,6 +259,13 @@ 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()) { @@ -267,13 +275,15 @@ 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); - VendorEjbDescriptor vendorDescr = - descr.getVendorDescriptor(); + String jndiName = vendorDescr.getJndiName(ejb); ref.setJndiName(jndiName); cactusWar.addConfiguredEjbref(ref); @@ -288,13 +298,15 @@ 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); - VendorEjbDescriptor vendorDescr = - descr.getVendorDescriptor(); + String jndiName = vendorDescr.getJndiName(ejb); ref.setJndiName(jndiName); cactusWar.addConfiguredEjbref(ref);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]