Paul Hammant wrote:
>
> Stephen,
>
> >Interesting that you mentioned this. In some of the code we
> >are using reflection to access this method so that we don't
> >create a dependency on the Phoenix client package. I would
> >really like to see this inside something like a framework
> >utility package.
> >
> I am not so sure. Look at the source for BlockContext and it looks like
> the only non deprecated method.
I've been doing a bunch of stuff to do with Serviceable meta-info and
related stuff. I'm accessing Xxxxx.getBaseDirectory() as the means
to establish the base directory from which relative file references in
configurations can be resolved.
> Th reason I ask is that for full security a policy should be set for
> each classloader that may access the file system. A hacker block (bean
> in my case) could navigate from there to predictable points in the
> system without a security policy.
>
> I wonder if there are not several distict needs for directory pointers:
>
> 1) True temp dir for block
> 2) True temp dir shared for all blocks in sar (like now)
> 3) Some provision for hosted comps to have their own dir space.
>
> Given that Context has 'Object get(String name)' could we superceed with
> something like :
>
> 1) File dir = (File) context.get("phoenix-dir:block");
> 2) File dir = (File) context.get("phoenix-dir:server-app");
> 3) File dir = (File) context.get("phoenix-hostedcomp-dir:" +
> hc.getID().getString());
I would prefer something like:
public DirectoryContext extends Context
{
File getDirectory() throws ContextException
}
public BlockContext extends DirectoryContext
{
...
}
BlockContext then makes sense under the Phoenix package.
DirectoryContext is a general utility interface.
Steve.
> With a design like that you have no dependancy on Phoenix-client. (2)
> would of course be mapped to getBaseDirectory() as at present.
>
> - Paul
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>