Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349214

Summary: Allow ecftcp:///server to be used to request a default port/host
Product: [RT] ECF Reporter: Alex Blewitt <alex.blewitt>
Component: ecf.coreAssignee: ecf.core-inbox <ecf.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: slewis
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Alex Blewitt CLA 2011-06-13 13:13:15 EDT
If the ECF generic server is created with an ID of ecftcp:///server then this should auto-default the host and port as if the server wasn't specified at all. This permits multiple instances to be created either with the same path (e.g. /server) or with different paths (e.g. /server1 /server2) but without needing to know the host/port combination.

 IContainer a = ContainerFactory.getDefault().createContainer("ecf.generic.server","ecftcp:///server" );
 
I'm not sure if the 2nd parameter here will be the final ID that gets used (ideally, you'd want it to return an ID of "ecftcp://my.host.name:4936/server") ?
Comment 1 Scott Lewis CLA 2011-06-13 13:21:06 EDT
Changing to enhancement, as this is enhancing the generic provider to support a new syntax for ID creation (i.e. ecftcp:///server).

Also adding helpwanted, as our main project-level problem is resources for changes/additions.

One germane technical question:  in the case when a system has multiple host names...which one will assumed to be chosen?  (e.g. my.host.name vs my1.host.name)
Comment 2 Scott Lewis CLA 2011-06-13 13:26:54 EDT
FYI...although not directly relevent, I thought I would let you know that there is a service for creating generic container groups/containers.  See

http://wiki.eclipse.org/ECF_Servers

and

http://download.eclipse.org/rt/ecf/3.5.1/javadoc/org/eclipse/ecf/server/generic/package-summary.html

and yes...we are aware that the documentation is insufficient.
Comment 3 Alex Blewitt CLA 2011-06-13 13:39:18 EDT
(In reply to comment #1)
> Changing to enhancement, as this is enhancing the generic provider to support a
> new syntax for ID creation (i.e. ecftcp:///server).

Yup, seems reasonable. Note that this might be used by the examples to allow for a specification of a generic server but with an automatically selected port and host name.
 
> One germane technical question:  in the case when a system has multiple host
> names...which one will assumed to be chosen?  (e.g. my.host.name vs
> my1.host.name)

A host can have many IP addresses (and each IP address can have many host names). So there's a plethora to choose from. However, there is:

java.net.InetAddress.getLocalHost().getCanonicalHostName()

I'd suggest this one should be the one to use for the generic host name. I'm pretty sure I've seen that elsewhere in some providers - though some providers just use InetAddress.getLocalHost() which can return an unqualfied host name (e.g. returns my1 instead of my1.host.name).
Comment 4 Scott Lewis CLA 2014-05-09 12:54:54 EDT
As of ECF 3.8.0 (March 2014) the generic provider supports an expanded set of remote service configuration properties...as detailed here:

https://wiki.eclipse.org/EIG:Configuration_Properties#ECF_generic_provider

This is in keeping with the OSGi RS/RSA specification...which dictates that provider-specific configuration properties be given as:

<provider id>.<prop>

e.g.

ecf.generic.server.port

or

ecf.generic.server.hostname

or

ecf.generic.server.bindAddress

For the generic provider, these properties above are available.