Forums Register Login

MDB + Entity Bean / MDB + SB + EB

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
I'm not sure what you want. MDB is a special kind of Session Bean. Why do you want an another session bean?
+Pie Number of slices to send: Send
What is the message? Or, what is in the message? What is the purpose of the message?
+Pie Number of slices to send: Send
MDS is stateless. Session Bean may be statefull.
Message is Queue. The purpose of the message is integration between different systems.
+Pie Number of slices to send: Send
 

Then MDB sends the message to the Entity Bean.



Are these beans in the same EJB container or are they in different containers? Please explain.

The purpose of the message is integration between different systems.



Are you saying that the MDB and the Entity Bean are not in the same system?
+Pie Number of slices to send: Send
MDB and Entity Beans are in the different containers.
+Pie Number of slices to send: Send
Which application servers are involved? How many nodes are there?
+Pie Number of slices to send: Send
Which application servers are involved? JBoss application server

How many nodes are there? two nodes
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Hi James, If MDB and Entity Beans are in the same container, can i need Session Bean for wrapper ?
+Pie Number of slices to send: Send
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.
I'm still in control here. LOOK at this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2261 times.
Similar Threads
Service Activator - MDB / stand-alone JMS listeners?
MDB and Tx
Message Driven Bean...
Stop EJB Processing
Message Driven Bean and JMS
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:54:28.