Accueil
> Apache CXF, DOSGi, ECF, Spring Remoting > Eclipse RCP/RAP with Spring DM, Spring Data JPA and Remoting [step11]
Eclipse RCP/RAP with Spring DM, Spring Data JPA and Remoting [step11]
In [step10] we have created RAP Application from the RCP Application. At this step we have several Client Layer :
- OSGi Bundle Activator (simpleclient)
- RCP Application
- RAP Application
which consumes Service Layer : UserService (from Mock Dao, JPA Dao) to retrieve list of User :
package fr.opensagres.services; import java.util.Collection; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import fr.opensagres.domain.User; public interface UserService { Collection<User> findAll(); Page<User> findAll(Pageable pageable); Collection<User> findByFirstNameLikeAndLastNameLike(String firstName, String lastName); Page<User> findByFirstNameLikeAndLastNameLike(String firstName, String lastName, Pageable pageable); User saveUser(User user); }
Here, The Client and Service Layer are in the same OSGi container. Now we wish manage Client/Server architecture to have :
- Client Layer in an OSGi container
- Service Layer in an other OSGi container
the Client Layer will consume Service Layer with remoting mean.
Remoting requirements
For our XDocReport RAP Application, we wish manage remoting too and here some requirements that we wish for remoting :
- Remoting must be transparent: it means that our existing UserService can be accessed with remoting mean :
- on server side, a new bundle (and some dependencies) must be added to export the UserService.
- on client side, a new bundle (and some dependencies) must be added to import the UserService.
- Remoting with HTTP.
- Remoting must keep the UserService signature : for instance Spring Data structure Page and Pageable which are interfaces (and not Pojo) must be kept :
Page<User> findAll(Pageable pageable);
- If possible, Remoting must be standard (like REST, SOAP) to call services layer with other Application (like WEB Application, .Net Application, Flex Application, etc…).
- Remoting supports HttpServices: if remoting can support HttpServices, it’s possible to create a WAR and use it with ServletBridge (read OSGi Equinox in a Servlet Container articles for more information).
Remoting technologies
To manage remoting they have several technologies like :
- CXF DOSGi. Here we will implement remoting with CXF DOSGi with JAX-RS to consumes and produces JSON stream. Please read Eclipse RCP/RAP and Remoting with JAX-RS, Spring Data JPA and CXF DOSGi articles.
- Spring Remoting (with Spring’s HTTP invoker). To study…
- ECF (with REST). To study…
Catégories :Apache CXF, DOSGi, ECF, Spring Remoting
Commentaires (0)
Trackbacks (2)
Laisser un commentaire
Rétrolien
-
mai 29, 2012 à 9:33Eclipse RCP/RAP with Spring DM, Spring Data JPA and Remoting [step10] « Angelo's Blog
-
mai 29, 2012 à 4:09Eclipse RCP/RAP and Remoting with JAX-RS, Spring Data JPA and CXF DOSGi [step1] « Angelo's Blog