简体   繁体   English

在 ejb 3.1 无状态计时器中使用 spring 服务

[英]Using spring service inside of ejb 3.1 stateless timer

I know that the general consensus is to use one or the other, but we have a specific task where we would like to use our spring services from within a stateless ejb timer.我知道普遍的共识是使用其中一个,但我们有一个特定的任务,我们想在无状态 ejb 计时器中使用我们的 spring 服务。

Is there a standard way of getting a spring service from outside the normal flow of my web app?是否有从我的 web 应用程序的正常流程之外获取 spring 服务的标准方法? (Note I'm using the stripes framework and it has built in spring support and I'm using this built in support to access my spring services normally) (注意我使用的是条纹框架,它内置了 spring 支持,我正在使用这个内置支持来正常访问我的 spring 服务)

According to the Spring manual you can configure an EJB 3 injection interceptor that will take care of injecting @Autowired springbeans into your EJB Session Beans.根据 Spring 手册,您可以配置一个EJB 3 注入拦截器,该拦截器将负责将 @Autowired springbeans 注入您的 EJB Session Beans。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM