PluginStarter: If there is some delay, there may be a really good reason for it.
Loading a class would be one of them! So we do a quick check first, If it bombs out, we delay and try again. If it bombs after that, then we throw the ClassNotFoundException.
This commit is contained in:
@ -447,6 +447,26 @@ public class PluginStarter implements Runnable {
|
||||
// run this guy now
|
||||
LoadClientAppsJob.runClient(app.className, app.clientName, argVal, log, pluginThreadGroup, cl);
|
||||
} else {
|
||||
// If there is some delay, there may be a really good reason for it.
|
||||
// Loading a class would be one of them!
|
||||
// So we do a quick check first, If it bombs out, we delay and try again.
|
||||
// If it bombs after that, then we throw the ClassNotFoundException.
|
||||
try {
|
||||
// quick check
|
||||
LoadClientAppsJob.testClient(app.className, cl);
|
||||
} catch(ClassNotFoundException ex) {
|
||||
// Try again 1 or 2 seconds later.
|
||||
// This should be enough time. Although it is a lousy hack
|
||||
// it should work for most cases.
|
||||
// Perhaps it may be even better to delay a percentage
|
||||
// if > 1, and reduce the delay time.
|
||||
// Under normal circumstances there will be no delay at all.
|
||||
if(app.delay > 1) {
|
||||
Thread.sleep(2000);
|
||||
} else {
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
}
|
||||
// quick check, will throw ClassNotFoundException on error
|
||||
LoadClientAppsJob.testClient(app.className, cl);
|
||||
// wait before firing it up
|
||||
|
@ -1,3 +1,9 @@
|
||||
2010-05-10 sponge
|
||||
* PluginStarter: If there is some delay, there may be a really good reason for it.
|
||||
Loading a class would be one of them!
|
||||
So we do a quick check first, If it bombs out, we delay and try again.
|
||||
If it bombs after that, then we throw the ClassNotFoundException.
|
||||
|
||||
2010-05-05 zzz
|
||||
* build.xml: Create packed sud in release
|
||||
* Console:
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 3;
|
||||
public final static long BUILD = 4;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user