|
|
From: "Mark Mandel" <mark.man...@gmail.com>
Date: Tue, 2 Jan 2007 13:55:51 +1100
Local: Mon, Jan 1 2007 9:55 pm
Subject: Proposed enhancement: discard() on error
Hey all,
This is the last thing on my list of things to do before doing leaving Essentially, I was thinking about error handling - and figured that I I figured I would do this, as it would remove some of the chance I wanted to run this past the list, as I didn't want to end up Can anyone think of any scenarios in which this would be a bad thing? Just wanted to get your thoughts before I did any more work. Otherwise, assuming no one finds anything in the current code base for Look forward to hearing your thoughts. Mark -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Sean Corfield" <seancorfi...@gmail.com>
Date: Mon, 1 Jan 2007 20:30:57 -0800
Local: Mon, Jan 1 2007 11:30 pm
Subject: Re: [transfer-dev] Proposed enhancement: discard() on error
On 1/1/07, Mark Mandel <mark.man...@gmail.com> wrote:
> I figured I would do this, as it would remove some of the chance My first reaction was "Yeah, great idea!" then I wondered about > (there is always a chance) that there is dirty data in the cache if > something happens to go wrong, thus causing further issues. clustered environments... If you get an exception, you need to discard on all instances in the cluster since it would be dirty. This is a problem we already ran into at Adobe, running Transfer in a cluster. We have machinery that allows us to discard across a cluster on any changes (using our own custom machinery) but it sounds like we'd need to do this on any exception as well? Not something I'd considered before. Because of that, in many ways I'd rather you did *not* discard() dirty "If you're not annoying somebody, you're not really alive." You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Mark Mandel" <mark.man...@gmail.com>
Date: Tue, 2 Jan 2007 16:00:37 +1100
Local: Tues, Jan 2 2007 12:00 am
Subject: Re: [transfer-dev] Re: Proposed enhancement: discard() on error
Sean -
Hopefully this makes sense, as I'm thinking it out as I type. For a clustered environment, I would guess that if something went With my new proposal, if something went wrong, the local version would Now that I really think about it, I can't see a case when something This isn't to push my idea, just trying to work out a case in which Mark On 1/2/07, Sean Corfield <seancorfi...@gmail.com> wrote: E: mark.man...@gmail.com W: www.compoundtheory.com You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Sean Corfield" <seancorfi...@gmail.com>
Date: Mon, 1 Jan 2007 21:05:10 -0800
Local: Tues, Jan 2 2007 12:05 am
Subject: Re: [transfer-dev] Re: Proposed enhancement: discard() on error
On 1/1/07, Mark Mandel <mark.man...@gmail.com> wrote:
> With my new proposal, if something went wrong, the local version would Hmm, I'm fairly persuaded... So you're saying that if a save() fails, > still be okay, as it's been discarded, and the clustered versions > would be fine, as if something goes wrong, the data is not saved. this would guarantee that the local cache was clean (the object would be removed) and the database state would be unchanged? If so, then I'd support this change. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Mark Mandel" <mark.man...@gmail.com>
Date: Tue, 2 Jan 2007 16:12:23 +1100
Local: Tues, Jan 2 2007 12:12 am
Subject: Re: [transfer-dev] Re: Proposed enhancement: discard() on error
Actually - coming at it the other way - I can think of a case.
There is a CFC that is hooked into the onAfterDelete event (for The object goes to delete, the delete is committed to the database, A couple of thoughts on that: 1) You would hope that would get picked up in testing, but sometimes So that leaves me still leaning towards the enhancement, but a more Mark On 1/2/07, Sean Corfield <seancorfi...@gmail.com> wrote: E: mark.man...@gmail.com W: www.compoundtheory.com You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Sean Corfield" <seancorfi...@gmail.com>
Date: Mon, 1 Jan 2007 21:21:40 -0800
Local: Tues, Jan 2 2007 12:21 am
Subject: Re: [transfer-dev] Re: Proposed enhancement: discard() on error
On 1/1/07, Mark Mandel <mark.man...@gmail.com> wrote:
> There is a CFC that is hooked into the onAfterDelete event (for Ooh, an interesting use case... > example), with a code error in it, like a divide by zero error. > The object goes to delete, the delete is committed to the database, Well, our expectation would be that a *successful* delete() would need > and the afterDeleteEvent fires, causing an error - which then discards > the object, but I'm figuring will also not allow you to update your > clustered environment? an update to the clustered cache... interesting that there are use cases where even an "unsuccessful" delete() would need an update to the clustered cache... ugh! Yeah, I think it's fair to say that this change doesn't make my world "If you're not annoying somebody, you're not really alive." You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Mark Mandel" <mark.man...@gmail.com>
Date: Fri, 5 Jan 2007 09:45:01 +1100
Local: Thurs, Jan 4 2007 5:45 pm
Subject: Re: [transfer-dev] Re: Proposed enhancement: discard() on error
Just to come back to this -
I think I'm going to leave this one out for now, since I think I'll For a future release, I'm thinking of building something that looks like; <cfset transaction = getTransfer().getTransaction()> <cftry> This would not only manage your database transaction, but also if the This wouldn't be required, but would just take place over doing calls Regards, Mark On 1/2/07, Sean Corfield <seancorfi...@gmail.com> wrote: E: mark.man...@gmail.com W: www.compoundtheory.com You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
|
|
From: Nando <d.na...@gmail.com>
Date: Wed, 3 Jan 2007 15:22:43 +0100
Local: Wed, Jan 3 2007 9:22 am
Subject: Nullable values - dates
I'm looking into how transfer handles typing and nullable values, and am Since any incoming value from an HTML form is a string - no such thing as First, i tried setting the nullable value for date to "", <nullValues> And found out that ColdSpring doesn't like that. Here's the error i get: Bean creation exception during init() of transfer.TransferFactory The error occurred in Ok, no problem, let's try something else: <property name="dateLastFeatured" type="date" nullable="true" nullvalue="" When i use this, ColdSpring doesn't complain, but a new transfer object I'm not sure if there's a bug there or not. So it seems i need to use a magic value of some sort that is a date to <property name="dateLastFeatured" type="date" nullable="true" /> Ok, so now when i create a new transferObject, the default date value is ****** In a web form, an null date is of course an empty string. There's no other This is the main reason i've come to the conclusion that beans that accept So far, my point of translation from the untyped world of HTML to the typed So then i started thinking that it would be very nice if transfer had a But even with a dumb bean, i'm still left with the problem that to a user, a And even if null support is implemented in CF, it doesn't mean that this I'm not sure what the specific question is at this point. I could have run thanks, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Sean Corfield" <seancorfi...@gmail.com>
Date: Wed, 3 Jan 2007 12:23:41 -0800
Local: Wed, Jan 3 2007 3:23 pm
Subject: Re: [transfer-dev] Nullable values - dates
Use a decorator. The decorator overrides the get/set for the date
field and accepts *string* arguments instead. If the decorator set receives an empty string, call the Transfer object set with the "null" date value. If the decorator get is given a "null" date from the Transfer object, return an empty string. Hope that helps? On 1/3/07, Nando <d.na...@gmail.com> wrote: You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Nando" <d.na...@gmail.com>
Date: Wed, 03 Jan 2007 11:39:09 -0000
Local: Wed, Jan 3 2007 6:39 am
Subject: Nullable values - dates
I'm looking into how transfer handles typing and nullable values, and
am running into a little snafu. Since any value coming in from an HTML form is a string .. no such So i tried setting the nullable value for date to "", <nullValues> And found out that ColdSpring doesn't like that. So it seems there's a Bean creation exception during init() of transfer.TransferFactory The error occurred in Ok, no problem, let's try something else: <property name="dateLastFeatured" type="date" nullable="true" When i use this, ColdSpring doesn't complain, but a new transfer object So it seems i need to use a magic value of some sort that is a date to <property name="dateLastFeatured" type="date" nullable="true" /> Ok, so now when i create a new transferObject, the default date value I think everyone is familiar with this difficulty. In a web form, an This is the main reason i've come to the conclusion that beans that And then of course on insert or update to the db, I'll use cfqueryparam So then i started thinking that it would be very nice if transfer had a But even with a dumb bean, i'm still left with the problem that to a But perhaps life would be easier if Transfer would accept an empty Or maybe i'm not seeing a better solution to reconcile the typeless thanks, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2009 Google |