Nov 18th, 2009, 02:47 AM
One applicationcontext instance per EJB3
we want to switch from EJB2.1 to EJB3. Until now we use the support classes generating a new application context for every ejb instance. For some reason, we still need to do that after switching, so using SpringBeanAutowiringInterceptor the standard way would not work, because then we have one application context instance for all the ejbs.
So, how would I use the SpringBeanAutowiringInterceptor in my case? I could extend the SpringBeanAutowiringInterceptor changing the getBeanFactory-method so that it returns an application context instance that I instantiate and then hold inside the SpringBeanAutowiringInterceptor-instance. Is that the way to do it, or is there a better, nicer way?
Oct 4th, 2010, 05:15 AM
I have the same situation. I have just an singleton applicationcontext which will be closed after destroying an EJB when I use thse SpringBeanAutowiringInterceptor.
What was the solution for your problem? How can I keep the applicationcontext after destroying the EJB alive? Or did you override the SpringBeanAutowiringInterceptor and override the methode "doreleasbean"?
At first, I increased the timeout of Beans in the pool. But I don't think its the best solution.
Last edited by Woo; Oct 4th, 2010 at 05:22 AM.
Tags for this Thread