ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <>
Subject Re: cache settings
Date Mon, 25 Feb 2008 08:50:18 GMT
On Sun, Feb 24, 2008 at 7:08 PM, Shawn Castrianni <> wrote:

> The cache documentation says not to use the same resolution cache at the
> same time, "should never be used by multiple processes at the same time"
> On an automated build server, I can see that this could easily happen.
>  Therefore, I am thinking I need to specify the defaultCache directory on
> the settings tag to use different cache dirs for each build.  The best way
> to do that is to the use build number in the defaultCache value.  However,
> in order to get the buildnumber, you have to call buildnumber which requires
> the settings to be loaded and a cache to be used.
> I am stuck with a chicken and egg problem.  How do I differentiate my
> caches so that the resolution cache isn't used more by multiple processes at
> the same time?

Using build number wouldn't be a solution anyway, since buildnumber is not
thread safe. I suggest using a process id, or a thread id, or a timestamp,
or a combination of them, depending on how robust you want your system and
what you do with this cache after the run.


> ---
> Shawn Castrianni
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited.
>  If you are not the intended recipient (or authorized to receive information
> for the intended recipient), please contact the sender by reply e-mail and
> delete all copies of this message.

Xavier Hanin - Independent Java Consultant

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message