I have a class with Static block Which has dao call. So when this class is called for first time static block is called . Now suppose I return instance of this class from my session bean to a servlet. Will this servlet also call static block ?
- Posted by: sairam manda
- Posted on: November 30 2007 17:52 EST
If your servlet is in a separate JVM, and in servlet's JVM return class has not been loaded into memory yet, then static block will execute. I think that same effect can be reached in the same JVM with some weird classloader isolation. -K