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前端其它相关文章！