"Rickard �berg" wrote:
>
> > 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.
>
> Unfortunately this is incorrect. getResource() is about getting URL's to
> the resource, and getResourceAsStream simply calls
> getResource().openStream() (or something like that). Underneath this the
> JDK uses FileStreams, so it doesn't work because of the security
> restrictions.

The JDK uses FileStreams to get the full JAR, and yet my class loader
doesn't break. getResource() is a piggyback on top of the same JAR
loading mechanism.

Try grabbing the JDK SCSL sources, look at the class loader URL
implementation, and search for a PrivilegedAction() section there.

arkin

>
> /Rickard
>
> --
> Rickard �berg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.dreambean.com
> Question reality
>
> ===========================================================================
> 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".

Reply via email to