John,

Good point. It is probably a reference to the ReflectPermission("suppressAccessChecks") permission which the enterprise bean may be granted by the container. For portability I would not assume the enterprise bean has this permission.

--Victor

John Harby wrote:
[EMAIL PROTECTED]"> I guess what is a bit weird is the choice of term "security" rather than
something such as scoping.


From: Victor Langelo <[EMAIL PROTECTED]>
To: John Harby <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Reflection in EJBs
Date: Mon, 23 Sep 2002 10:02:22 -0400

Seems pretty clear to me. If you need to call setAccessible on a field or
method inorder to access it, you've violated the EJB spec.

--Victor

John Harby wrote:

Section 25.1.2 of the EJB spec (several versions) states:

"The enterprise bean must not attempt to query a class to obtain
information
about the declared members that are not otherwise accessible to the
enterprise bean because of the security rules
of the Java language. The enterprise bean must not attempt to use the
Reflection API to access information that the security rules of the Java
programming language make unavailable."

Can someone translate this as to when and where I can use reflection in an
EJB? Is it forbidden only for non-public methods? - Thanks in Adv.

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com



Reply via email to