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

Dos and donts of EJB  RSS feed

 
Bhayajis Bhayajis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are thread, socket allowed in EJB. If No then why. What are the other functionalities that are not supported by EJBs :roll:
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Bhayajis!
For the "donts", you should check this page.
 
Dave Cronin
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBs have a number of restrictions placed on them by the EJB specification. In the code you can't start a new thread, and you can't use socket to act as a server. (However you can connect to a socket as a client.) Other restrictions are listed in the spec.
These restrictions are there so that the EJB server application handles low-level functionality, the developer can concentrate on writing business logic instead. Instead of saying that EJBs do not support certain features, you could say that certain functionalities found in Java have been deliberately restricted to produce more reliable applications.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!