Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Two RAP application in the SAME Virgo kernel(Is this possible?)
Two RAP application in the SAME Virgo kernel [message #893908] Thu, 05 July 2012 23:15 Go to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Hello,

I have no problem running my RAP 1.5 application on Virgo 3.5.0_M3 thru Jetty. I may have a need to run a second RAP application (also based on 1.5) on the same kernel. Is this possible?

Thanks in advanced and I apologize if I am asking the obvious.

Ronald
Re: Two RAP application in the SAME Virgo kernel [message #893974 is a reply to message #893908] Fri, 06 July 2012 09:38 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi Ronald,

how do you deploy your RAP application?
What flavour of Virgo do you use?

* Virgo Jetty Server with WAB bundles?
* Virgo Kernel with HttpService from Jetty and plain OSGi bundles?

I have seen multiple RAP applications running on Virgo Server for Apache Tomcat 3.0.2.RELEASE. The RAP applications were bundled as WABs and installed as part of a plan. RAP and it's dependencies are installed as part of an initial artifact.

Side note: Since some iterations RAP got rid of it's singletons which would have prevented such a deployment.

I do not expect trouble with Virgo 3.5.0.x. I'll try to run the above mentioned RAP applications on Virgo 3.5.0.RC1.

Hope this helps,
Florian
Re: Two RAP application in the SAME Virgo kernel [message #894103 is a reply to message #893974] Fri, 06 July 2012 16:22 Go to previous messageGo to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
I am a Virgo newbie so correct me if I make no sense on my answers. Smile

We are using Virgo Kernel with HttpService from Jetty and plain OSGi bundles. Right now we have all the RAP bundles in the PLAN file but we realize that we should really call out the RAP stuff and put them in an initial artifact. We are setting the port number in startup.sh (-Dorg.osgi.service.http.port=8080) but I think we should put this setting in a properties file under "lib" called "org.eclipse.virgo.kernel.launch.properties", right?

I was wondering if I can have two RAP applications that use different port numbers. But with the current setup, it seems that I can only set the port number in that properties file under "lib" and I am stuck.

Can you shed some lights on the first option you mention above by using WAB bundles?

Thanks so much for your help.

Ronald

[Updated on: Fri, 06 July 2012 16:23]

Report message to a moderator

Re: Two RAP application in the SAME Virgo kernel [message #894133 is a reply to message #894103] Fri, 06 July 2012 20:32 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Yes putting the VM argument to org.eclipse.virgo.kernel.launch.properties seems the better place.

It is possible to run multiple HttpServices on different ports but I personally think it would be easier to register different EntryPoints at different servlet paths on the same HttpService than hosting multiple HttpServices with one application each.

That's the same result as you would get with with one standalone servlet container and two war artifacts.

Regarding the WAB bundles: Maybe you can have a look at GitHUB github.com/fappel/RWT_SPRING

Hope this helps,
Florian

Here is a discussion about multiple HttpServices in the context of RAP. https://bugs.eclipse.org/bugs/show_bug.cgi?id=241210

[Updated on: Fri, 06 July 2012 20:34]

Report message to a moderator

Re: Two RAP application in the SAME Virgo kernel [message #894135 is a reply to message #894133] Fri, 06 July 2012 20:48 Go to previous messageGo to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Thanks for your prompt response, Florian. I have thought of two entry points (Two applications) in RAP, but both of my RAP application will need the workbench (i.e. have their own perspectives, views, etc). I got stuck with this requirement and it does not seem to have a clear way of doing what I need to do with two RAP applications. I would love to mimic the behavior with one standalone servlet container and two war artifacts (same port number, just different servlet and URL). Furthermore, this approach does not seem to allow both applications to run at the same time in two browser tabs.

Sorry this thread is moving slowly into RAP discussion, which I have also posted in the RAP forum. It is just not clear in my mind how I should pursue this two application approach, or just try to figure out how to host two distinct applications in Virgo.

Re: Two RAP application in the SAME Virgo kernel [message #894423 is a reply to message #894135] Mon, 09 July 2012 07:57 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
If you need the workbench then you won't be able to use the new Application API. This API only supports lightweight RAP applications. (OSGi integration not able to use together with workbench https://bugs.eclipse.org/bugs/show_bug.cgi?id=377414)

Regarding your browser tab trouble did you try the solutions propsed in the RAP/FAQ? http://wiki.eclipse.org/RAP/FAQ#How_to_run_a_RAP_application_in_multiple_browser_tabs.2Fwindows.3F

Running multiple distinct applications in Virgo is covered in the developer guide in "Creating PARs and WARs". http://www.eclipse.org/virgo/documentation/virgo-documentation-3.0.3.RELEASE/docs/virgo-programmer-guide/html/ch04s02.html

Do not hesitate to ask if new questions arise.

Hope this helps,
Florian
Re: Two RAP application in the SAME Virgo kernel [message #894667 is a reply to message #894423] Tue, 10 July 2012 04:42 Go to previous messageGo to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Florian, thank you so much for your information. I will definitely get back here and post my results or ask more questions. There is a lot to digest (and code) but I will write back.

Very Happy Ronald
Re: Two RAP application in the SAME Virgo kernel [message #898771 is a reply to message #894667] Fri, 27 July 2012 13:58 Go to previous messageGo to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi,

I want to thank you for the tutorial on RWT/Virgo, I followed it and easily succeed Smile.


For information, it also works with Virgo 3.5.0.RELEASE (but you have to put the http-service port on configuration/config.ini instead of the missing old launch config).

I'm a RAP beginner, so I wanted to ask you some questions:

* I wanted to know if it's also possible to integrate RAP ui & JFace (in Virgo) as easily as RWT?
* Also is server push (RAP way) is supported?
* How can I do to mimic extensions point (located in plugins.xml with equinox) with Virgo? I think this has to be done with an OSGI services (for example with spring-dm) but I'm not sure.
* Finally, what's the best way to make a dynamic RAP application (as you can do with snaps), is it possible without a 'super app' depending on all the RAP parts?

My best, Charlie


Re: Two RAP application in the SAME Virgo kernel [message #899255 is a reply to message #898771] Tue, 31 July 2012 08:51 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi Charlie,

Q: I wanted to know if it's also possible to integrate RAP ui & JFace (in Virgo) as easily as RWT?

A: As far as I know you can use all but the JFace databinding in your application just like the RWT parts. (http://wiki.eclipse.org/RAP/RWT_Cluster#JFace

I resently used the Viewer and ITreeContentProvider.

import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;


Q: Also is server push (RAP way) is supported?

A: Never tried the UICallback in a Virgo. I'll try to put a sample together in the next days.

Q: How can I do to mimic extensions point (located in plugins.xml with equinox) with Virgo? I think this has to be done with an OSGI services (for example with spring-dm) but I'm not sure.

A: Regarding your question about extension points: Depends on what you want to do. Maybe you can use Gemini Blueprint (http://www.eclipse.org/gemini/blueprint/) to manage your modules/components. With Virgo 3.5 Spring DM has been replaced by Gemini Blueprint. (http://www.eclipse.org/virgo/download/release-notes/3.5.0.RELEASE.php)

Q: Finally, what's the best way to make a dynamic RAP application (as you can do with snaps), is it possible without a 'super app' depending on all the RAP parts?

A: There is an example UI implementation of a dynamic RAP application available: "Twitter for Monsters". (https://github.com/hstaudacher/tmitter).

Hope this helps,
Florian
Re: Two RAP application in the SAME Virgo kernel [message #909260 is a reply to message #899255] Thu, 06 September 2012 20:29 Go to previous message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi,

I'm sorry Florian, I had'nt saw your answer.

Thank you for your answers, you're a man Wink.

I tried to integrate JFace Databinding with Virgo (with osgi http services), but it complains about null realms. I think i've to deal with clustered web.xml conf :S.

Concerning the other points, (jface without db, asynccall, dynamic app...), I will test this once I will resolve the issue for sure Wink


My best,

Charlie

Previous Topic:Virgo on cloudfoundry
Next Topic:Testing with Virgo Test Framework
Goto Forum:
  


Current Time: Thu Apr 18 20:37:16 GMT 2024

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

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

Back to the top