Activator in org.eclipse.scout.rt.server [message #915890] |
Tue, 18 September 2012 02:56  |
Eclipse User |
|
|
|
In the start method of the Activator class in the Plugin org.eclipse.scout.rt.server (package org.eclipse.scout.rt.server.internal) I was wondering about a specific code snippet:
// workaround for bug in serverside equinox implementation with servletbridge
// wait until done and launch product if one exists
if (Platform.getBundle("org.eclipse.scout.sdk") == null) {
context.addBundleListener(new SynchronousBundleListener() {
@Override
public void bundleChanged(BundleEvent event) {
if (event.getType() == BundleEvent.STARTED && event.getBundle().equals(getBundle())) {
new Job("Product launcher") {
@Override
protected IStatus run(IProgressMonitor monitor) {
if (Platform.getBundle("org.eclipse.equinox.http.servletbridge") != null) {
runProduct();
}
return Status.OK_STATUS;
}
}.schedule();
}
}
});
}
1. Does anybody know which server-side Equinox servletbridge bug is referred?
2. Is this workaround still needed?
In our Scout (Eclipse Scout 2012-Jan) application we registered an extension point in the plugin.xml file of the server plugin
<extension
id="app"
name="Server Application"
point="org.eclipse.core.runtime.applications">
...
</extension>
This causes the server application to be started twice when deploying the web-application on a Tomcat: One instance gets started by the Activator and the other by the extension point configuration.
Since we setup a scheduler when starting the server application, we end up having 2 schedulers running concurrently.
3. What's the best practice to avoid the server application being started twice? Removing the extension point is not an option because the application won't get started on Jetty.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04547 seconds