As We know the bean class may define one @PostConstruct method,
When the
EJB server is first started, it may create a number of stateless bean instances and enter them into the Method-Ready Pool.
My Question is that when I define a PostConstruct method in stateless bean, Does this method is invoked for each instance?
in the other words, If I define PostConstruct method for some global resource initialization which should be executed only once, does container call this mehod by each instance more than once?
after all,How can I define some method for initializing global resource and container just only call once? and How about recycle such resource only when the container is closing.
Thanks!