Announcement Announcement Module
No announcement yet.
@Interceptors Startup Time Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Interceptors Startup Time

    I have a stateless session bean that utilizes the @Interceptors(SpringBeanAutowiringInterceptor.clas s) annotation. It seems as if the creation of the Spring context does not occur until the 1st usage of a given bean which leads to a startup cost to the first client. Is there any way to pre-init the Spring context?

  • #2
    In your beanRefContext.xml, does setting does setting lazy-init=false on the wrapped context do anything? If not, I bet you could extend the interceptor to fix this.


    • #3
      What I found is that, the EJB's do not execute the Intereceptors until the first invocation. So in order to get around this limitation, I create an initial bean pool explicitly and added a PostConstruct method that ensure this initialization occurs.