1 22 package org.jboss.deployment; 23 24 import org.jboss.deployers.plugins.deployers.helpers.ObjectModelFactoryDeployer; 25 import org.jboss.deployers.spi.DeploymentException; 26 import org.jboss.deployers.spi.deployer.DeploymentUnit; 27 import org.jboss.metadata.ApplicationMetaData; 28 import org.jboss.xb.binding.ObjectModelFactory; 29 import org.jboss.virtual.VirtualFile; 30 31 38 public class EjbParsingDeployer extends ObjectModelFactoryDeployer<ApplicationMetaData> 39 { 40 41 private String ejbXmlPath = "ejb-jar.xml"; 42 43 public EjbParsingDeployer() 44 { 45 super(ApplicationMetaData.class); 46 } 47 48 54 public String getAppXmlPath() 55 { 56 return ejbXmlPath; 57 } 58 65 public void setAppXmlPath(String ejbXmlPath) 66 { 67 this.ejbXmlPath = ejbXmlPath; 68 } 69 70 74 @Override 75 protected ObjectModelFactory getObjectModelFactory(ApplicationMetaData root) 76 { 77 return new EjbJarObjectFactory(); 78 } 79 80 84 @Override 85 public void deploy(DeploymentUnit unit) throws DeploymentException 86 { 87 VirtualFile ejbjar = unit.getMetaDataFile("ejb-jar.xml"); 90 if (ejbjar == null) 91 { 92 return; 93 } 94 95 createMetaData(unit, ejbXmlPath, null); 96 } 97 } 98 | Popular Tags |