Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » FXClassLoader.collectModifications() should evaluate Bundle.STARTING (lazy loading bundles)
FXClassLoader.collectModifications() should evaluate Bundle.STARTING (lazy loading bundles) [message #1831203] Thu, 13 August 2020 14:58 Go to next message
Christian Huber is currently offline Christian HuberFriend
Messages: 2
Registered: August 2020
Junior Member
Hello,

currently I'm trying to migrate a huge e4-RCP-application from JDK8 with FX to JDK11 with JavaFX11.
I'm using eclipse 2020-03 (4.15) and a nightly build of the efxclipse runtime in my targetplatform.
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
	<repository location="http://download.eclipse.org/efxclipse/runtime-nightly/site"/>
	<unit id="org.eclipse.fx.runtime.min.feature.feature.group" version="3.7.0.202008120501"/>
	<unit id="org.eclipse.fx.target.feature.feature.group" version="3.7.0.202008120600"/>
</location>


I noticed that the following MANIFEST.MF entries ("Java-Module-AddOpens", "Java-Module-AddExports", "Java-Module-AddReads") aren't always evaluated.

In my case some OSGi-bundles are using the MANIFEST.MF entry "Bundle-ActivationPolicy: lazy". That means they stay in the bundle-state "Bundle.STARTING" until a class from the bundle is loaded. Unfortunately org.eclipse.fx.osgi.fxloader.FXClassLoader.collectModifications(BundleContext) evaluates only bundles in the state "Bundle.RESOLVED" or "Bundle.ACTIVE".

If there's no reason against, I'd suggest to modify the condition in the for-loop:
[...]
if ((b.getState() & Bundle.RESOLVED) == Bundle.RESOLVED
	|| (b.getState() & Bundle.STARTING) == Bundle.STARTING
	|| (b.getState() & Bundle.ACTIVE) == Bundle.ACTIVE) {
[...]


Or am I wrong and there is another way to solve the problem?
Re: FXClassLoader.collectModifications() should evaluate Bundle.STARTING (lazy loading bundles) [message #1831242 is a reply to message #1831203] Fri, 14 August 2020 22:00 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
This is already fixed in the current master branch - https://github.com/eclipse-efx/efxclipse-rt/commit/277e3a703c666794f813f73bb228dc30490063cd
Re: FXClassLoader.collectModifications() should evaluate Bundle.STARTING (lazy loading bundles) [message #1831323 is a reply to message #1831242] Mon, 17 August 2020 11:35 Go to previous messageGo to next message
Christian Huber is currently offline Christian HuberFriend
Messages: 2
Registered: August 2020
Junior Member
Thanks for your reply. I'm a bit confused about the term "current master branch". I thought the master branch is the branch called "master" but you commited to branch "3.x".

It seems to me that "http://download.eclipse.org/efxclipse/runtime-nightly/site" is based on the sources from branch "master". Is there another update-site for the current master "3.x"?
Re: FXClassLoader.collectModifications() should evaluate Bundle.STARTING (lazy loading bundles) [message #1831361 is a reply to message #1831323] Tue, 18 August 2020 07:37 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Well http://download.eclipse.org/efxclipse/runtime-nightly/site is built from the 3.x-branch. What we have in master is what will one day (we hoped to proceed there faster) to 4.x - so if you use the nightly site you should be fine
Previous Topic:FullScreen Stage mode
Next Topic:Update on DriftFX
Goto Forum:
  


Current Time: Thu Apr 25 04:53:59 GMT 2024

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

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

Back to the top