Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Patching deployed plugin
Patching deployed plugin [message #1600803] Wed, 04 February 2015 13:58 Go to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Greetings,

We are trying to deploy a patch on our RAP application. We have followed this guide https://wiki.eclipse.org/RAP/Patch_Fragments .

We try to patch the default handler of a command declared through extension in a plug-in.

To do so, we created a new fragment, made the necessary changes in our manifest:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Patch
Bundle-SymbolicName: host.plugin.ui.patch
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: XXX
Fragment-Host: host.plugin.ui;bundle-version="1.0.0"
Eclipse-PatchFragment: true


and in the build:
source.patch.jar = src/
output.patch.jar = bin/
bin.includes = META-INF/,\
               patch.jar


We created a package with the same name as in the host plug-in, a class with the same name as in the host.

This doesn't work, at the start up our patch is found correctly by equinox:

20	RESOLVED    host.plugin.ui.patch_1.0.0.qualifier
	            Master=38
38	ACTIVE      host.plugin.ui_1.0.0.qualifier
	            Fragments=20


But still no sign of the patch at the execution. We are working with RAP 2.3.1 and Luna.

We need a solution that doesn't alter the host plug-in, is this possible?

Thank you.

Re: Patching deployed plugin [message #1600820 is a reply to message #1600803] Wed, 04 February 2015 14:11 Go to previous messageGo to next message
Markus Knauer is currently offline Markus KnauerFriend
Messages: 179
Registered: July 2009
Senior Member

I'd say you don't want to patch your own bundle:

Quote:
Fragment-Host: host.plugin.ui;bundle-version="1.0.0"


The 'host' bundle is the one where you'd like to change one of the classes. In your case the host is very likely one of the RAP bundles, e.g. org.eclipse.rap.rwt.

(Another pitfall could be that the RAP bundles are signed... and since your fragment isn't signed, or signed with another certificate, this could be the next problem when your classloader detects classes from with different certificates in a single Java package namespace. In that case my guess is that your only option is to remove the signing info from the RAP bundle(s).)

Regards,
Markus



--

Twitter: @mknauer23 and @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Patching deployed plugin [message #1600826 is a reply to message #1600820] Wed, 04 February 2015 14:18 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Yes, but we want to patch one of our own plugins without deploying the host plugin again (going through the feature.xml). Is this a problem?

We would like to deploy only a patch-fragment into a servlet container (already running with our plugins), and install it.
Re: Patching deployed plugin [message #1600843 is a reply to message #1600826] Wed, 04 February 2015 14:33 Go to previous messageGo to next message
Markus Knauer is currently offline Markus KnauerFriend
Messages: 179
Registered: July 2009
Senior Member

Ah, I see. Okay.

Is your own host bundle prepared to be patched, i.e. did you specify the bundle classpath like this (with a non-existing patch.jar as first entry, followed by the existing "." entry of the bundle)?

Bundle-ClassPath: patch.jar,
 .


An example can be found here:

http://git.eclipse.org/c/rap/org.eclipse.rap.git/tree/bundles/org.eclipse.rap.rwt/META-INF/MANIFEST.MF#n6

Only if your host bundle is prepared in this way you can put your new class with a fragment as the first one on the bundle classpath.

Maybe that helps...

Regards,
Markus


--

Twitter: @mknauer23 and @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Patching deployed plugin [message #1600859 is a reply to message #1600843] Wed, 04 February 2015 14:46 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Ok we were afraid of this. No our plug-in wasn't prepared for this. There is no other way?

Thank you for your support.
Re: Patching deployed plugin [message #1600884 is a reply to message #1600859] Wed, 04 February 2015 15:06 Go to previous message
Markus Knauer is currently offline Markus KnauerFriend
Messages: 179
Registered: July 2009
Senior Member

Aleksander wrote on Wed, 04 February 2015 15:46
Ok we were afraid of this. No our plug-in wasn't prepared for this. There is no other way?

Thank you for your support.


No, unfortunately I don't know of any other way to circumvent this. Sorry.

If you have access to the OSGi console you could try to install an updated version of your bundle and uninstall the old one. But that's something that I would try on a stand-by system first...

Regards,
Markus


--

Twitter: @mknauer23 and @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic: Window Alignment in center
Next Topic:EMF + RAP starts but does not show
Goto Forum:
  


Current Time: Tue Mar 19 10:17:09 GMT 2024

Powered by FUDForum. Page generated in 0.02063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top