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 :

  1. 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.
  2. Remoting with HTTP.
  3. 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);
    
  4. If possible, Remoting must be standard (like REST, SOAP) to call services layer with other Application (like WEB Application, .Net Application, Flex Application, etc…).
  5. 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 :

Publicité
Catégories :Apache CXF, DOSGi, ECF, Spring Remoting

Votre commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l’aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l’aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

%d blogueurs aiment cette page :