Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this a good way of using EJBs?

 
Ankur Jain
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
My project is completely dependent on asynchronous messaging..so MDBs are natural choice.
but project also involves webservices invocation , persistence (entity are strict no-no) and some other business logic.
so i meant was
client=>MDB=>session bean>>persistence,service invocations etc..
so in this case MDB merely picks up the message when it arrives and then call a local session bean with the data from the message.the session bean carries out the business logic.
the alternative is to have the business logic in the onMessage method of MDB.
I am thinking in terms of performance,transations and scalability
i hope i have cleared out my requirements.
experts what's your call..
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have the business logic in the session bean it becomes more resuable as it can be used in situations when MDB is not involved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!