JMS client/JMS destineation(Queue / Topic) sends messages to the MDB instances. Then MDB sends the message to the Entity Bean. Can i add
session bean as a asynchronous wrapper between MDB and Entity Bean.
Yes, you can add a Session EJB on the node hosting the Entity EJB. The Message EJB would then communication with the Session EJB instead of attempting to directly communicate with the Entity EJB.
Message-Driven Beans are for handling messages from message queues.
Session Beans are for executing business logic.
Entity Beans are a temporary object-oriented representation of data.
The code in a Message-Driven bean should not contain business logic. You can certainly code business logic in it, but it would bad design in my opinion. So, if there is any business logic that is associated with the data (Entity Bean) then it should be coded in a Session EJB.
The Entity Bean code should not contain business logic either.
Whether they are in the same container or not is not really relevant. Each bean has a purpose.
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, that will fit in a stocking