dev@glassfish.java.net

Re: Resource Autodeployment

From: Jason Lee <jason_at_steeplesoft.com>
Date: Fri, 16 May 2008 09:21:38 -0500

On Fri, May 16, 2008 at 9:07 AM, Tim Quinn <Timothy.Quinn_at_sun.com> wrote:

> Hi, Jason.
>
> Yes, clearly the logic for this needs to be improved and generalized to ask
> the known sniffers if they recognize each new file rather than using a fixed
> list of file types.
>

Right. In my head, the first check for the file type can be removed
(somehow :) and leave that check to the sniffers, with the second... see
below... :P


>
> We should keep the logic that handles slowly-copied files, at least in some
> form, in the auto-deployer if we can. By the time a deployer is running it
> would be best if the deployer could assume that the file or directory is
> ready for processing, so ideally we would be able to avoid even trying to
> run a deployer until the copy operation has completed. Whether the
> autodeployer wait-until-copy-is-complete logic
>

I agree. It seems like it would be fairly trivial to alter this part of the
code to perform that check only if the file type is some sort of archive.
Of course, other file types (like my proposed XML files) face a similar
issue, and I don't see any real nice way of making sure any copy operation
on the XML file is complete before continuing. It seems to me that that
kind of check for this file, whatever it may be (try to load and validate
the file?) might be left up to the deployer, as adding support for each
possible file type here will lead to really unwieldy code.

That being said, I think I'll alter the first code to add any file it finds
to the list, then turn my attention the copy-complete code, making that work
(for now) only on archives. As I don't have commit rights, I'll have to
prepare a patch for inspection (which I would do anyway), so my changes can
be inspected for stupid mistakes/approaches before the tree is updated.
Does that sound OK?

BTW, I know you said this isn't really your area, so if you want to pawn the
issue off on someone who IS handling, that's fine with me. I know you're
busy, and you won't hurt my feelings. :P I do appreciate all your help thus
far, though. :)


>
> (Earlier I opened this issue<https://glassfish.dev.java.net/issues/show_bug.cgi?id=4974>to track the need to check on and clean up this logic.)
>

Nice. I tried to add myself to the CC list, but I don't have the
permissions to edit a bug. Would it be possible to change that? With whom
should I speak about that?

Thanks!

-- 
Jason Lee, SCJP
Software Architect -- Objectstream, Inc.
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com