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.xb.binding.ObjectModelFactory; 28 29 36 public class JBossAppParsingDeployer extends ObjectModelFactoryDeployer<J2eeApplicationMetaData> 37 { 38 39 private String appXmlPath = "jboss-app.xml"; 40 41 45 public JBossAppParsingDeployer() 46 { 47 super(J2eeApplicationMetaData.class); 48 setRelativeOrder(PARSER_DEPLOYER+1); 49 } 50 51 57 public String getAppXmlPath() 58 { 59 return appXmlPath; 60 } 61 68 public void setAppXmlPath(String appXmlPath) 69 { 70 this.appXmlPath = appXmlPath; 71 } 72 73 78 @Override 79 protected boolean allowsReparse() 80 { 81 return true; 82 } 83 84 88 @Override 89 protected ObjectModelFactory getObjectModelFactory(J2eeApplicationMetaData root) 90 { 91 return new JBossApplicationObjectFactory(); 92 } 93 94 98 @Override 99 public void deploy(DeploymentUnit unit) throws DeploymentException 100 { 101 createMetaData(unit, appXmlPath, null); 102 } 103 104 } 105 | Popular Tags |