-
1. Re: send messages from Statefull to anoteher one.
jamesstrachan Apr 8, 2005 8:59 AM (in response to fabrefumi)I don't know why you need two stateful session beans.
Most design problems resolve themselves to stateless session beans that invoke operations on (or send messages to) entity beans that represent the business data.
You should be able to send messages to the consumer session bean B by producer bean A directly calling business methods on the consumer bean.
You would only need to use a Message Driven Bean in the middle if you need asynchronous behaviour - to deliver a message without waiting for the response.
JBoss will optimise direct method calls to "pass by reference" for good performance.
If you use MDB's, the messages must be serialized to be put on a message queue, and then deserialized before being consumed. This is a performance drag.
James