[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Problem with Service Endpoint matching when using different network names

Hi Scott,

thanks again for providing this sample implementation! That makes it very transparent how things work.
Actually I thought the ecf-generic provider would work that way ;)

I wasn't able to get the server up and running. Maybe a problem with the launch configuration. See below for the bundles and their states.
I added a sample service which should by exported by adding something like

@Component(property = {
ÂÂÂ ÂÂÂ "service.exported.interfaces=*",
ÂÂÂ ÂÂÂ "service.exported.configs=ecf.namespace.socket"
ÂÂÂ ÂÂÂ Â})
public class HelloService implements IHello{

ÂÂÂ public HelloService() {
ÂÂÂ ÂÂÂ System.err.println();
ÂÂÂ }
ÂÂÂ
ÂÂÂ @Override
ÂÂÂ public void sayHello() {
ÂÂÂ ÂÂÂ System.err.println("Hello");
ÂÂÂ }

}

but as said before, the server does not seem to get started. The start code in the Activator does the registration but the RemoteServiceContainerInstantiator.createInstance is never called.
Any idea?

Thanks!

Bye Peter

ss

idÂÂÂ StateÂÂÂÂÂÂ Bundle
0ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.osgi_3.12.50.v20170928-1321
ÂÂÂ ÂÂÂÂÂÂÂÂÂÂÂ Fragments=22
2ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.common_3.9.0.v20170207-1454
5ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.remoteservice.asyncproxy_2.1.0.v20180409-2248
6ÂÂÂ ACTIVEÂÂÂÂÂ javax.inject_1.0.0.v20091030
8ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.event_1.4.0.v20170105-1446
9ÂÂÂ ACTIVEÂÂÂÂÂ javax.annotation_1.2.0.v201602091430
11ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.osgi.util_3.4.0.v20170111-1608
14ÂÂÂ ACTIVEÂÂÂÂÂ com.ibm.icu_58.2.0.v20170418-1837
18ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.concurrent_1.1.0.v20130327-1442
19ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.osgi.services_3.6.0.v20170228-1906
22ÂÂÂ RESOLVEDÂÂÂ org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513
ÂÂÂ ÂÂÂÂÂÂÂÂÂÂÂ Master=0
23ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.preferences_3.7.0.v20170126-2132
25ÂÂÂ ACTIVEÂÂÂÂÂ org.apache.batik.css_1.8.0.v20170214-1941
26ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.core.contenttype_3.6.0.v20170207-1037
27ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.core.jobs_3.9.2.v20171030-1027
31ÂÂÂ ACTIVEÂÂÂÂÂ org.apache.felix.scr_2.0.10.v20170501-2007
33ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.identity_3.9.0.v20180426-1936
34ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.registry_3.7.0.v20170222-1344
41ÂÂÂ ACTIVEÂÂÂÂÂ org.w3c.css.sac_1.3.1.v200903091627
43ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.provider.tcpsocket.common_1.0.0.qualifier
48ÂÂÂ ACTIVEÂÂÂÂÂ org.apache.commons.jxpath_1.3.0.v200911051830
50ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf_3.9.0.v20180402-2015
ÂÂÂ ÂÂÂÂÂÂÂÂÂÂÂ Fragments=52
51ÂÂÂ ACTIVEÂÂÂÂÂ org.apache.batik.util_1.8.0.v20170214-1941
52ÂÂÂ RESOLVEDÂÂÂ org.eclipse.ecf.ssl_1.2.100.v20180301-0132
ÂÂÂ ÂÂÂÂÂÂÂÂÂÂÂ Master=50
58ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.core.runtime_3.13.0.v20170207-1030
68ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.provider.tcpsocket.server_1.0.0.qualifier
70ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.remoteservice_8.13.0.v20180406-1915
73ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.app_1.3.400.v20150715-1528
75ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.provider.remoteservice_4.4.100.v20180516-2213
76ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.provider_4.8.0.v20180402-2103
77ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.sharedobject_2.6.0.v20180404-2345
78ÂÂÂ ACTIVEÂÂÂÂÂ org.apache.felix.gogo.runtime_0.10.0.v201209301036
79ÂÂÂ ACTIVEÂÂÂÂÂ org.apache.felix.gogo.shell_0.10.0.v201212101605
80ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.console_1.1.300.v20170512-2111
81ÂÂÂ ACTIVEÂÂÂÂÂ service.api_1.0.0.qualifier
82ÂÂÂ ACTIVEÂÂÂÂÂ service.provider_1.0.0.qualifier
83ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.discovery_5.0.300.v20180306-0211
84ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.osgi.services.distribution_2.1.200.v20180301-0016
85ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.100.v20180301-0016
86ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.osgi.services.remoteserviceadmin_4.6.800.v20180518-0149
87ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.provider.jmdns_4.3.200.v20180306-0429
88ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.osgi.services.remoteserviceadmin_1.6.200.v20180301-0016
89ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.remoteservice.eventadmin_1.3.0.v20180426-2032
90ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.ecf.server_2.1.200.v20180302-2006
91ÂÂÂ ACTIVEÂÂÂÂÂ org.eclipse.equinox.ds_1.5.0.v20170307-1429


Am 27.07.2018 um 20:08 schrieb Scott Lewis:
On 7/27/2018 7:22 AM, Peter Hermsdorf wrote:

Hi Scott,

that sounds and looks really promising! I'll need some time to process the information you gave and look at the code and then come back to you.


This morning I've added some code to allow properties to set the hostname and port on server side, and to use the ecf.endpoint.id on client side to connect to the given hostname and port.ÂÂ This is working...see TCPSocketServerContainer and TCPSocketClientContainer classes.

I've been testing localhost with the LAN-based discovery (zeroconf) so the hostname/port exported in the endpoint description is what is used on the client.ÂÂ If/when other discovery and import is used on the client, then it can do whatever it wants wrt what hostname and port to use to connect to the server.

There are some ways that this is limited, but it can be generalized or extended, and I'm hoping it will give a good idea of how to create others.

Scott