On Tue, 7 Nov 2000 10:38:21 +0100, Dirk Koschuetzki
<[EMAIL PROTECTED]> wrote:
>> Implement the I/O stuff in a separate library that the bean can call
>> instead. The only reason I see for turning off security is performance.
>
>I'm back, after checking the archives, and I have to ask (nearly) the same
>question again:
>
>What do you mean by "separate library"?
>As far as I understand the spec and the other mails in the archive an EJB
>must not perform any IO related stuff and this covers the "pure" EJB and
>all methods called on the complete call-graph. Therefore you cannot use
>any "helper classes", "utility classes" or "separate libraries".
>
>So whats the clue to solve the problem?
....
>(* 2h later, reading archived mails *)
;-)
>I think I got it:
>
>Is it correct that a "separate library" or "helper class" means, an
>installed JAR-File on the app-server?
Correct. That way it would be loaded by the system classloader, and
since permissions are either granted depending on which classloader they
use or where they come from this is ok. For jBoss (and I think/hope all
others behave similarly) all classes loaded by system classloader gets
all permissions, whereas classes loaded by the EJB classloader only get
the permissions defined in the EJB spec.
>Therefore I MUST NOT use IO/Threads or something like that AS LONG AS I
>pack it with the EJB and I MAY use it IF I install the IO library on the
>app server.
Correct, *AND* that library behaves properly in terms of using
doPrivileged at the right times. If you call a library that has been
properly installed in your system, and it throws a SecurityException
because it does something an EJB may not do, then it is clearly a bug in
the library.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".