Dave,
Thats what I mean, best practice says use cfqueryparam, and every document
you read regardless of cfmx 5.0, 6.0, 7.0 says when writing to a variable
you will have a race condition.
Now I can't name the version I tested this on, but I followed one of the
articles directions on how a race
Oh and btw one of the biggest coldfusion/blue dragon websites also
demonstrates the race conditon problem, using persisant variables that
aren't locked.
So your point Dave?
On 4/15/07, Andrew Scott [EMAIL PROTECTED] wrote:
Dave,
Thats what I mean, best practice says use cfqueryparam, and
TechNote ColdFusion MX: Best practices for locking shared scope variables
Macromedia ColdFusion MX offers several enhancements in the way shared scope
variables are managed internally in memory. This TechNote details updated
best practices for locking shared scope variables.
Best practices for
And from the evangelist himself Ben Forta, and NOTE what he says about race
conditions!!
*The more common use of locking is to protect shared memory from corruption.
Let me explain. There are three scopes in ColdFusion that may be accessed by
more than one request at any given time, these are
That's a lie. This tag never fails.
As I helped Caroline out at the start of this same project this tag is
no longer an option as when it is under the load required for this
application the tag fails.
On 4/14/07, cf user [EMAIL PROTECTED] wrote:
http://www.cftagstore.com/tags/cfxhttp5.cfm
Is there an easy way to compare two lists and if there is at least one
common value then .. do something?
What I'm imagining is something like this:
UserPermissions = 1000,1003,1005,1006,1007 (held in the
session.user.cfc after login)
Permissions required = 1003,6048,6484,7809 (part of the
Yes, so there we are, it's optional.
On 4/15/07, Andrew Scott [EMAIL PROTECTED] wrote:
*So, is the locking of shared memory still needed in ColdFusion MX? The
answer is that it depends on why you are locking.
--
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/
Mike Kear,
He who is an Adobe Certified Advanced Coldfusion Devleoper, doesn't know
about
IsUserInRole(userPermissions,admin,contentAuthor);
hehe
On 4/15/07, Mike Kear [EMAIL PROTECTED] wrote:
Is there an easy way to compare two lists and if there is at least one
common value then .. do
James, it says it depends on why you are locking and then it says if you are
expecting a race condition you need to use locking:-)
I can't believe people are not reading it in its full context, as I said I
tried it on 2 different version of CFMX7.02 being a public released version
and both show
Yes i do know about IsUserInRole, but as i explained in my question i
need a much more granular kind of permission set.
And anyway i'm not using the CFLOGIN system for a variety of reasons.
So yes i do know about it, but in this case I can't use it.
Cheers
Mike Kear
Windsor, NSW, Australia
Mike, thats the only method in CF that is the simplest without doing your
own IsUserInRole()...
On 4/15/07, Mike Kear [EMAIL PROTECTED] wrote:
Yes i do know about IsUserInRole, but as i explained in my question i
need a much more granular kind of permission set.
And anyway i'm not using
I have done my own. There are lots of reasons why the cflogin system
was not appropriate for this site, but most was that the CFLOGIN is
too one-size-fits-all for the organisation.
I have already built the security on this site - it's been in place
for 18 months now but i need to improve the
Mike Kear wrote:
Is there an easy way to compare two lists and if there is at least one
common value then .. do something?
cflib has a listcompare function.
Jochem
~|
Deploy Web Applications Quickly across the enterprise with
Mike,
Thats why your own IsUserInRole() would be the way to go.
That way you can break out of the loop and return true or false, so then
this will work for you
cfif myIsUserInRole(userPermissions,admin,backup,security,docManager)
Allowed
cfelse
Not allowed
/cfif
On 4/15/07, Mike Kear
On 4/14/07, Andrew Scott [EMAIL PROTECTED] wrote:
Thats what I mean, best practice says use cfqueryparam, and every document
you read regardless of cfmx 5.0, 6.0, 7.0 says when writing to a variable
you will have a race condition.
No. It is *not* the case that you will have a race condition.
On 4/15/07, Mike Kear [EMAIL PROTECTED] wrote:
cfset OkToGo = false /
cfloop list = #UserPermissions# index=i
cfset OkToGo = listfind(Permissionsrequired, #i#) /
/cfloop
cfif OkToGo is false
cflocation addtoken=no url=/index.cfm /
cfabort
/cfif
This all seems a
cfset application.flag = true /
no on its own that can not cause a race condition, but if somewhere else
there is a read on that variable somewhere then that will cause a race
condition.
So in that scenario if it potentially can cause a race condition then lock
it, as Ben Forta says.
Now as
Andrew Scott wrote:
Thats what I mean, best practice says use cfqueryparam, and every document
you read regardless of cfmx 5.0, 6.0, 7.0 says when writing to a variable
you will have a race condition.
Just because you can have a race condition doesn't mean you will have a
race condition.
Ok as Sean said, on its own that doesn cause a race condition. So no thats
true.
But, lets say somewhere else in the code you require that same variable for
other reporting. And in the meantime of you begining to do the reporting,
that variable changes. Hence a race conditon has occured.
The
Andrew Scott wrote:
cfset application.flag = true /
no on its own that can not cause a race condition, but if somewhere else
there is a read on that variable somewhere then that will cause a race
condition.
No it doesn't.
The third factor you need is a statement that sets application.flag
Actually that reminded me of why I brought up myspace in the first place.
I have noticed the page views jump up and down on a regular basis, because
someone else has hit the page and when my session has finished it says lets
say 166, then when they finish and I go to view it again it has gone
Then your a fool in the making.
Ok, lets say we have 2 threads running.
Thread number one is checking to see if application.flag is true or not, it
sees it as true it gets hafl way through its process the second thread while
running at the same time has now changed this value halfway through the
Andrew Scott wrote:
Then your a fool in the making.
Ok, lets say we have 2 threads running.
Thread number one is checking to see if application.flag is true or not, it
sees it as true it gets hafl way through its process the second thread while
running at the same time has now changed
So you wont me to be 100% specfic now, I already stated in my first post
what I do to stop the race condition from happening byt locking th setter in
the component.
I posted Bens article on CFlock and Race Conditions, as well as a FAQ of the
Adobe websote.
So if I say that somewhere else changes
Hey, I have an inner cfoutput that shows totals for each question answered.
It looks like this: http://wtomlinson.com/outputcap.jpg
I need it to count up the totals vertically for each question, then show them
at the bottom, horizontally as shown. Except what you see in the screen cap are
Dave's right on the different log4j version. What version of the
security library are you using? I had to go back to 1.2 and
xmlsec-1.2.96.jar to get my signature validation to work with CF's JRE,
Phil
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Friday, April 13,
-Original Message-
From: Mike Kear [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 15, 2007 3:20 AM
To: CF-Talk
Subject: Compare two lists and if one element common ...
Is there an easy way to compare two lists and if there is at least one
common value then .. do something?
What
Does anyone know of a CFC, tag, or UDF that allows you to add files to an
existing Zip file? So far everything I have found in my searches just
allows for the creation and can put whatever I want to in at that point. I
can not use cfexecute in this environment which leaves out possibly just
If you create a new one with the same file name, doesn't it add the files to
the existing zip?
Dan
On 4/15/07, Aaron Rouse [EMAIL PROTECTED] wrote:
Does anyone know of a CFC, tag, or UDF that allows you to add files to an
existing Zip file? So far everything I have found in my searches just
I don't see any nested loops in the code below. So the simple answer here is to
just declare some variables outside of the loop to manage the sums. As long as
the variable is outside the loop, you'll be set:
cfset answervalueTotal = 0 /
cfset totalforthisquestionTotal = 0 /
cfset
That's a lie. This tag never fails.
That's a very silly thing to say, since everything can fail under the right
conditions.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in
Thats what I mean, best practice says use cfqueryparam, and
every document you read regardless of cfmx 5.0, 6.0, 7.0 says
when writing to a variable you will have a race condition.
Now I can't name the version I tested this on, but I followed
one of the articles directions on how a race
And from the evangelist himself Ben Forta, and NOTE what he
says about race conditions!!
Try as I might, I can't find one place in that quote that says all access to
session, application or server variables must be locked.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf
See thats why you are a fool ...
Calling Jochem a fool is not only unwarranted, but so far off the mark I
don't know where to begin. Suffice it to say we need more fools like that.
Now thats also one reason I made the coment on cfqueryparam,
if I control the information that is going into
Hi everybody:
Do you know any CFM shopping tutorial or a Dreamweaver extension that helps me
build a shopping cart? I saw cartweaver but it is too complicated and full of
options and I think I won't have full control over everything on that while I
need to learn/ customize the whole shopping
You can try the Alagad Zip Component which is really good.
It is not free, it is a commercial product.
http://www.alagad.com/index.cfm/name-zip
~|
Macromedia ColdFusion MX7
Upgrade to MX7 experience time-saving features, more
Thanks, for whatever reason I did not find that one in my searches.
On 4/15/07, Dimitris C [EMAIL PROTECTED] wrote:
You can try the Alagad Zip Component which is really good.
It is not free, it is a commercial product.
http://www.alagad.com/index.cfm/name-zip
Using what solution? The ones I have tried so far would simply delete the
existing zip file and create a new one and put the new files/directories
into it.
On 4/15/07, Dan O'Keefe [EMAIL PROTECTED] wrote:
If you create a new one with the same file name, doesn't it add the files
to
the
Thanks Jim for your suggestions. Its a bit late in the day for this
project to redesign the whole user authentication/access/permission
control architecture,but i have another project starting in a couple
of weeks and ill take a good look at what you've done for that one.
I am grateful for you
On 4/15/07, Andrew Scott [EMAIL PROTECTED] wrote:
cfset application.flag = true /
no on its own that can not cause a race condition, but if somewhere else
there is a read on that variable somewhere then that will cause a race
condition.
Wrong.
Code can read that variable to its heart's
Now here's something I was wondering about...
Does the JS and CF validation have to be totally independent
in functionality? It would seem so, if I'm concerned about a user
not being able to use forms.
I've got a technique I'm working on that involves JS posting a form
back to the page it's on,
Just to be very clear, as I am being quoted in this discussion, I wrote:
But race conditions are still an issue, and if you are concerned about
them then you still need to lock access to shared memory ... locking ... is
needed in order to prevent race conditions, if those are an issue ...
Basically, yes. What I do for most of my forms is build the JS and
server-side validations dynamically. Both are built off the same reference
file so all I need to do is maintain that file within the limits of my
validation builders. Works out for most forms but is not an end all
solution for
I don't see any nested loops in the code below. So the simple answer
here is to just declare some variables outside of the loop to manage
I'm sorry, I should've posted the WHOLE output. The one I posted is JUST the
inner cfoutput.
I'll try your example shortly.. .Thanks jake!
Will
Thanks for your input Justin. However, I already have a bunch of heavy-duty
CFCs running in the application scope. I was thinking that I did not want to
increase that load. I also don't know how much is enough in the application
scope. I should probably just get something like SeeFusion and go do
Ok, here's what's throwing me.
My output expands dynamically horizontally AND vertically.
I'm having a hard time tracking the totals for each column, since they're
dynamic.
Here's my entire cfoutput. I worked on it a few hours, then got pissed and
erased what I'd done. I need to track each
Thanks again, I looked it over and bought it, seems to be doing everything I
needed.
On 4/15/07, Aaron Rouse [EMAIL PROTECTED] wrote:
Thanks, for whatever reason I did not find that one in my searches.
On 4/15/07, Dimitris C [EMAIL PROTECTED] wrote:
You can try the Alagad Zip Component
I need no money transaction in the
shopping cart so many options based on credit cards and shipping and
something like that won't be necessary. Just showing the products in
categories, and adding them to wish list/ buy list after logging in
and showing the added products in a box
Rick,
Does the JS and CF validation have to be totally independent
in functionality? It would seem so, if I'm concerned about a user
not being able to use forms.
I've got a technique I'm working on that involves JS posting a form
back to the page it's on, then cfincluding a page of CF to
Sean,
A race condition is as stated in one of my previous posts.
And I quote again...
If thread one, is running and it checked the condition session.flag is true
and while halfway through that check, the variable is changed it is going to
cause a few problems.
If for instance I have a serious
Does the JS and CF validation have to be totally independent in
functionality?
Basically yes ;-)
I mean:
1º Javascript is so useful for so many things, I simply won't let a user
fill a form if they have Javascript disable, period.
2º the main reason for validating data client side is for the
You should only be doing AJAX validation when you can not do the
validation
on the client-side (such as validating against a database.)
Absolutely true.
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please
Hi, Claude...
I don't see why I should give detailed and
polite notice about what he is doing wrong.
So, if a user's input fails server-side validation, do you not
give an error message to the user?
(That's one of the aggravating parts about dual validation or
using client-side and
Thanks for the comments, Dan.
One of the reasons I've been tinkering with the use of Ajax
in the validation is to get a little experience working with it
and with JS using jQuery.
I haven't made use of Ajax before and see this use (validation)
as a relatively simple way to get my feet wet.
And,
My company has licensed a lot of times the Alagad Image Component, for
different projects.
But recently I used the Zip Component which is also a great tool.
The guy behind Alagad is really a respectful programmer in the Coldfusion
Community.
Cheers.
Wow, this thread sure kicked off.
While we've got the attention of all these big brains, can we just agree
that Jason's problem has nothing to do with locking or lack thereof? There
are certainly race condition scenarios when initializing shared scopes (as
per Sean's example) that can *look*
Jason,
Not sure if you saw my reply to the now somewhat out of control thread on
CFC locking, so here it is again:
I have seen a problem where a proxy cache was mixing up user's sessions so
they would actually see each other's data. The actual mechanism was that
the proxy would return the
On 4/15/07, Jaime Metcher [EMAIL PROTECTED] wrote:
While we've got the attention of all these big brains, can we just agree
that Jason's problem has nothing to do with locking or lack thereof?
Correct. Despite Andrew Scott's repeated long posts about race
conditions, that has nothing whatsoever
(Sorry if this turns out to be a duplicate - I'm posting again because
my post last night hasnt appeared yet.)
Thanks Jim for your suggestions. Its a bit late in the day for this
project to redesign the whole user authentication/access/permission
control architecture,but i have another project
I'm looking to get a new laptop and I'm just wondering - what version of Vista
does a Coldfusion developer really want/need? For example I remember from the
XP days that the folks who picked up Windows XP Home Edition didn't have IIS,
which really can be a pain to workaround. There were also
You only need the Business edition, only if you want to be able to use more
than one website in IIS, as this is a full blown version of IIS.
Otherwise premium edition will surfice.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404
You could of course go for the Vista no locking edition for that extra
punch
:-)
This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540. It contains
You only need the Business edition, only if you want to be
able to use more than one website in IIS, as this is a full
blown version of IIS.
Otherwise premium edition will surfice.
I think the ability to host multiple sites is available with IIS 7 using
Home Premium, actually, although I
I'm looking to get a new laptop and I'm just wondering - what
version of Vista does a Coldfusion developer really
want/need? For example I remember from the XP days that the
folks who picked up Windows XP Home Edition didn't have IIS,
which really can be a pain to workaround. There were
Dave,
It isn't check the Microsoft website, this is one thing I checked before
even considering buying Vista to make sure I got what I needed.
I wish I had that link handy right now:-(
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile:
Btw if you want a better idea on XP to Vista upgrade then check this link
out.
http://arstechnica.com/news.ars/post/20060730-7384.html
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
It isn't check the Microsoft website, this is one thing I
checked before even considering buying Vista to make sure I
got what I needed.
I did check the Microsoft website. If you note the URL included in the
previous message, it has two links to MS Technet which indicate otherwise:
Well, I can tell you for a fact.
Vista Premium comes with a cut down version of IIS, authentication and
multiple websites are not supported, and if you need to or want these you
will need Vista Business/Enterprise/Ultimate for the full blown inclusion of
IIS 7.0
There are a lot more that is not
68 matches
Mail list logo