Equinox Server [message #66072] |
Thu, 13 December 2007 04:26  |
Eclipse User |
|
|
|
Hi
I want to know if it is possible to start equinox server programmatically
with Jetty and Rap. Because I want my server when it launch, start Equinox
server too.
Also, it is possible to make RAP and RCP application talk through JMS
messages. The scenario is like this, the RAP application send a message
for my server and then forward it to proper component within my RCP
application?
Regards
Salwa
|
|
|
Re: Equinox Server [message #66301 is a reply to message #66072] |
Fri, 14 December 2007 04:44   |
Eclipse User |
|
|
|
Hi,
In order to automate UI test RAP I've done this. Here's the code :
private static final int PORT = 8080;
private static final String[] BUNDLES =
{
"org.eclipse.equinox.common_3.2.0.v20060603.jar"
,"javax.servlet_2.4.0.20071010-2241.jar"
,"org.apache.commons.logging_1.0.4.20071010-2241.jar"
,"org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar"
,"org.eclipse.core.runtime_3.2.0.v20060603.jar"
,"org.eclipse.core.commands_3.2.0.I20060605-1400.jar"
,"org.eclipse.core.expressions_3.2.2.r322_v20070109a.jar"
,"org.eclipse.core.contenttype_3.2.0.v20060603.jar"
,"org.eclipse.core.jobs_3.2.0.v20060603.jar"
,"org.eclipse.equinox.http.registry_1.0.0.20071010-2241.jar "
,"org.eclipse.equinox.http.servlet_1.0.0.20071010-2241.jar"
,"org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar"
,"org.eclipse.osgi.services_3.1.100.v20060601.jar"
,"org.eclipse.rap.jface_1.0.0.20071010-2241.jar"
,"org.eclipse.rap.rwt_1.0.0.20071010-2241.jar"
,"org.eclipse.rap.ui_1.0.0.20071010-2241.jar"
,"org.eclipse.rap.ui.views_1.0.0.20071010-2241.jar"
,"org.eclipse.rap.ui.workbench_1.0.0.20071010-2241.jar"
,"org.eclipse.equinox.http.jetty_1.0.0.20071010-2241.jar"
,"org.mortbay.jetty_5.1.11.20071010-2241.jar"
};
public void startTest() throws Exception
{
//Start Equinox service
System.setProperty("org.osgi.service.http.port",String.valueOf(PORT));
System.setProperty("osgi.parentClassloader","app");
System.setProperty(EclipseStarter.PROP_CLEAN,"true");
Assert.assertFalse(EclipseStarter.isRunning());
BundleContext context = EclipseStarter.startup(new String[]{},null);
Assert.assertTrue(EclipseStarter.isRunning());
for (int i = 0; i < BUNDLES.length; i++)
bundles.add(context.installBundle(FOLDER_TARGET_PLATFORM +
BUNDLES[i]));
for (int i = 0; i < bundles.size(); i++)
{
Bundle bundle = bundles.get(i);
if (bundle.getState() != Bundle.ACTIVE && bundle.getState() !=
Bundle.STARTING)
bundle.start();
}
}
Hope that helps.
Setya
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03151 seconds