EMF Reference Clearing Queue optional? [message #1398068] |
Thu, 10 July 2014 15:04 |
Bob m Messages: 1 Registered: July 2014 |
Junior Member |
|
|
Hi,
We're using EMF on serverside and having an issue also mentioned in this Bug Report.
There is an daemon thread "EMF Reference Cleaner" running in background, but there is no option to control it e.g. stopping it. This is required in a server environment where you want to redeploy your application without restarting the whole server. In our case it leads to JAR files which couldn't be deleted while redeploying since they are still in use by this Reference Cleaner.
The EMF documentation states the daemon thread is optional and can be switched off by a VM argument.
Does anyone know what optional means here and whether there are side-effect disabling it?
It would also be great if there is another way for doing this without using a VM argument since there might be other clients of EMF on this server?
Thanks,
Bob
|
|
|
Re: EMF Reference Clearing Queue optional? [message #1398134 is a reply to message #1398068] |
Thu, 10 July 2014 17:24 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Bob,
On 10/07/2014 6:16 PM, Bob m wrote:
> Hi,
>
> We're using EMF on serverside and having an issue also mentioned in
> this https://bugs.eclipse.org/bugs/show_bug.cgi?id=423567.
>
> There is an daemon thread "EMF Reference Cleaner" running in
> background, but there is no option to control it e.g. stopping it.
> This is required in a server environment where you want to redeploy
> your application without restarting the whole server. In our case it
> leads to JAR files which couldn't be deleted while redeploying since
> they are still in use by this Reference Cleaner.
>
> The
> http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/common/util/CommonUtil.html
> states the daemon thread is optional and can be switched off by a VM
> argument.
>
> Does anyone know what optional means here and whether there are
> side-effect disabling it?
It means you can turn if off with
-Dorg.eclipse.emf.common.util.ReferenceClearingQueue=false. There are
these guards whether to create one or not.
String hasReferenceClearingQueue =
System.getProperty("org.eclipse.emf.common.util.ReferenceClearingQueue");
if (System.getSecurityManager() == null ?
!"false".equalsIgnoreCase(hasReferenceClearingQueue) :
"true".equalsIgnoreCase(hasReferenceClearingQueue))
{
My general assumption was that web servers run with a security manager,
when there is a security manager you must enable it explicitly.
It's nice to do this work on the background thread, but if it's not done
there, collection will be done on the thread that accesses the pools
(slowing them down somewhat).
>
> It would also be great if there is another way for doing this without
> using a VM argument since there might be other clients of EMF on this
> server?
These things happen very early during initialization, so not much
opportunity to provide APIs for doing it.
>
> Thanks,
> Bob
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02592 seconds