In general, the rules for getResource are that you can not access
anything as a resource that you would not have the permission to
access through other methods. One exception is that you can access
resources in the same jar file you were loaded from.
------------- Begin Included Message -------------
Date: Tue, 15 Feb 2000 15:19:53 -0800
From: Assaf Arkin <[EMAIL PROTECTED]>
Subject: Re: EJB restrictions and Class.getResourceAsStream()
To: [EMAIL PROTECTED]
Since I don't have access to the Sun libraries I can't verify that, but
the ClassLoader.getResource() is not subject to the same security
restrictions as your application.
I'll be more specific. If you can get a class using a ClassLoader, then
you can get a resource using a ClassLoader.
Although both require a java.io.FilePermission, the code base (typically
rt.jar) runs under all permissions.
arkin
James Cook wrote:
>
> The spec I'm looking at, "1.1 final" has no mention of either getResource()
> method, so it certainly does not specifically "allow" this method.
>
> In fact, if one was to infer, the spec will prohibit this action. The
> getResource() methods rely on java.io.FilePermission which the spec states
> should be set to "deny". BTW, these are Java 1.2 permissions, but I think
> most servers are already based on 1.2.
>
> jim
>
> ----- Original Message -----
> From: Emmanuel Pirsch <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 15, 2000 10:13 AM
> Subject: Re: EJB restrictions and Class.getResourceAsStream()
>
> Resource access with Class.getResource() and
> Class.getResourceAsStream() are allowed by the specification. They go
> through the ClassLoader and the EJB server can easily handle this.
>
> ===========================================================================
> 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".
--
----------------------------------------------------------------------
Assaf Arkin www.exoffice.com
CTO, Exoffice Technologies, Inc. www.exolab.org
===========================================================================
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".
------------- End Included Message -------------
===========================================================================
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".