User: starksm
Date: 01/11/27 22:18:11
Modified: src/main/org/jboss Tag: Branch_2_4 Main.java
Log:
Use a trival subclass of MLet that returns an empty URL[] from getURLs to
force the use of the rmi codebase as the annotated codebase.
Remove the embedded version string in favor of the Package.getSpecificationTitle
value
Revision Changes Path
No revision
No revision
1.35.2.15 +30 -5 jboss/src/main/org/jboss/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/Main.java,v
retrieving revision 1.35.2.14
retrieving revision 1.35.2.15
diff -u -r1.35.2.14 -r1.35.2.15
--- Main.java 2001/11/11 08:15:58 1.35.2.14
+++ Main.java 2001/11/28 06:18:11 1.35.2.15
@@ -27,13 +27,12 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel O'Connor</a>.
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.35.2.14 $
+ * @version $Revision: 1.35.2.15 $
*/
public class Main
{
// Constants -----------------------------------------------------
- String versionIdentifier = "2.4.4";
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
@@ -167,7 +166,8 @@
}
// Create MLet
- MLet mlet = new MLet(urls);
+ MLet mlet = new NullURLsMLet(urls);
+
server.registerMBean(mlet, new ObjectName(server.getDefaultDomain(),
"service", "MLet"));
// Set MLet as classloader for this app
@@ -230,11 +230,36 @@
}
// Done
+ Package mainPkg = Package.getPackage("org.jboss");
long stopTime = System.currentTimeMillis();
long lapsedTime = stopTime - startTime;
long minutes = lapsedTime / 60000;
long seconds = (lapsedTime - 60000 * minutes) / 1000;
- long milliseconds = lapsedTime - 60000 * minutes - 1000 * seconds;
- System.out.println("JBoss "+versionIdentifier+" Started in
"+minutes+"m:"+seconds+"s."+milliseconds);
+ long milliseconds = lapsedTime - 60000 * minutes - 1000 * seconds;
+ String version = mainPkg.getSpecificationTitle();
+ System.out.println(version+" Started in
"+minutes+"m:"+seconds+"s."+milliseconds);
+ }
+
+ /**
+ */
+ static class NullURLsMLet extends MLet
+ {
+ URL[] empty = {};
+ public NullURLsMLet()
+ {
+ }
+ public NullURLsMLet(URL[] urls)
+ {
+ super(urls);
+ }
+
+ public URL[] getURLs()
+ {
+ return empty;
+ }
+ public URL[] getLocalURLs()
+ {
+ return super.getURLs();
+ }
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development