I have a java lambda running in aws. I have a simple code that loads a jar that I download each run from the net:
URLClassLoader urlClassLoader = new URLClassLoader(
new URL[]{myJar.toURI().toURL()}, this.getClass().getClassLoader());
Class<?> classToLoad = Class.forName(className, true, urlClassLoader);
Method method = classToLoad.getDeclaredMethod("myMethod", String.class);
method.invoke(null,"some data");
Is it possible that if I have several executions of my aws lambda at the same time (and of course each execution downloads the jar from the network - and the jar might be modified all the time before I download it) to have collision between class versions? Is it possible for different executions to use the same class loaders?
(I tried to test it first and had no class loader issues)
thanks for the help