Yes, I'm referring to the <j2eesession>true</j2eesession> setting in
bluedragon.xml.

The NAME and SCOPE attributes for CFLOCK are mutually exclusive; you can use
one or the other, but not both:

    http://www.cfquickdocs.com/cf9/?getDoc=cflock#cflock

In your case you'll want to use the SCOPE="Session" attribute, which will
lock the entire Session scope for that user.

Using the NAME attribute only gets a server-scoped (GAE instance-scoped)
lock, even if you specify a session-scoped variable.

Vince

On Mon, May 3, 2010 at 3:25 PM, adam <[email protected]> wrote:

> Thanks Vince,
>
> Just to clarify - when you you say "Enable J2EE Sessions" you are
> talking about this setting in bluedragon.xml:
> <j2eesession>true</j2eesession>
>
> I am running into the following problem:
> If I set a scope attribute and a name attribute on the lock I get an
> exception. Is this expected?
>
> The following code throws an exception:
>
> <cffunction name="setName">
>        <cfargument name="name" />
>        <cflock scope="Session" timeout = "20" type="Exclusive"
> name="#session.googleKey#">
>                <cfset var currentuser = googleRead(session.googleKey)>
>                <cfset currentuser.setName(arguments.name)>
>                <cfset currentuser.googleWrite()>
>        </cflock>
> </cffunction>
>
> If I take out the scope attribute the code executes ok.
>
> I think you can see what I am trying to do here. I am trying to get a
> named lock to update an object in the datastore. Am I going about this
> the wrong way?
>
> Thanks.
>
> --
> Open BlueDragon Public Mailing List
>  http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
>  mailing list - http://groups.google.com/group/openbd?hl=en
>
>  !! save a network - please trim replies before posting !!
>

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to