Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » JVM options for OT/Equinox
JVM options for OT/Equinox [message #770284] Fri, 23 December 2011 20:37 Go to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
In a comment to my recent blog post I was asked:

Quote:
Can you think of any drawback of the needed VM options in the eclipse.ini (except that we need a Sun JVM >= 1.5.0_07, and it shoud not be activated on MacOSX) :
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass


It seems I have never really documented why we use these options, so here you go:

In OT/Equinox when an bundle A declares an aspectBinding to a bundle B this creates a bi-directional dependency: A obviously needs to see B, but also the dispatch code woven into B needs to see A.

Such a cyclic dependency is perfectly legal in OSGi, but this doesn't play well with the strategy how a Sun/Oracle VM locks the class loader: deadlocks can easily result during class loading. Since locks are taken directly by the VM, not from Java code, the only way to avoid the deadlocks is by using the obscure options mentioned above (which obviously are platform dependent). This has been discussed in several bugs against Equinox and it has been reported that several projects successfully employ these options, I never heard of any problems caused by these options.

If you have the option to run on a Java 7 VM, there's good news: this VM now officially supports parallel class loading which should completely resolve the issue. I haven't yet made extensive experiments with this feature, though.

Quote:
I am planning to release the next Topcased with those options so we can deploy easily specific hacks to our clients.


FWIW, OT/Equinox automatically sets these options when being installed, which is achieved by instructions to p2 (from a META-INF/p2.inf file). This means I don't actually see the need for setting the options in advance -- as soon as OT/Equinox is installed using p2 mechanisms, everything should be taken care of.

But again, I have never experienced any problems with these options nor have I heard of others reporting such problems.

HTH,
Stephan

Re: JVM options for OT/Equinox [message #774132 is a reply to message #770284] Tue, 03 January 2012 10:21 Go to previous message
Mathieu Velten is currently offline Mathieu VeltenFriend
Messages: 5
Registered: August 2010
Junior Member
Hi,

Thanks for your explanations.

I have seen the automatic adding of the relevant options but this doesn't seems to work with a renamed eclipse.exe and eclipse.ini.
Previous Topic:ObjectTeams and WebStart
Next Topic:Please don't yet upgrade to Juno M5
Goto Forum:
  


Current Time: Thu Mar 28 08:28:07 GMT 2024

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

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

Back to the top