User: oleg
Date: 00/09/27 10:02:58
Modified: src/main/org/jboss/ejb ContainerFactory.java
Log:
Extended syntax for Class-Path in MANIFEST.MF is now supported during deployment:
dir/* means all jar and zip files in the given dir
Revision Changes Path
1.42 +29 -8 jboss/src/main/org/jboss/ejb/ContainerFactory.java
Index: ContainerFactory.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- ContainerFactory.java 2000/09/26 20:18:48 1.41
+++ ContainerFactory.java 2000/09/27 17:02:58 1.42
@@ -76,7 +76,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
*
-* @version $Revision: 1.41 $
+* @version $Revision: 1.42 $
*/
public class ContainerFactory
extends org.jboss.util.ServiceMBeanSupport
@@ -213,8 +213,8 @@
}
/**
- * Deploy the file at this URL. This method is typically called from
remote administration
- * tools that cannot handle java.net.URL's as parameters to methods
+ * Deploy the file at this URL. This method is typically called from remote
administration
+ * tools that cannot handle java.net.URL's as parameters to methods
*
* @param url
* @exception MalformedURLException
@@ -229,8 +229,8 @@
/**
- * Undeploy the file at this URL. This method is typically called from
remote administration
- * tools that cannot handle java.net.URL's as parameters to methods
+ * Undeploy the file at this URL. This method is typically called from remote
administration
+ * tools that cannot handle java.net.URL's as parameters to methods
*
* @param url
* @exception MalformedURLException
@@ -319,8 +319,29 @@
String classPathEntry = classPathTokens.nextToken();
try
{
- urlList.add(new URL(url, classPathEntry));
- log.log("Added "+ classPathEntry);
+ URL u;
+ File dir;
+
+ // Extension to "Class-Path:" format: dir/*
+ // add jar files in the dir to the classpath
+ if (classPathEntry.endsWith("/*"))
+ {
+ classPathEntry = classPathEntry.substring(0,
classPathEntry.length() - 1);
+ dir = new File((new URL(url, classPathEntry)).getFile());
+ String[] files = dir.list();
+ for (int i = 0; i < files.length; i++)
+ {
+ if (files[i].endsWith(".jar") ||
files[i].endsWith(".zip"))
+ {
+ urlList.add(new URL(dir.toURL(), files[i]));
+ log.log("Added " + dir + File.separator +
files[i]);
+ }
+ }
+ } else
+ {
+ urlList.add(new URL(url, classPathEntry));
+ log.log("Added "+ classPathEntry);
+ }
} catch (MalformedURLException e)
{
log.error("Could not add " + classPathEntry);
@@ -390,7 +411,7 @@
}
// unset verifier log
- Log.unsetLog();
+ Log.unsetLog();
// Get list of beans for which we will create containers
Iterator beans = metaData.getEnterpriseBeans();