Author: tyrell
Date: Tue Jan 22 21:40:48 2008
New Revision: 12732
Log:
Initializing the scheduler in the JSDeployer rather than in the
MashupServerInitializer.
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
==============================================================================
---
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
(original)
+++
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
Tue Jan 22 21:40:48 2008
@@ -115,16 +115,6 @@
userStoreAdmin.deleteUser(RegistryConstants.ADMIN_USER);
}
- //Creating the function scheduler instance for this service
- SchedulerFactory schedulerFactory = new StdSchedulerFactory();
- Scheduler scheduler = schedulerFactory.getScheduler();
- scheduler.start();
-
- //Storing the scheduler as a parameter in the axis ocnfiguration
- Parameter functionScheduler =
- new Parameter(MashupConstants.QUARTZ_FUNCTION_SCHEDULER,
scheduler);
- configuration.addParameter(functionScheduler);
-
// Applying a dummy tag so that searching works
// https://wso2.org/jira/browse/REGISTRY-24
SecureRegistry secureRegistry =
@@ -180,8 +170,6 @@
} catch (RegistryException e) {
// https://wso2.org/jira/browse/REGISTRY-24
// Exception jumps due to a Registry Bug
- } catch (SchedulerException e) {
- log.error("Error starting quartz scheduler", e);
}
}
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
==============================================================================
---
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
(original)
+++
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Tue Jan 22 21:40:48 2008
@@ -54,6 +54,8 @@
import org.wso2.wsas.admin.service.UserAdmin;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
+import org.quartz.SchedulerFactory;
+import org.quartz.impl.StdSchedulerFactory;
import javax.xml.namespace.QName;
import java.io.*;
@@ -96,9 +98,24 @@
this.configCtx = configCtx;
this.axisConfig = this.configCtx.getAxisConfiguration();
try {
+ //Creating the global function scheduler instance
+ SchedulerFactory schedulerFactory = new StdSchedulerFactory();
+ Scheduler scheduler = schedulerFactory.getScheduler();
+ scheduler.start();
+
+ //Storing the scheduler as a parameter in the axis ocnfiguration
+ Parameter functionScheduler =
+ new Parameter(MashupConstants.QUARTZ_FUNCTION_SCHEDULER,
scheduler);
+ this.axisConfig.addParameter(functionScheduler);
+
initRegistry();
} catch (MashupFault mashupFault) {
throw new RuntimeException(mashupFault);
+ } catch (SchedulerException e) {
+ log.error("Error starting quartz scheduler", e);
+ throw new RuntimeException(e);
+ } catch (AxisFault axisFault) {
+ throw new RuntimeException(axisFault);
}
}
@@ -458,8 +475,10 @@
//Setting the service js file path and resources directory path
resource1.setProperty(JavaScriptEngineConstants.SERVICE_JS,
file.getAbsolutePath());
- File resourcesDir = new File(currentFile.getFile().getParent(),
DescriptionBuilder.getShortFileName(currentFile.getName()) + ".resources");
- resource1.setProperty(JavaScriptEngineConstants.RESOURCES_FOLDER,
resourcesDir.getAbsolutePath());
+ File resourcesDir = new File(currentFile.getFile().getParent(),
DescriptionBuilder
+ .getShortFileName(currentFile.getName()) + ".resources");
+ resource1.setProperty(JavaScriptEngineConstants.RESOURCES_FOLDER,
+ resourcesDir.getAbsolutePath());
// store it in a non existence path
String path1 = "/mashups/" + username + "/" + name;
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev