Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

MDB + Entity Bean / MDB + SB + EB

 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you want. MDB is a special kind of Session Bean. Why do you want an another session bean?
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the message? Or, what is in the message? What is the purpose of the message?
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDS is stateless. Session Bean may be statefull.
Message is Queue. The purpose of the message is integration between different systems.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDB and Entity Beans are in the different containers.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which application servers are involved? How many nodes are there?
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which application servers are involved? JBoss application server

How many nodes are there? two nodes
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James, If MDB and Entity Beans are in the same container, can i need Session Bean for wrapper ?
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
If you're gonna buy things, buy this thing and I get a fat kickback:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic