Results 1 to 2 of 2

Thread: One applicationcontext instance per EJB3

  1. #1
    Join Date
    Nov 2009
    Posts
    5

    Default One applicationcontext instance per EJB3

    Hello everybody,

    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?

    Greetings,
    Tobias

  2. #2
    Join Date
    May 2010
    Posts
    2

    Default

    Hello,

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •