Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Example RAP & Spring Integration
Example RAP & Spring Integration [message #818618] Sun, 11 March 2012 23:09 Go to next message
Wolfgang Schele is currently offline Wolfgang ScheleFriend
Messages: 11
Registered: February 2012
Junior Member
Hi all,

is there any example in the web how to integrate Spring into my running RAP App?

...or can anybody who knows how to do this give a short descripiton within this topic?

best regards
ws

[Updated on: Mon, 12 March 2012 08:49]

Report message to a moderator

Re: Example RAP & Spring Integration [message #818972 is a reply to message #818618] Mon, 12 March 2012 10:30 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi,

what do you mean with integrate?

Maybe you want to check out the experimental sample available on GitHub (github.com/fappel/RWT_SPRING) how to configure a RAP application with Spring.

Regards,
Florian

[Updated on: Mon, 12 March 2012 11:57]

Report message to a moderator

Re: Example RAP & Spring Integration [message #819140 is a reply to message #818972] Mon, 12 March 2012 14:50 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas KratzFriend
Messages: 165
Registered: July 2009
Senior Member
I'm using Spring DM (now known as Gemini) to integrate Spring Beans as OSGi services. Take a look at Virgo if you want a full blwon solution.
Re: Example RAP & Spring Integration [message #819586 is a reply to message #819140] Tue, 13 March 2012 04:35 Go to previous messageGo to next message
Wolfgang Schele is currently offline Wolfgang ScheleFriend
Messages: 11
Registered: February 2012
Junior Member
Hi folks,

I thought that there is an easier way as using OSGi + Spring Dynamic Modules to use Spring in my RAP test app. Rolling Eyes

But what I learned in one of these numerous blogs and articels I read is:

Using OSGi + Spring Dynamic Modules is the easiest way! Cool

What I expect is, that I can switch my Plugin Project afterwards between RCP and RAP - and that the OSGi Service implementation works on that same basis. That's the next steps I will try out.

Thanks for your support!

[Updated on: Tue, 13 March 2012 04:37]

Report message to a moderator

Re: Example RAP & Spring Integration [message #822167 is a reply to message #819586] Fri, 16 March 2012 08:42 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
Registered: July 2009
Senior Member
Hi Wolfgang,

You can use Spring DM (or Eclipse Gemini Blueprint) with RCP/RAP without Virgo. When you know how to do that, it's very simply.
But I agree with you, when you don't know it's very difficult. We use Eclipse Gemini Blueprint in our RAP Demo http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.application where you can sources at http://code.google.com/p/xdocreport/source/browse/?repo=eclipse

The problem is that very complex to understand just with sources. When I will find time I will blog (http://angelozerr.wordpress.com/) about this topic.
My idea is to explain step by step how to create an Eclispe RCP/RAP which display User list coming from DB with Spring Data JPA + Spring DM + DOSGI CXF for remoting (to manage client/serevr architecture).

Regards Angelo
Re: Example RAP & Spring Integration [message #822170 is a reply to message #819586] Fri, 16 March 2012 08:42 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
Registered: July 2009
Senior Member
Hi Wolfgang,

You can use Spring DM (or Eclipse Gemini Blueprint) with RCP/RAP without Virgo. When you know how to do that, it's very simply.
But I agree with you, when you don't know it's very difficult. We use Eclipse Gemini Blueprint in our RAP Demo http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.application where you can sources at http://code.google.com/p/xdocreport/source/browse/?repo=eclipse

The problem is that very complex to understand just with sources. When I will find time I will blog (http://angelozerr.wordpress.com/) about this topic.
My idea is to explain step by step how to create an Eclispe RCP/RAP which display User list coming from DB with Spring Data JPA + Spring DM + DOSGI CXF for remoting (to manage client/serevr architecture).

Regards Angelo
Re: Example RAP & Spring Integration [message #832303 is a reply to message #818618] Fri, 30 March 2012 02:12 Go to previous messageGo to next message
Wolfgang Schele is currently offline Wolfgang ScheleFriend
Messages: 11
Registered: February 2012
Junior Member
Hi Angelo,

you are right! Get Spring running in this context without Virgo - is using Spring as usual. The right Plugins and Manifest configuration and you can use it. My goal is Remoting Spring - see below.

I can finalize my personal goals to get following running:

Done:
RAP / RCP with target platform switch
(A simple table using a wizard dialog as detail component using all CRUD operations of MyBatis)

MyBatis + MyBatis Generator
Spring DM (by using Spring IDE + Spring OSGI Implementation)
BTW: Spring OSGI ist not a must using it in a RCP/RAP context!

In progress:

Remoting Spring is one of my last (and most important) goals.
My question is not only how to "Remoting Spring". The question is, what's the best approach concerning the performance (especially interesting from a RCP point if view) and usability from a coding point of view.
Hessian? DOSGI CXF? At the end I would prefer a solution not to struggle with tons of new XML-Files and additional interfaces due to the requirement "Remoting Spring" ! Spring should be usable as before - if possible.

A step by step introduction how to implement all the steps discussed before - maybe based on the "RCP/RAP Hello World" example (including a Single Sourcing approach), that's a tutorial the java world needs!

regards
- wolfgang

[Updated on: Fri, 30 March 2012 02:26]

Report message to a moderator

Re: Example RAP & Spring Integration [message #832467 is a reply to message #832303] Fri, 30 March 2012 07:23 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
Registered: July 2009
Senior Member
Hi Wolfgang,

Remoting is the topic that we are studying. Our goal is to export/import our services without with remoting mean without code change of our services. It means that we will able to manage Fat Client or Client/ Server just by adding the well bundles in the OSGi container (for Client/Server just add bundles which import/export services).

Spring provides several remoting mechanism http://static.springsource.org/spring/docs/2.5.x/reference/remoting.html (like Hessian, RMI, HTTP invoker, JAX-WS...). I have tested HTTP invoker and it works well. But I would like avoid using it because it's Java serialisation and I'm afraid with some proxy problem.

It exists a specification in OSGi to manage remoting. ECF, DOSGi implements this psecification. So we would like use it. ECF is the Eclipse framework which manages remoting, but there is not a well support for Spring. I had developped this support at http://wiki.eclipse.org/Using_Spring_with_ECF_Remote_Services but there is again some limitation.

I love CXF and we have discovered DOSGi and remoting used is SOAP or REST. So we would like using REST Services with JSON format (because I find SOAP message very big). We have not done some benchmark, so I cannot help you with that.

My big problem for the moment is to serialize the Spring Data structure used for pagination (Page+Pageable interface) in our service.

Regards Angelo
Re: Example RAP & Spring Integration [message #833010 is a reply to message #832467] Fri, 30 March 2012 21:26 Go to previous messageGo to next message
Wolfgang Schele is currently offline Wolfgang ScheleFriend
Messages: 11
Registered: February 2012
Junior Member
...complex stuff, when there is time I try to follow your approach. At the moment I do this investigations in my leisure time.

...you write that you test "HTTP invoker" - usually HTTP is known as bottleneck and request response coupled?? did you receive an acceptable performance?

You speak about loading the right bundle and that your problem is now:
"My big problem for the moment is to serialize the Spring Data structure used for pagination (Page+Pageable interface) in our service."
What-#s your goal when you serialize Spring Data structure?

regards
wolfgang
Re: Example RAP & Spring Integration [message #833059 is a reply to message #833010] Fri, 30 March 2012 23:02 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
Registered: July 2009
Senior Member
Wolfgang Schele wrote on Fri, 30 March 2012 17:26
...complex stuff, when there is time I try to follow your approach. At the moment I do this investigations in my leisure time.


Me too:)

Quote:
...you write that you test "HTTP invoker" - usually HTTP is known as bottleneck and request response coupled?? did you receive an acceptable performance?


I think you should post your question on Spring forum. We have not done performance test.

Quote:
You speak about loading the right bundle


Yes.


  • If you want have Fat Client you have "Services API" + "Services Implementation" bundles in your OSGi container.
  • If you want have Client/Server architecture you have :


    1. on the Client Side "Services API" + ("Services REST Client" or "Services Spring HttpInvoker importer").
    2. on the Server Side "Services API" + ("Services REST Services" or "Services Spring HttpInvoker exporter").



Quote:
and that your problem is now:
"My big problem for the moment is to serialize the Spring Data structure used for pagination (Page+Pageable interface) in our service."
What-#s your goal when you serialize Spring Data structure?


If you see the demo http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.application and you open the resume dialog (Resume->Search) you can see list of Resume displayed in a paginated list (we use Eclipse Nebula Pagination that we have developped to manage UI pagination). This SWT UI pagination implements Spring Data Pageable structure and call services with Pageable parameter and returns Spring Data Page. ResumeService (see http://code.google.com/p/xdocreport/source/browse/dynaresume/org.dynaresume.services/src/main/java/org/dynaresume/services/ResumeService.java?repo=eclipse) is used here :

package org.dynaresume.services;

import org.dynaresume.domain.hr.Resume;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface ResumeService {
        Iterable<Resume> findAll();

        Resume findById(long id);

        Resume save(Resume resume);
        
        long count();

        Page<Resume> findByFirstNameAndLastName(String firstName,
                        String lastName, Pageable pageable);
}


So I'm trying to manage REST Client+Server with DOSgi to call this services with REST mode. My big problem is to serialize Page+Pageable with REST (I'm implementing XmlAdapter and it starts to work, but not finished).


Regards Angelo
Re: Example RAP & Spring Integration [message #845811 is a reply to message #833059] Sun, 15 April 2012 12:46 Go to previous message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
Registered: July 2009
Senior Member
Hi Wolfgang,

I have started my articles Eclipse RCP/RAP with Spring DM, Spring Data JPA and Remoting. Everything is explained step by step how to use Spring DM, Spring Data JPA with Eclipse RCP and RAp (soon).

Eclipse RAP will come soon. After that I will explain remoting with CXF DOSGi, Spring HTTP Invoker and ECF (must study that before).

Hope you will like it.

Regards Angelo
Previous Topic:Very basic presentation factory
Next Topic:CLabel not behaving when deployed as WAR
Goto Forum:
  


Current Time: Thu Apr 18 23:37:26 GMT 2024

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

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

Back to the top