Home » Eclipse Projects » Remote Application Platform (RAP) » Different deploy approach then war product
| | | | |
Re: Different deploy approach then war product [message #1714391 is a reply to message #1713976] |
Thu, 12 November 2015 10:36 |
|
We take both approaches - stand-alone OSGi and also WAR. In general we suggest using OSGi during unit test, as it is so quick and simple to recreate and deploy, then WAR once you get further down the line with testing, as you are more likely to use a 'full AppServer' in a production environment.
As long as you have your environment setup for the JVM beforehand, a simple command like this will startup the OSGi server (make sure all the required plugins are in the same directory):
java -jar org.eclipse.osgi_3.9.1.v20130814-1242.jar -clean -console
We're using a specific version of OSGi.
The ss command can be used to see what bundles started OK, so you just need to work through any unresolveds, or non-started bundles until you have everything you need.
The config.ini (in subdirectory Configuration) is used to determine what gets loaded and started automatically, along with port details etc. We've found OSGi to be quite fussy about the format (particularly line-feeds) in the config.ini, but once you've figured it out, it works nicely.
Here's an example (Tabris rather than RAP, but same difference!) - all plugins are standard, except the rapide one, which is our app runtime):
#Rapide OSGi config file
jetty.port=9090
org.osgi.service.http.port=9090
osgi.bundles.defaultStartLevel=4
osgi.bundles=com.eclipsesource.tabris@start,\
uk.co.iet.rapide.appsvr@start,\
org.apache.felix.gogo.command@start,\
org.apache.felix.gogo.runtime@start,\
org.apache.felix.gogo.shell@start,\
org.eclipse.core.commands@start,\
org.eclipse.equinox.common@start,\
org.eclipse.equinox.console@start,\
org.eclipse.equinox.http.servlet@start,\
org.eclipse.equinox.http.servletbridge@start,\
org.eclipse.equinox.servletbridge@start,\
org.eclipse.equinox.http.jetty@start,\
org.eclipse.jetty.http@start,\
org.eclipse.jetty.io@start,\
org.eclipse.jetty.util@start,\
org.eclipse.jetty.server@start,\
org.eclipse.jetty.continuation@start,\
org.eclipse.jetty.servlet@start,\
org.eclipse.jetty.security@start,\
org.eclipse.osgi.services@start,\
org.eclipse.rap.jface@start,\
org.eclipse.rap.rwt@start,\
org.eclipse.rap.rwt.osgi@start,\
org.json@start,\
org.apache.commons.fileupload@start,\
org.apache.commons.io@start,\
org.eclipse.rap.addons.filedialog@start,\
org.eclipse.rap.addons.fileupload@start,\
javax.servlet@start,\
org.mockito.mockito-all@start
---
Just because you can doesn't mean you should
|
|
|
Goto Forum:
Current Time: Fri Apr 26 08:41:45 GMT 2024
Powered by FUDForum. Page generated in 0.02829 seconds
|