[jboss-cvs] JBossAS SVN: r58126 - trunk/ejb3/src/main/org/jboss/ejb3/deployers
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Nov 5 04:02:17 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-05 04:02:16 -0500 (Sun, 05 Nov 2006)
New Revision: 58126
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java
Log:
Default to org.jboss.client.AppClientMain as the main class
Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java 2006-11-05 08:54:16 UTC (rev 58125)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java 2006-11-05 09:02:16 UTC (rev 58126)
@@ -133,14 +133,14 @@
{
VirtualFile file = unit.getMetaDataFile("MANIFEST.MF");
log.trace("parsing " + file);
-
+ // Default to the jboss client main
+ String mainClassName = "org.jboss.client.AppClientMain";
+
if(file == null)
{
- if(fail)
- throw new DeploymentException("Can't find " + JarFile.MANIFEST_NAME);
- else
- return null;
+ return mainClassName;
}
+
try
{
InputStream is = file.openStream();
@@ -154,18 +154,12 @@
is.close();
}
Attributes attrs = mf.getMainAttributes();
- String mainClassName = attrs.getValue("Main-Class");
- // TODO: workaround: TCK uses main-class as key
- if(mainClassName == null)
- mainClassName = attrs.getValue("main-class");
- if(mainClassName == null)
+ String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
+ if(className != null)
{
- if(fail)
- throw new Exception("Main-Class is null");
- else
- return null;
+ mainClassName = className;
}
-
+
return mainClassName;
}
finally
More information about the jboss-cvs-commits
mailing list