Railo Extension - Ram Resource Info

Gert just tweeted about the "Ram Resource Info" being available on the preview site ( http://preview.getrailo.org/ExtensionProvider.cfc ). I thought I'd take a moment to show you how to install and use it.

[More]

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Adrian Lynch's Gravatar Is there a reason this works in web but not server admin?
# Posted By Adrian Lynch | 12.11.09 12:41
Todd Rafferty's Gravatar I actually had to research this, but the answer is yes there is a good reason.

I wasn't aware of this until just this morning, but ram:/// is specific to each web context. Case in point, my screenshots were showing everything I did on http://testbed/ - I went over to my http://localhost/ and installed the application and my ram:/// is empty.
# Posted By Todd Rafferty | 12.11.09 14:52
Tony Garcia's Gravatar I haven't really played with the VFS features of ColdFusion 9 (or Railo, for that matter). But I heard the guys on the CFHour podcast say that VFS in CF9 should probably be disabled on shared hosts because because the RAM memory can be accessed accross the entire instance. (I don't have any first-hand experience with this, it's just what I heard the guys say).
If that's true, I think it's actually cool that Railo implemented VFS so that each web context gets its own RAM space.
# Posted By Tony Garcia | 12.11.09 15:14
Todd Rafferty's Gravatar @All: Gert provided information for how you can get started on a "global" ram://
----
Another thing. At the moment the ram resource is defined in each web context’s railo-web.xml.cfm file. The definition looks like this:

<resource-provider
scheme="ram"
class="railo.commons.io.res.type.ram.RamResourceProvider"
arguments="case-sensitive:true;lock-timeout:1000;"/>

If you now copy the above definition to the railo-server.xml file like follows:

<resource-provider
scheme="gram" <<< this scheme just says something like global RAM
class="railo.commons.io.res.type.ram.RamResourceProvider"
arguments="case-sensitive:true;lock-timeout:1000;"/>

and restart the server, you could actually use a global ram resource in order to share files across the server. You can of course use any other scheme for it. Then after that you can use it like this:

<cffile action=”copy” source=”c:\temp.txt” destination=”gram:///test.txt”>
# Posted By Todd Rafferty | 12.11.09 16:43
Todd Rafferty's Gravatar Please note in the 2nd <resource-provider> he changed the name from "RAM" to "GRAM".
# Posted By Todd Rafferty | 12.11.09 16:46
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner