Expand my Community achievements bar.

LCES server caches the custom component classes

Avatar

Former Community Member
I found that sometime during the (patching) deploy/undeploy install/uninstall phase of custom component LCES start 'caching the custom component or its helper classes' and any changes made to them does not get reflected.

But after the server restarted every thing work as expected.



i.e. If server is restarted the latest changes to component deployed previously to server restart get reflected.

Pl. help.



Any one had simillar issue?

Thanks

Yog
2 Replies

Avatar

Former Community Member
If you stop and start the component when a change is made that should clear the cache as well.

Avatar

Former Community Member
Hi Paul,

I have tried both of these frequently (many times)

1) Component > STOP > PATCH > START

2) Component > STOP > UNINSTALL > INSTALL > START

but no effect after some point when server keeps the cache. (it works some time but not all the time I thought 2nd approach should always work)



But if I restart the server it seems to show the expected result always.



Does any Adobe teche knows how to gaurrentee 100% that chnges will reflect after new version of the component is installed without restart of the server.



Also I seen some inside the service impl at the begining of the service method code store the classloader:

ClassLoader originalClassloader = Thread.currentThread().getContextClassLoader();

...

...



and restore it at the end of service method:

if (originalClassloader != null) {

Thread.currentThread().setContextClassLoader(originalClassloader);

}



How does this affect?

and also if one component depends on another how does that affect?



Thanks

Yog