Ejb 3, message driven bean cooperating with a stateful session bean?

Hey! I'm relative new to both Java EE and Stackowerflow, please be kind :-) I have a bunch of devices triggering Java messages to be sent on any state change. These devices are typically active for about 30-90 minute intervals. Each event message contains a device id in addition to the event details. Central in my application is a message driven bean subscribing to those events. Every time I get an event I have to hit the database to look up some info about the device. It would be absolutely terrific if I could associate a stateful session bean with each active device! If this had been a web application I would have used the http session to store a handle or reference to the stateful bean (I'm I right?). Is there any way that I can archive this from my message bean?
Are these device data mutable? What are you doing if a device is modified? Then the state of the entity you hold in the business logic differs from the representaion in the database. In my opinion data should be hold only one place.

以上就是Ejb 3, message driven bean cooperating with a stateful session bean?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏