Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need help on EJBOverview

 
Loka Nalla
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I see a line in study guide in the EJB Overview chapter 1.

Could anybody explain me what does the below line say? If possible an example would help me to understatnd.

"The enterprise bean must not attempt to gain access to packages and classes that the usual rules of the Java programming language make unavailable to the enterprise bean"

Thank you
Loka
 
Mikalai Zaikin
Ranch Hand
Posts: 3381
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This basically means that Bean Provider *must* *not* use Java Reflection API to get access to some variables or methods which are not accessible via regular Java calls.

For example, using Java Reflection, it is possible to get/set private variables from other classes. Doing this will break EJB Container contract which provides security, threading, pooling, etc.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!