Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Deprecated HttpServiceTunnel
Deprecated HttpServiceTunnel [message #1139000] Tue, 15 October 2013 13:19 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
I've updated my production version of eclipse and scout sdk to Kepler SR1 (3.9.1) and now I get an error about setServiceTunnel(HttpServiceTunnel(...)) being depreacted.

With some trial and error I replaced the following code
     setServiceTunnel(new HttpServiceTunnel(this, getBundle().getBundleContext().getProperty("server.url")));


with the following code
    try {
      setServiceTunnel(new ClientHttpServiceTunnel(this, new URL(getBundle().getBundleContext().getProperty("server.url"))));
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }


Is this the correct (and easiest) way to get rid of the deprecation warning?

As far as I can tell, it seems to work Smile
Re: Deprecated HttpServiceTunnel [message #1139019 is a reply to message #1139000] Tue, 15 October 2013 13:35 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Hi Urs,

We have announced and documented this API change in the New and Noteworthy notes.

The migration notes on bug 405353 recommend to your code to:

setServiceTunnel(new ClientHttpServiceTunnel(this, UriUtility.toUrl(getBundle().getBundleContext().getProperty("server.url"))));


This is also what the SDK does for new project (SDK version >= 3.10.0-M3).

Feel free to provide any feedback in this domain (on documentation or on issues with your application and your use case). Thank you in advance.

.
Re: Deprecated HttpServiceTunnel [message #1139135 is a reply to message #1139019] Tue, 15 October 2013 15:08 Go to previous message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Jeremie, I checked the New and Noteworthy page and saw the text about the Tunnel but totally missed the reference to the migration guide.

Thanks for linking to those again, I've updated my code to match the recommendation.
Previous Topic:ImapAdapter
Next Topic:Why are several Preferences disabled
Goto Forum:
  


Current Time: Tue Mar 19 04:43:29 GMT 2024

Powered by FUDForum. Page generated in 0.02177 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top