Multiple application instances started for single application.

I’m looking at my Vaadin app running on a local tomcat server with JProfiler. This shows that every time I start up the server and run my application, there are 3 instances of my main Application class. If I close the application in the browser or even close the browser completely, there are 2 left. I’ve noticed that the Application’s init() method gets called 3 times during startup, even though I never explicitly call it myself. I am using the Threadlocal pattern (but with InheritableThreadlocal).

It doesn’t look normal to me, is there anything that can cause this kind of behaviour?

I don’t know what would be causing it, but you could just set a breakpoint in the init method and look at the call stack. Or add this:

new Exception("Here's your trace").printStackTrace();

…but you don’t get as much info that way.

Cheers,
Bobby