Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Different deploy approach then war product
Different deploy approach then war product [message #1713595] Thu, 05 November 2015 12:04 Go to next message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Hi there,

currently I want to adapt to a new deployment method for my rap app. Since I get more and more familiar with osgi, I thought it's also a good idea to get rid of things I don't need (e.g. tomcat).

So I created a featurebased osgi run config to start rap as well as several other self written osgi services. From Eclipse this works like a charm.

My first try was to create an eclipse product export of my two features. After struggling a while I got complete export. Unfortunately it fails on startup (of eclipse.exe) with: java.lang.IllegalStateException: No context available outside of the request processing.

For me this deployment method sounded the easiest. Export -> start -> go... But obviously I'm wrong. Are rap and eclipse product incompatible or am I the issue here Wink?

Then I took all bundles from plugin and start them by hand (java jar org.eclipse.osgi.jarconsole) with the exported product config.ini. When I do that it looks like all plugins are available. But most of them are loaded with status "starting" or just "resolved". Starting all by hand via console is not what I want to do again and again.

At the end I landed at the common approach: war product.
Now I'm asking myself what are other rap and osgi developer use for deploying there apps.

Is Eclipse Virgo, Apache Karaf or Apache ACE the better solution? Is anybody deploying osgis by console?

I appreciate any help and would love to hear others experience about it.

Thanks in advance
Philippe
Re: Different deploy approach then war product [message #1713604 is a reply to message #1713595] Thu, 05 November 2015 12:48 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Are you using equinox? Maybe give us the full plug-in list you have in your plugins folder.
Re: Different deploy approach then war product [message #1713617 is a reply to message #1713604] Thu, 05 November 2015 14:17 Go to previous messageGo to next message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Maybe i found another hint to deploy my osgi run config as eclipse product. I forgot that i already use products that were build as a eclipse product (e.g. cdo server). Next steps i'm trying is to write a headless Application class which implements IApplication.

But i'm more interested in an running osgi environment where i can deploy to such as Karaf or virgo (as far as i understand how they are working).

I attached my bundles as txt (personal bundles excluded)
  • Attachment: bundles.txt
    (Size: 9.53KB, Downloaded 142 times)
Re: Different deploy approach then war product [message #1713975 is a reply to message #1713617] Mon, 09 November 2015 09:09 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
did you read this blog post [1] about deploying RAP application in Virgo?

[1]
http://eclipsesource.com/blogs/2014/02/24/deploying-rap-applications-made-simple/
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Different deploy approach then war product [message #1713976 is a reply to message #1713617] Mon, 09 November 2015 09:11 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
.... see also these slides from EclipseCon 2013 [1].

[1]
http://developer.eclipsesource.com/slides/deploy-and-manage-rap-applications/#/
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Different deploy approach then war product [message #1714391 is a reply to message #1713976] Thu, 12 November 2015 10:36 Go to previous message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
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
Previous Topic:Swing
Next Topic:[Table] Individual colors for each cell possible?
Goto Forum:
  


Current Time: Fri Apr 26 08:41:45 GMT 2024

Powered by FUDForum. Page generated in 0.02829 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top