Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Deprecated HttpServiceTunnel
Deprecated HttpServiceTunnel [message #1139000] Tue, 15 October 2013 09:19 Go to next message
Eclipse UserFriend
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 09:35 Go to previous messageGo to next message
Eclipse UserFriend
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 11:08 Go to previous message
Eclipse UserFriend
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: Wed Jul 16 18:53:59 EDT 2025

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

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

Back to the top