Jun 4th, 2010, 10:55 AM
SpringBeanAutowiringInterceptor, ApplicationContext, and JNDI
The SpringBeanAutowiringInterceptor states it will store the ApplicationContext for the EJB in JNDI, that way a new context isn't created every time the EJB is invoked.
My question is: what happens in a clustered environment (WAS7), are the _instances_ of the beans distributed among all nodes in your cluster?
Case in point:
Lets say you have a stateful Bean in your ApplicationContext (in this case, an EHCache instance). Your front-end application hits the EJB twice for the same data, and each time is routed to a different cluster member. The first time, the data is retrieved, then stored in the cache(in the appContext) on Node1. On the second hit, you are routed to Node2. Is the data pulled out of the cache (in the appContext)?