A bit more generalized, how does this look? The change that is in this example in the
EjbParsingDeployer could probably be in the SchemaResolverDeployer?
Index: org/jboss/deployment/AppParsingDeployer.java
| + protected EarMetaData parse(VFSDeploymentUnit unit, VirtualFile file, EarMetaData
root) throws Exception
| + {
| + EarMetaData ear = super.parse(unit,file, root);
| + List<DeploymentUnit> children = unit.getChildren();
| + if(children != null)
| + {
| + for(DeploymentUnit child : children)
| + {
| + String moduleName = child.getSimpleName();
| + ModuleMetaData module = ear.getModules().get(moduleName);
| + if(module != null && module.getAlternativeDD() != null)
| + {
| + VirtualFile altDDFile =
unit.getRoot().getChild(module.getAlternativeDD());
| + if(altDDFile == null)
| + throw new IllegalStateException("Failed to locate alternative
DD '" + module.getAlternativeDD() + "' in " +
unit.getRoot().getPathName());
| + child.addAttachment(child.getSimpleName() + ".altDD",
altDDFile);
| + log.info("attached alt-dd " + altDDFile + " for "
+ child.getSimpleName());
| + }
| + }
| + }
| +
| + return ear;
| + }
| }
| Index: org/jboss/deployment/EjbParsingDeployer.java
| @Override
| - protected void init(VFSDeploymentUnit unit, EjbJarMetaData metaData, VirtualFile
file) throws Exception
| + protected EjbJarMetaData parse(VFSDeploymentUnit unit, VirtualFile file,
EjbJarMetaData root) throws Exception
| {
| - super.init(unit, metaData, file);
| + VirtualFile altDDFile = (VirtualFile) unit.getAttachment(unit.getSimpleName() +
".altDD");
| + if(altDDFile != null)
| + {
| + log.info("using alt-dd: " + altDDFile);
| + file = altDDFile;
| + }
| + return super.parse(unit, file, root);
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143431#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...