Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348872 - [r-OSGi] remove unnecessary message when using r-osgi
Summary: [r-OSGi] remove unnecessary message when using r-osgi
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.core (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 07:33 EDT by Alex Blewitt CLA
Modified: 2016-12-03 20:39 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2011-06-09 07:33:34 EDT
When ECF starts up with R-OSGi and DS, it prints out a couple of messages:

WARNING: Port 9278 already in use. This instance of R-OSGi is running on port 9280
[log;+0100 2011.06.09 12:16:36:888;INFO;org.eclipse.ecf.remoteservice;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.remoteservice;code=0;message=No async remote service interface found with name=com.example.foo.IFooAsync for proxy service class=com.example.foo.IFoo;severity2;exception=null;children=[]]]

Is there any way to turn these messages off? Generally, one shouldn't care what port R-OSGi is running on (and it shouldn't be a warning), and if a DS has been developed without any Async interfaces then it's hardly a warning that such Async interfaces don't exist.

I'd argue that if ch.ethz.iks.r_osgi.port hasn't been set (or is set to 0 or -1), then this is an indication that the user doesn't care what the port is; and therefore that they also don't care if it's running on a different port.

It's not even clear where this info message is coming from - according to the code, the call is a logWarning:

	/**
	 * @since 3.3
	 */
	protected Class findAsyncRemoteServiceProxyClass(Class c) {
		String proxyClassName = convertInterfaceNameToAsyncInterfaceName(c.getName());
		try {
			return Class.forName(proxyClassName);
		} catch (Exception e) {
			logWarning("No async remote service interface found with name=" + proxyClassName + " for proxy service class=" + c.getName(), e); //$NON-NLS-1$ //$NON-NLS-2$
			return null;
		} catch (NoClassDefFoundError e) {
			logWarning("Async remote service interface with name=" + proxyClassName + " could not be loaded for proxy service class=" + c.getName(), e); //$NON-NLS-1$ //$NON-NLS-2$
			return null;
		}
	}

Either way, I'm not sure 'not having an async interface' is really something that's worth logging. After all, won't most OSGi services developed outside of ECF not have an async interface?
Comment 1 Alex Blewitt CLA 2011-06-09 07:36:11 EDT
(This is testing against the ECF in Eclipse Helios SR 2 by the way)
Comment 2 Alex Blewitt CLA 2011-06-09 08:08:30 EDT
PS the assignee needs to be changed - this bug was filed against the wrong project in the first place (Thanks, Mylyn!) and now it can't be re-assigned.
Comment 3 Alex Blewitt CLA 2011-06-09 08:15:31 EDT
Thanks Remy.
Comment 4 Remy Suen CLA 2011-06-09 08:17:25 EDT
(In reply to comment #3)
> Thanks Remy.

No problem, happy to help. And thanks for reporting defects to us, Alex.
Comment 5 Scott Lewis CLA 2011-06-09 11:20:18 EDT
(In reply to comment #0)
<stuff deleted>
> Either way, I'm not sure 'not having an async interface' is really something
> that's worth logging. After all, won't most OSGi services developed outside of
> ECF not have an async interface?

Well, that's yet to be seen, I suppose.   But I agree that the default should probably be to not give a warning message...although one reason to continue to do so would be to make people aware that it's possible with ECF to declare and use an async remote service...as with GWT and other systems async remote services are becoming more established).

But since these two warnings are in two areas of ECF (a) the r-osgi provider and b) the remote services implementation) I've created a second bug for the async interface warning...bug 348915.  

Let's use this bug for addressing the r-osgi warning message and use 348915 for the async warning message.  I've changed the subject line of this bug accordingly.
Comment 6 Alex Blewitt CLA 2011-06-13 07:07:07 EDT
Note this is about 'removing' the message, not changing its status to infomercial. In fact, I think all providers should use ephemeral ports by default, if they haven't explicitly been requested (see bug 349176) - so printing out any kind of message would not be a benefit.
Comment 7 Scott Lewis CLA 2016-12-03 20:39:14 EST
The proxy message has been removed.  The r-osgi port warning is staying.

Resolving.