[jboss-cvs] JBossAS SVN: r58182 - trunk/server/src/main/org/jboss/deployment
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 7 09:57:12 EST 2006
Author: alex.loubyansky at jboss.com
Date: 2006-11-07 09:57:10 -0500 (Tue, 07 Nov 2006)
New Revision: 58182
Modified:
trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java
trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
Log:
make sure the unit is an ejb unit, parse standardjboss.xml
Modified: trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java 2006-11-07 14:55:59 UTC (rev 58181)
+++ trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java 2006-11-07 14:57:10 UTC (rev 58182)
@@ -26,6 +26,7 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.virtual.VirtualFile;
/**
* An ObjectModelFactoryDeployer for translating ejb-jar.xml descriptors into
@@ -83,7 +84,14 @@
@Override
public void deploy(DeploymentUnit unit) throws DeploymentException
{
+ // make sure it's there is ejb-jar.xml
+ // TODO: also make sure it's ejb2.x module
+ VirtualFile ejbjar = unit.getMetaDataFile("ejb-jar.xml");
+ if (ejbjar == null)
+ {
+ return;
+ }
+
createMetaData(unit, ejbXmlPath, null);
}
-
}
Modified: trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2006-11-07 14:55:59 UTC (rev 58181)
+++ trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2006-11-07 14:57:10 UTC (rev 58182)
@@ -28,6 +28,9 @@
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.JBossWebMetaDataObjectFactory;
import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VFS;
+import org.jboss.system.server.ServerConfig;
/**
* An ObjectModelFactoryDeployer for translating jboss-web.xml descriptors into
@@ -96,8 +99,40 @@
@Override
public void deploy(DeploymentUnit unit) throws DeploymentException
{
+ // make sure it's there is ejb-jar.xml
+ // TODO: also make sure it's ejb2.x module
+ VirtualFile ejbjar = unit.getMetaDataFile("ejb-jar.xml");
+ if (ejbjar == null)
+ {
+ return;
+ }
+
log.debug("deploy, unit: "+unit);
createMetaData(unit, jbossXmlPath, null);
}
+ protected ApplicationMetaData parse(DeploymentUnit unit,
+ String name,
+ ApplicationMetaData root)
+ throws Exception
+ {
+ String configPath = System.getProperty(ServerConfig.SERVER_CONFIG_URL);
+ java.net.URL configUrl = new java.net.URL(configPath);
+ VirtualFile stdJBoss = VFS.getVirtualFile(configUrl, "standardjboss.xml");
+ if(stdJBoss == null)
+ {
+ throw new DeploymentException("standardjboss.xml not found in config dir: " + configPath);
+ }
+
+ ApplicationMetaData result = parse(unit, stdJBoss, root);
+
+ // Try to find the metadata
+ VirtualFile file = unit.getMetaDataFile(name);
+ if (file == null)
+ return null;
+
+ result = parse(unit, file, root);
+ init(unit, result, file);
+ return result;
+ }
}
More information about the jboss-cvs-commits
mailing list