Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

EJB Spec Question regarding classloading

843830Sep 8 2008
Some time ago I posted a message on "The Serverside" asking whether "Spring violates JEE spec". Of course I meant especially the EJB spec:

http://www.theserverside.com/news/thread.tss?thread_id=50477#267459

A huge discussion started especially regarding the following statement in the spec:

"The enterprise bean must not attempt to create a class loader; obtain the current class loader;
set the context class loader; set security manager; create a new security manager; stop the
JVM; or change the input, output, and error streams."

There was a lot of discussion. Someone then pointed to the following page:

http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html

There I can read something which confused me:

"Contrary to common belief, most of the Java Reflection API can be used from EJB components. For example, loadClass() and invoke() can both be used by enterprise beans. Only certain reflection methods are forbidden."

Is the writer of this article wrong? Or is true? But then why does the spec make this general restriction?

I hope someone can shed some light on this. I'd really like to have an answer to that.

Regards
Oliver
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2008
Added on Sep 8 2008
0 comments
96 views