Rap settingstore, own implementation configuration [message #671636] |
Wed, 18 May 2011 14:34 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
Hello,
I want to provide my own ISettingStore implementation in my RAP application.
According to documentation, it should be possible to define org.eclipse.rwt.settingStoreFactory=id property in config.ini.
But the only way to have it working, is by setting a java System property (-Dorg.eclipse.rwt.settingStoreFactory=id).
What I understand reading the source code is that the only way to define my own factory is using java property.
org.eclipse.rap.ui.internal.servlet.EngineConfigWrapper.regi sterSettingStoreFactory()
String factoryId
= System.getProperty( RWTServletContextListener.SETTING_STORE_FACTORY_PARAM );
if( factoryId != null ) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
But as in documentation it seems to be possible to use config.ini, maybe I miss something ?
I would like to configure my own implementation using config.ini because as my application is packaged as a WAR file using equinox servlet bridge, it is cleaner to configure this in the config.ini provided inside the application, than setting a java property.
Thanks,
[Updated on: Wed, 18 May 2011 14:38] Report message to a moderator
|
|
|
Re: Rap settingstore, own implementation configuration [message #671733 is a reply to message #671636] |
Wed, 18 May 2011 19:53 |
Eclipse User |
|
|
|
Originally posted by:
Arnaud,
it seems that you found a bug. Would you mindto file a bugzilla to track
this issue?
Just out of curiosity, why do you want to implement your own setting store?
Regards,
Rüdiger
On 18.05.2011 16:34, Arnaud MERGEY wrote:
> Hello,
>
> I want to provide my own implementation of ISettingStore in
> my RAP application.
>
> According to documentation, it should be possible to define
> org.eclipse.rwt.settingStoreFactory=id property in
> config.ini.
> But the only way to have it working, is by setting a java
> System property
> (-Dorg.eclipse.rwt.settingStoreFactory=id).
>
> What I understand reading the source code is that the only
> way to define my own factory is using java property.
>
> org.eclipse.rap.ui.internal.servlet.EngineConfigWrapper.regi
> sterSettingStoreFactory()
> String factoryId
> = System.getProperty(
> RWTServletContextListener.SETTING_STORE_FACTORY_PARAM );
> if( factoryId != null ) {
> IExtensionRegistry registry =
> Platform.getExtensionRegistry();
>
>
> Am I missing something ?, I would like to configure my own
> implementation using config.ini because as my application
> is packaged as a WAR file using equinox servlet bridge, it
> is cleaner to configure this in the config.ini provided
> inside the application, than setting a java property.
>
> Thanks,
>
>
>
--
Rüdiger Herrmann
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
Re: Rap settingstore, own implementation configuration [message #671947 is a reply to message #671896] |
Thu, 19 May 2011 12:25 |
Eclipse User |
|
|
|
Originally posted by:
Hi Arnaud,
thanks for the bug and patch. I just committed it to HEAD. I will be
available with 1.5 M1.
If you need to store the preferences in a database it makes perfectly
sense to implement your own settings store.
Regards,
Rüdiger
On 19.05.2011 11:49, Arnaud MERGEY wrote:
> Hello Rüdiger, and thanks for the reply
>
> I have created bug 346407 with a proposal for a patch to fix it
>
> I defined my own settings store, because I needed to store eclipse
> preferences in a database instead of the file on the server.
> As I saw than RAP used settings store in order to persist preferences, I
> guessed that the best way to change preferences storage behavior was to
> provide my own setting store implementation, does it seems good for you ?
>
> Regards,
> Arnaud
>
--
Rüdiger Herrmann
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Powered by
FUDForum. Page generated in 0.03064 seconds