Singleton is not really a singleton
问题 I have situation where I share singleton between my code which runs the embedded-server and my web-application. I have war with classes and deployment tool. When I printf instances I see: abc.Abc@173a10f abc.Abc@105738 So this is not really singleton. How this works? My server Jetty start code: public static void main(String[] args) throws Exception { System.out.println(MySingleton.getInstance()); // start Jetty here and deploy war with WebAppContext() } My ServletContextListener side code: