Hello,
I have a singleton class which looks like
public class MySingleton [
private MySingleton() {
System.out.println("Init MySingleton");
}
private static MySingleton singleton;
public static synchronized MySingleton getSingleton() {
if (singleton == null) {
singleton = new MySingleton();
}
}
}After several days spent looking for a solution I finally understood I should isolate EAR class loaders. All I had to do was turn "Isolated" to true in the ear-deployer.xml!