File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes EJB restictions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB restictions" Watch "EJB restictions" New topic

EJB restictions

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
I dont understand why the EJB's have been restricted from using the following things.

1. No read/write of static fields

2.No thread synchronization

3.No AWT usage

4.No socket listening

5.No File I/O

6.No reflection

7.No creation of threads

8.No access to securty configuration access loading of native library

Can someone explain why are these restrictions on EJB's


Rakesh Kadulkar
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

If you think a bit about what purpose EJB components have you'll be able to see why most of these are restricted. Section 21.1.2 of the EJB specification covers these in more detail.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Dejan Mratinkovic
Ranch Hand

Joined: Nov 20, 2008
Posts: 65
Sun has answered most of your questions (possible all) here:
I agree. Here's the link:
subject: EJB restictions
jQuery in Action, 3rd edition