[jboss-dev-forums] [Design of POJO Server] - Re: Update on metadata progress
scott.stark@jboss.org
do-not-reply at jboss.com
Mon Nov 13 15:30:43 EST 2006
This needs to be merged at the lower jboss parsing deployers. For example, this code to find a web-context default from the ear in the AbstractWarDeployer really needs to be in the JBossWebAppParsingDeployer.
| import org.jboss.deployers.plugins.deployers.helpers.AttachmentLocator;
|
| // Check for an ear level specification
| if( webContext == null )
| {
| J2eeApplicationMetaData earMetaData = AttachmentLocator.search(unit, J2eeApplicationMetaData.class);
| if( earMetaData != null )
| {
| String path = unit.getRelativePath();
| J2eeModuleMetaData webModule = earMetaData.getModule(path);
| if( webModule != null )
| webContext = webModule.getWebContext();
| }
| }
|
|
Something like:
| @Override
| public void deploy(DeploymentUnit unit) throws DeploymentException
| {
| log.debug("deploy, unit: "+unit);
| createMetaData(unit, webXmlPath, null);
| WebMetaData metaData = getMetaData(WebMetaData.class.getName());
| J2eeApplicationMetaData earMetaData = AttachmentLocator.search(unit, J2eeApplicationMetaData.class);
| if( earMetaData != null )
| {
| String path = unit.getRelativePath();
| J2eeModuleMetaData webModule = earMetaData.getModule(path);
| ...
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985604#3985604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985604
More information about the jboss-dev-forums
mailing list