Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Target Management » Where are the connections stored?
Where are the connections stored? [message #1164424] Thu, 31 October 2013 13:23 Go to next message
Martin Tauber is currently offline Martin Tauber
Messages: 116
Registered: July 2009
Senior Member
I have a strange problem ...

The application I wrote works fine when called from eclipse. I then
exported it, lauchned it and added a cnnection. When I then relaunch the
app the connection is lost.

The code I used to create the connection is here:

ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();

ISystemProfile profile =
registry.getSystemProfileManager().getDefaultPrivateSystemProfile();

IHost host = registry.getHost(profile, hostFieldValue);
if (host == null) {
try {
host =
registry.createHost(RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID),
hostFieldValue, hostFieldValue, "Connection to " + hostFieldValue);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}


When I launch the app and create the connection via the remote systems
view, the connection survives the app restart ...

Any ideas?
Re: Where are the connections stored? [message #1164519 is a reply to message #1164424] Thu, 31 October 2013 14:45 Go to previous messageGo to next message
Martin Tauber is currently offline Martin Tauber
Messages: 116
Registered: July 2009
Senior Member
Am 31.10.13 18:23, schrieb Martin Tauber:
> I have a strange problem ...
>
> The application I wrote works fine when called from eclipse. I then
> exported it, lauchned it and added a cnnection. When I then relaunch the
> app the connection is lost.
>
> The code I used to create the connection is here:
>
> ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
>
> ISystemProfile profile =
> registry.getSystemProfileManager().getDefaultPrivateSystemProfile();
>
> IHost host = registry.getHost(profile, hostFieldValue);
> if (host == null) {
> try {
> host =
> registry.createHost(RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID),
>
> hostFieldValue, hostFieldValue, "Connection to
> " + hostFieldValue);
> } catch (Exception e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
>
>
> When I launch the app and create the connection via the remote systems
> view, the connection survives the app restart ...
>
> Any ideas?

ok I found the place it#s in workspace/metadata/plugins/com.eclipse.rse.core

I also saw that the host file is being created when I create the
connection and after a while is disapears again ... hm - looks like a
bug ... since even though the files are gone, the host is still shown in
the remote systems explorer ....

any other ideas?
Re: Where are the connections stored? [message #1166962 is a reply to message #1164519] Sat, 02 November 2013 05:43 Go to previous message
Martin Tauber is currently offline Martin Tauber
Messages: 116
Registered: July 2009
Senior Member
Am 31.10.13 19:45, schrieb Martin Tauber:
> Am 31.10.13 18:23, schrieb Martin Tauber:
>> I have a strange problem ...
>>
>> The application I wrote works fine when called from eclipse. I then
>> exported it, lauchned it and added a cnnection. When I then relaunch the
>> app the connection is lost.
>>
>> The code I used to create the connection is here:
>>
>> ISystemRegistry registry =
>> RSECorePlugin.getDefault().getSystemRegistry()
>>
>> ISystemProfile profile =
>> registry.getSystemProfileManager().getDefaultPrivateSystemProfile();
>>
>> IHost host = registry.getHost(profile, hostFieldValue);
>> if (host == null) {
>> try {
>> host =
>> registry.createHost(RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID),
>>
>>
>> hostFieldValue, hostFieldValue, "Connection to
>> " + hostFieldValue);
>> } catch (Exception e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>> }
>>
>>
>> When I launch the app and create the connection via the remote systems
>> view, the connection survives the app restart ...
>>
>> Any ideas?
>
> ok I found the place it#s in
> workspace/metadata/plugins/com.eclipse.rse.core
>
> I also saw that the host file is being created when I create the
> connection and after a while is disapears again ... hm - looks like a
> bug ... since even though the files are gone, the host is still shown in
> the remote systems explorer ....
>
> any other ideas?
ok I worked around the problem by storeing the connection parameters in
the projects persistent session variables and restoreing the connections
if I don't find them, but this is only a workaround ...
Previous Topic:Using RSE for creating own builder
Next Topic:Converting all TM "Require Bundle" includes to "Import Package" for UI pieces
Goto Forum:
  


Current Time: Sat Aug 23 11:31:55 EDT 2014

Powered by FUDForum. Page generated in 0.10495 seconds