Where are the connections stored? [message #1164424] |
Thu, 31 October 2013 13:23  |
Eclipse User |
|
|
|
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 #1166962 is a reply to message #1164519] |
Sat, 02 November 2013 05:43  |
Eclipse User |
|
|
|
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 ...
|
|
|
Powered by
FUDForum. Page generated in 0.05658 seconds