Locking in cfscript

349 views
Skip to first unread message

Serge Droganov

unread,
Apr 11, 2011, 3:12:36 PM4/11/11
to Railo
Hello,
Is it possilble to make locks with cfscript in railo? How to make
them?

Do functions like directorycreate or imagewrite use locks? How to lock
app or server variable calls in scripted components?

Thank you,
Serge

Michael Offner

unread,
Apr 11, 2011, 3:23:29 PM4/11/11
to ra...@googlegroups.com
tag lock is supported inside cfscript.

/micha

2011/4/11 Serge Droganov <design...@gmail.com>

Sean Corfield

unread,
Apr 11, 2011, 3:46:14 PM4/11/11
to ra...@googlegroups.com
On Mon, Apr 11, 2011 at 12:12 PM, Serge Droganov <design...@gmail.com> wrote:
> Is it possilble to make locks with cfscript in railo? How to make
> them?

Here's a snippet from FW/1 2.0 that is all script and runs on Railo 3.2.2:

lock scope="session" type="exclusive" timeout="30" {
param name="session.__fw1NextPreserveKey" default="1";
nextPreserveKey = session.__fw1NextPreserveKey;
session.__fw1NextPreserveKey = session.__fw1NextPreserveKey + 1;
}

--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Serge Droganov

unread,
Apr 12, 2011, 5:30:13 AM4/12/11
to Railo
Thank you Sean, Michael,

Sean, can use named locks like:
lock name="lockName" type="exclusive" timeout="30" { }

On 11 апр, 23:46, Sean Corfield <seancorfi...@gmail.com> wrote:
> On Mon, Apr 11, 2011 at 12:12 PM, Serge Droganov <designbis...@gmail.com> wrote:
> > Is it possilble to make locks with cfscript in railo? How to make
> > them?
>
> Here's a snippet from FW/1 2.0 that is all script and runs on Railo 3.2.2:
>
>                         lock scope="session" type="exclusive" timeout="30" {
>                                 param name="session.__fw1NextPreserveKey" default="1";
>                                 nextPreserveKey = session.__fw1NextPreserveKey;
>                                 session.__fw1NextPreserveKey = session.__fw1NextPreserveKey + 1;
>                         }
>
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View --http://corfield.org/
> World Singles, LLC. --http://worldsingles.com/
> Railo Technologies, Inc. --http://www.getrailo.com/

Todd Rafferty

unread,
Apr 12, 2011, 6:26:47 AM4/12/11
to ra...@googlegroups.com
Did you try it? :)
--
~Todd Rafferty
Volunteer
Community Manager
Railo Server - Open Source
----

Sean Corfield

unread,
Apr 13, 2011, 4:02:09 AM4/13/11
to ra...@googlegroups.com
On Tue, Apr 12, 2011 at 2:30 AM, Serge Droganov <design...@gmail.com> wrote:
> Sean, can use named locks like:
> lock name="lockName" type="exclusive" timeout="30" { }

Not sure what you're asking?


--
Sean A Corfield -- (904) 302-SEAN

An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Railo Technologies, Inc. -- http://www.getrailo.com/

Reply all
Reply to author
Forward
0 new messages