Home » Eclipse Projects » Remote Application Platform (RAP) » Reload Java Class (i.e. a ViewPart) on Runtime
Reload Java Class (i.e. a ViewPart) on Runtime [message #521107] |
Tue, 16 March 2010 09:44  |
Eclipse User |
|
|
|
Hello there
is it possible to reload some Views, Editor, or other Java Classes while running a RAP Application? I wish i.e. to add new functionality to a existing view, so next time the view is reopened on the client side, the new class implementation should be loaded?
Greetings, Edin
|
|
| |
Re: Reload Java Class (i.e. a ViewPart) on Runtime [message #521144 is a reply to message #521132] |
Tue, 16 March 2010 10:57   |
Eclipse User |
|
|
|
Hey Holger,
thny for your answer, but that is not what i want. Actually i just want to have sth. like dynamically reloading Java classes while the RAP Application is running. I.e. i have a ViewPart with a button and, i start the RAP application with that view. So after a while i check that my view should have two buttons. So i add that second button to the source, create class file, and want to use that new class file instead of old one. but without retarting the RAP app. dynamically loading and reloading class with normal java isnt a problem. but i dont know if its possible with RAP? i want, that when user logs in next time (or in best way, reopen the view), he get that new view instance with two buttons, without restarting the whole RAP app.
hope now its clear, otherwise i can write to you a mail on german if you like.
Greetings, Edin
|
|
|
Re: Reload Java Class (i.e. a ViewPart) on Runtime [message #521157 is a reply to message #521144] |
Tue, 16 March 2010 11:25   |
Eclipse User |
|
|
|
Oh ok,
so to replace classes you can use OSGi. Just load a new bundle (should
have a newer version than the old one) with your ViewPart Impl and
Extension. Just google a little bit about OSGi/Equinox and how to load
bundles.
Hope this may help.
Regards Holger
On 2010-03-16 15:57:17 +0100, ededagic <dedagic@acsa-consulting.de> said:
> Hey Holger,
>
> thny for your answer, but that is not what i want. Actually i just want
> to have sth. like dynamically reloading Java classes while the RAP
> Application is running. I.e. i have a ViewPart with a button and, i
> start the RAP application with that view. So after a while i check that
> my view should have two buttons. So i add that second button to the
> source, create class file, and want to use that new class file instead
> of old one. but without retarting the RAP app. dynamically loading and
> reloading class with normal java isnt a problem. but i dont know if its
> possible with RAP? i want, that when user logs in next time (or in best
> way, reopen the view), he get that new view instance with two buttons,
> without restarting the whole RAP app.
>
> hope now its clear, otherwise i can write to you a mail on german if you like.
>
> Greetings, Edin
--
-----------------------------------------
http://eclipsesource.com
http://twitter.com/eclipsesource
|
|
| |
Re: Reload Java Class (i.e. a ViewPart) on Runtime [message #521936 is a reply to message #521164] |
Fri, 19 March 2010 07:39  |
Eclipse User |
|
|
|
Hi Edin,
yes, you can start/stop/update/install/remove osgi bundles programmatically. You'll find everything you need in the osgi javadocs. Have a look at the Bundle Interface and the BundleContext Interface.
As far as i know, the current sessions will stay valid.
If you are working with custom widgets that contain their own custom client-side qooxdoo classes, you may run into problems. RAP 1.2 prepares the javascript code for the client at application startup and therefore will not deliver JS-code to the client, which wasn't present at startup.
Regards,
Onno Hensgen
|
|
|
Goto Forum:
Current Time: Wed Jul 02 22:07:21 EDT 2025
Powered by FUDForum. Page generated in 0.05085 seconds
|