[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Service setup for integration testing remote service

On 26.06.2014 15:36, Peter Hermsdorf wrote:
> 1) is there anything that can be done to get the service 
> discovered/distributed via ECF even run in the same VM?

Hi Peter,

have a look at BasicTopologyManagerImpl.allowLoopbackReference [1]. On
the consumer side you can filter the services to only accept an instance
if it has the remote services properties. Also keep in mind that some
discovery providers are clever and ignore loop messages. You best bet is
to use EDEF.

A different approach is to use a nested OSGi framework or two isolated
OSGi subsystems. You still have to deal with port conflicts among the
ECF distribution providers.

Third, if you only want to really verify/test serialization, why not
simply serialize dummy instance of each class as part of unit tests? No
need to send anything across the wire just for that.