Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there a pattern to simulate multi-thread in EJB?  RSS feed

 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB does not allowed multi-thread, can we simulate it?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JMS + MDBs is a suitable replacement in many instances where people want threading in EJB.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike W.,
One more thing...
Unfortunately, your name does not comply to the JavaRanch Naming Policy. Please change your display names here. Full last names are required, however initials are allowed as first names.
 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changed
 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how about the performance to use JMS?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how about the performance to use JMS?

Using JMS obviously causes some overhead when compared to "just launching a thread" but the benefit is that the client can proceed without waiting for the response. From the container's point of view, asynchronous communication is easier to "optimize for performance" as the response time is (usually) not an issue and the asynchronous processing may be scheduled for a lower priority thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!