On Tue, 2008-07-08 at 22:55 +0200, Peter Karich wrote:
> Hi,
>
> on Javalobby someone asked me the following interesting question:
>
> Does Spring RCP has support for a multiple-document interface? I mean
> can I have more than one instance of my application and it's classes
> running in the same JVM. Just wondering how it resolves which action
> 'belongs' to which application instance in this kind of scenario.
>
> Do you have an answer?
I'll give it a shot:
As a first, I have to inform you that the application that is started
with Spring RCP is a Singleton. So one application per VM. This includes
it's ApplicationServices which are retrieved by the
ApplicationServiceLocator Singleton.
Secondly: there are solutions for MDI in the form of docking frameworks.
Look into the docking module to find out more. This might be what you're
referring to?
As a third: there can be multiple windows per application. As a
consequence of this, the current commands are defined in a separate
context file. This file is re-read when creating a new window in order
to have the correct parent window injected if the command needs to be
window-aware. This allows to have multiple windows, sharing the same
resources, running on one vm and opening different views/dialgs etc...
Thus looking upon this, yes you can do MDI, but no you cannot have
multiple instances running on the same VM. In most cases, the latter
isn't a problem.
>
> And is there a Helper class that provides me the 3 common folders:
> sth. like
> APPLICATION_SETTINGS e.g. /usr/share/application
> USER_SETTINGS e.g. /home/user/.application
> WORKING e.g. current working dir
>
> I do not know for sure, but in NetBeans you could have 3 xml settings
> files in those folders and then it will merge them into the "real-used"
> settings file. [1]
> Isn't this approach interesting?
As far as I know, there's no such helper class. It could be provided
though. You can always provide an issue+patch.
Kind Regards,
Jan
**** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm
|