Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] ClassLoader incompatibilities due to EquinoxFWClassLoader

In our tests for dm Server we are firing up an Equinox instance many times in the same VM and after the first invocation (which loads Equinox types with the app ClassLoader), our tests fail because Equinox types are loaded with an EquinoxFWClassLoader. This behaviour cannot easily be stopped because the FrameworkProperties.inUse() method always returns true.

The issue for us in using EquinoxFWClassLoader is that we get test failures due to class incompatibilities. In our case, we load StateObjectFactory in the first test run, and for that run the instance of State that the Equinox types see is the same as those seen by StateObjectFactory. For subsequent runs, Equinox types are loaded from the EFWCL and are not compatible with the types that dm Server has previously loaded.

The simplest solution for us is to be able to clear the FrameworkProperties. A better solution for us is to prevent the use of EFWCL.

Rob

-- 
Rob Harrop
SpringSource 

Registered in England & Wales - Registration Number 5187766
Registered Office: A2 Yeoman Gate, Yeoman Way, Worthing, West Sussex, BN13 3QZ, UK

This e-mail and any attachments transmitted with it are strictly confidential and intended solely for the person or entity to whom they are addressed. Unauthorised use, copying, disclosure or distribution is prohibited. If you receive this e-mail in error please notify the sender immediately and then delete it along with any attachments. E-mails should be checked by the recipient to ensure that there are no viruses and Interface21 does not accept any responsibility if this is not done. Any views or opinions presented are solely those of the author and do not necessarily represent those of Interface21.


Back to the top