You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by David Rees <dr...@runt.ebetinc.com> on 2001/09/27 03:11:10 UTC

No RuntimeConstants.FILE_RESOURCE_LOADER_MODIFICATIONCHECKINTERVAL?

Hi gang,

I was writing a standalone application using Velocity and went to go
set file.resource.loader.modificationCheckInterval but couldn't find any
static final variable in o.a.v.r.RuntimeConstants to represent it.  It
appears to work simply by hard-coding the value when using
VelocityEngine.setProperty, but is this missing variable simply an oversight
or is it intentional?

Thanks,
Dave

Re: No RuntimeConstants.FILE_RESOURCE_LOADER_MODIFICATIONCHECKINTERVAL?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/27/01 12:03 AM, "David Rees" <dr...@runt.ebetinc.com> wrote:

> On Wed, Sep 26, 2001 at 10:13:27PM -0400, Geir Magnusson Jr. wrote:
>> 
>> Somewhat intentional.  It's kind of weird.  This is a carryover from when we
>> only had a file loader - this (and "cache") are constants that are general
>> (somewhat) to loaders, so while we could have FILE_RESOURCE_LOADER_CACHE, we
>> should also have JAR_RESOURCE_LOADER_CACHE and
>> DATASOURCE_RESOURCE_LOADER_CACHE, etc...  So I think we just left them off.
>> 
>> Couple this with the fact that you don't have to call the file resource
>> loader 'file' : i.e.
>> 
>> 
>> resource.loader = woogie
>> woogie.resource.loader.class =
>>       org.apache.velocity.runtime.resource.loader.FileResourceLoader
>> woogie.resource.loader.cache = true
>> woogie.resource.loader.modificaationCheckInterval = 10
>> 
>> Is a perfectly legit (although weird) way to do it...
>> 
>> So we just kinda let it go, and made sure things were well and correctly
>> defined in the documentation.
> 
> OK, kinda makes sense now, then.  Does that mean you may be deprecating some
> of those constants in the future?

Maybe.  I guess we can see how people feel.

geir

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



Re: No RuntimeConstants.FILE_RESOURCE_LOADER_MODIFICATIONCHECKINTERVAL?

Posted by David Rees <dr...@runt.ebetinc.com>.
On Wed, Sep 26, 2001 at 10:13:27PM -0400, Geir Magnusson Jr. wrote:
> 
> Somewhat intentional.  It's kind of weird.  This is a carryover from when we
> only had a file loader - this (and "cache") are constants that are general
> (somewhat) to loaders, so while we could have FILE_RESOURCE_LOADER_CACHE, we
> should also have JAR_RESOURCE_LOADER_CACHE and
> DATASOURCE_RESOURCE_LOADER_CACHE, etc...  So I think we just left them off.
> 
> Couple this with the fact that you don't have to call the file resource
> loader 'file' : i.e.
> 
> 
> resource.loader = woogie
> woogie.resource.loader.class =
>       org.apache.velocity.runtime.resource.loader.FileResourceLoader
> woogie.resource.loader.cache = true
> woogie.resource.loader.modificaationCheckInterval = 10
> 
> Is a perfectly legit (although weird) way to do it...
> 
> So we just kinda let it go, and made sure things were well and correctly
> defined in the documentation.

OK, kinda makes sense now, then.  Does that mean you may be deprecating some
of those constants in the future?

-Dave

Re: No RuntimeConstants.FILE_RESOURCE_LOADER_MODIFICATIONCHECKINTERVAL?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/26/01 9:11 PM, "David Rees" <dr...@runt.ebetinc.com> wrote:

> Hi gang,
> 
> I was writing a standalone application using Velocity and went to go
> set file.resource.loader.modificationCheckInterval but couldn't find any
> static final variable in o.a.v.r.RuntimeConstants to represent it.  It
> appears to work simply by hard-coding the value when using
> VelocityEngine.setProperty, but is this missing variable simply an oversight
> or is it intentional?

Somewhat intentional.  It's kind of weird.  This is a carryover from when we
only had a file loader - this (and "cache") are constants that are general
(somewhat) to loaders, so while we could have FILE_RESOURCE_LOADER_CACHE, we
should also have JAR_RESOURCE_LOADER_CACHE and
DATASOURCE_RESOURCE_LOADER_CACHE, etc...  So I think we just left them off.

Couple this with the fact that you don't have to call the file resource
loader 'file' : i.e.


resource.loader = woogie
woogie.resource.loader.class =
      org.apache.velocity.runtime.resource.loader.FileResourceLoader
woogie.resource.loader.cache = true
woogie.resource.loader.modificaationCheckInterval = 10

Is a perfectly legit (although weird) way to do it...

So we just kinda let it go, and made sure things were well and correctly
defined in the documentation.

geir

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin