text:
Tim Blair
–, Saturday, November, 28, 2009, (5:49am)
• Digging around in the CRU emails exposes a French connection.
• Climate guy Vincent Gray: "Nothing about the revelations surprises me. I have maintained email correspondence with most of these scientists for many years, and I know several personally. I long ago realized that they were faking the whole exercise."
• Over at the BBC: "The big news about Michael Mann is his investigations into ocean coral."
• Formerly dismissed by leftists as "false", Mark Steyn's opinion is now held by none other than Tim Flannery. Steyn, by the way, coined the toasty term "Warmergate".
• Just as it did before the 2004 and 2006 US elections, The Lancet offers some timely alarmism to aid the cause: "Slashing carbon dioxide emissions also could save millions of lives, mostly by reducing preventable deaths from heart and lung diseases, according to studies published this week in the British medical journal The Lancet."
• The Anchoress has views.
• "Ninety-five percent of the nails were in the coffin prior to this week. Now they are all in," declares Oklahoma Senator and longtime warmy foe Jim Inhofe, of whom Kim Strassel writes: "This week he's looking prescient."
• James Lewis: "It's just like the Nixon tapes, except that emails are a lot more accurate than John Dean's memory."
• Col. Douglas Mortimer: "You know, when you consider that 'We're Saving The Planet' is the biggest power/money grabbing scam since 'We're Saving Your Souls,' whoever leaked/released those e-mails and such is kind of like the modern scientific equivalent of Martin Luther. This person/persons may well have broken the backs of the Global Warming Priests who did everything in their power to make sure that the common man, and those who would oppose them, had no direct access to the Spoken Word of God."
• AGW believer Megan McArdle: "This interview with the head of the UN's climate experts is ridiculous. He responds to concerns about the peer review process being stacked by saying ... all the work was peer reviewed."
• The bottom line on East Anglia's decline hiders: "They're just not prepared to tell the truth in public."
Have Your Say
If this scam fails they'll be back with another one.
I would suggest something like "lifting the third world out of poverty" or compensation for enlightened rulers like Robert Mugabe who's countries have been impoverished by white racist Imperialist slave-drivers....
We could also create a special fund for building mosques and madrassas in Pakistan, Indonesia and Afghanistan to prevent the good people there from radicalizing…
What? What's that? We're already doing that? and still no signs of de-radicalization after all these years and millions of dollars?
Only an enlightened ruler like KRudd would have a solution for this dilemma.
Lets throw some money at it, how's that?
Sat 28 Nov 09 (08:07am)
Sat 28 Nov 09 (01:13pm)
Pachuri has already started repositioning:
He didn't post my comment:
Go back to driving a train, Pachuri. Your IPCC is toast.
Sat 28 Nov 09 (01:37pm)
Steyn, by the way, coined the toasty term "Warmergate"
Sat 28 Nov 09 (04:00pm)
What did I say?
And you don't need to call me prophet, either:
Before the day is done, the next scam will replace the failed one:
Britain, France push for 10 billion dollar climate fund
The usual suspects, the usual guilt trip:
Making sure Mugabe & company will never be out of luck.
It never ceases to amaze me with which religious fervor the usual suspects (Socialist utopians) are determined to squander our wealth [url=http://green.yahoo.com/news/afp/20091127/wl_uk_afp/unclimatefundeubritainfrancecommonwealth.html]AFP
Sat 28 Nov 09 (04:39pm)
I came up with "Warmergate" last week when it first popped up- bloody plagiarising Canucks.
Sat 28 Nov 09 (07:14pm)
I came up with "Warmergate" last week when it first popped up- bloody plagiarising Canucks.
Before or after Sunday?
Sun 29 Nov 09 (07:23am)
Steyn, by the way, coined the toasty term "Warmergate".
I saw somewhere the other day "heating cheating". Thought worked well in this case
This is just the tip of the melting iceberg. In the late 70s/early 80s, (most) college professors from all fields seemed to be cool and admirable. Then, in the late 80s, when I was in grad school, there was the beginnings of an evident stench. Integrity seemed to become secondary to politics.
There is a mountain of academic fakery that has accumulated and it's the basis for flawed policies that we'll have to spend generations rectifying. Either that, or beer. I recommend the beer.
Sat 28 Nov 09 (08:13am)
Are we getting any traction ? It seems that only a few sceptical outlets are running with this. Is the turmoil in the Liberal party a result of these emails ? What's it going to take to kill off AGW ? Another couple of cooling years ? AGW will come to pass. I hope sooner rather than later.
Sat 28 Nov 09 (08:31am)
Sat 28 Nov 09 (03:46pm)
Spent the past few days emailing every man and his dog, and trying to post relevant info and links all over cyberspace. Funny how none of the mainstream online papers (SMH, Age, Advertiser, etc) have yet published any of my comments referencing the CRU scandal, news stories in international papers like NYT, Washington Post, + a bunch of UK newspapers. Can't help but feel increasingly suspicious, though unsurprised. Are we here in Oz at the vanguard of the fight to defeat "Cap and Traitor" schemes?
Here's a brilliant Editorial in yesterday's (last night for us) Washington Times.
Our MSM are either asleep at the wheel, or, wilfully colluding, in my view, to keep all this eruption of truth from the mainstream Australian public… until the ETS is passed.
I'm not paranoid, it's just that everyone's out to get me (doffs tinfoil hat)
Sat 28 Nov 09 (11:28pm)
Good work Colin. Thank you fo rth elink. Very heartening. I'm glad to see the editor understood the gravity. A point of major importance that I think Tim and A Bolt missed is that hundreds if not thousands of scientists have been using this data. That's like half or more of the AGW research. It means that the whole of AGW research is highly flawed. I don't think anything of this magnitude has ever happened before. Every PhD student is judged on how they critique papers. And here we have proof solid that almost all the professors of AGW have failed to critique. Here we have proof that they don't know math 101, physics 101. basically they have failed competency tests for first year uni. That is how damning this is. It's not just about a few bad eggs. It's the whole shebang.
As bad as the Libs look today they have taken one for the country.
Now the peoples eyes are open to the scam that is AGW and this BS ETS tax on every thing.
Now I want to see an international investigation by an independant body made of of scientists from around the world. NO UN staff or UN sponsoured scientists.
If it comes out that the world is warming (we know it's not) then I will say ok to an ETS.
I don't think Krudd will get his way calling a double dissolution. May infact blow up in his face.
Sat 28 Nov 09 (08:33am)
Cap and Trade is dead.
Despite the press releases.
Does Penny know?
Sat 28 Nov 09 (08:47am)
Sat 28 Nov 09 (05:08pm)
Does Penny know?
She's always getting the Wong advice ...
I've always thought that the science has been based on this http://m.youtube.com/index?desktop_uri=/&#/watch?v=m1vkXxn65ec&client=mv-google
sorry couldn't do proper link on my iPhone
Sat 28 Nov 09 (08:56am)
Sat 28 Nov 09 (02:24pm)
Ok scratch that, this is the right link.
will make sense now.
The Anchoress has views
Nice, it's all Bush's fault, everything is so clear. Damn that Bush Satan, damn him to hell!
Sat 28 Nov 09 (10:11am)
Sat 28 Nov 09 (02:23pm)
MAttR, I want to be certain that you understand that "it's all Bush's fault," is not, I believe, a position of the Anchoress, rather she was being satirical.
A little something I made earlier today…
Sat 28 Nov 09 (10:46am)
Sat 28 Nov 09 (01:52pm)
Sat 28 Nov 09 (09:17pm)
Very good Dodd!!! I've now set it as my desktop for a week or two.
Re: The ETS Newspoll in The Australian
The ETS poll was from mid-September!
A LOT has changed since then. The ETS is no longer a meaningless feel-good gesture, it is a $1200 tax. Climategate has broken, YAD061 and the Yamal divergence problem has become more widley known, and all the hopes and myths of Copenhagen have evapourated as the sane nations of the world will not commit to the economic sucicide binding targets.
Mid-September was a LONG time ago. The Newspoll is no longer relevant. The debate has moved on. The mood of the electorate has changed.
The Australian buried the confession it was a mid-September poll in the 11th paragraph! Keep up the good fight and don't be cowed by Turnbull's latest lies!
Sat 28 Nov 09 (12:41pm)
I have to agree with Dodd of Kentucky. I think the tide has turned, and not only this AGW scam, but a whole lot of lefty enterprises are beginning the slow slide to irrelevance (they'll never make it all the way to oblivion, because the human race is nothing if not contrary). Let us hope the rising generation will discard all this nanny-state nonsense for a while and get back to the real business of living, drinking, making money, and sexual tomfoolery.
Sat 28 Nov 09 (12:56pm)
Sat 28 Nov 09 (02:45pm)
RebeccaH, if you are right, then we've all got lucky to have been hit by a depression when the socialists were in power.
However, if we do not retake academia, we will get this crap battle again.
A major goal for the intellectual right MUST BE to AT LEAST gain equality in academia.
Climaquiddick - pppfffttt......i blame gorbal warmening...and space aliens.
Although the dishonesty, perfidity and outright lies of the IPCC and the UEA CRU with their associated hacks, spivs, teat sucklers of Big Guvmint $$$ and rent-seekers may have a part to play.
I await perview revved litrachure from the alarmists.
Sat 28 Nov 09 (01:00pm)
True Believer Turnbull: NOW AN ADVICE DOG MEME!!!
Check out the link, create your own 'True Believer Turnbull', tweet and email your friends!
Lolz guaranteed!
Sat 28 Nov 09 (01:01pm)
Sat 28 Nov 09 (04:16pm)
Brilliant!! Different brand and calibre of cyber-ammunition to what I've been using so far
In a moment of reflection I must admit this:
I always knew that the global warming story was not credible, scientifically, and that the hype was overblown. I did, though, always hold the thought that the (very much fewer than hyped) climate scientists who peddled their art in support of this alarum were misguided and possibly tainted by working for government money; but in general being sincere.
Now I know how small a cabal of crimatologists it takes to pervert the scientific system (possibly a score, and another score of influential cheerleaders). I am also shocked (no, really - I'm not Claude Raines) at how depraved, conspirational and money grabbing these corruptologists had become. Also, I could not have believed how bad, no imcompetant, they were at writing code, even in support of their theses.
OK, moment of reflection passed. How about a word competition. Complete this phrase:
"Trust me, I'm a ...."
Thank goodness we habe been blessed by an anonymous Leakologist
Sat 28 Nov 09 (01:06pm)
Unless some major players come out and admit that these e-mails show that the fix was in,then nothing will happen,they will wait for ruckus to eventually fade away and go about the business of a ONE WORLD SOCIALIST GOVERNMENT.
Sat 28 Nov 09 (01:54pm)
Sun 29 Nov 09 (09:00pm)
Is it my imagination, or do we have A LOT MORE SHOUTERS than usual here of late?
Nice, it's all Bush's fault, everything is so clear. Damn that Bush Satan, damn him to hell!
MattR of Melbourne (Reply)
MattR: the Anchoress (Elizabeth Scalia - no relation to the Supreme Court Justice, although she has similiar political views) is a nice Catholic lady who has been one of Dubya's stoutest defenders over the last 7 or 8 years. She has frequently written about how leftists blame Bush for everything including stubbed toes and traffic tickets.
I am sure she is being sarcastic - unless she's been taken over by the same demon who invaded Charles Johnson's skull, in which case an exorcism is called for.
Sat 28 Nov 09 (01:58pm)
Their religion is dead.
Long live their new religion!
Sat 28 Nov 09 (02:02pm)
• Col. Douglas Mortimer: "You know, when you consider that 'We're Saving The Planet' is the biggest power/money grabbing scam since 'We're Saving Your Souls,' whoever leaked/released those e-mails and such is kind of like the modern scientific equivalent of Martin Luther. This person/persons may well have broken the backs of the Global Warming Priests who did everything in their power to make sure that the common man, and those who would oppose them, had no direct access to the Spoken Word of God."
Exactly. But I think I've seen that analogy already…
Somebody should nail these emails to the door of the IPCC.
Sat 21 Nov 09 (11:16pm)
Tim and his readers are once again ahead of the curve…
Sat 28 Nov 09 (02:06pm)
"HH: Is it fair to say, Mark Steyn,
that everything that the tobacco companies were ever accused of doing with data about cigarettes is now true about the CRU and its global warming data?"
Now there's a line of attack to rot a fascist Green's socks.
Sat 28 Nov 09 (02:11pm)
AGW as the Reichstag fire.....perfect.
"It was a massive, worldwide attempt at a coup d'etat, and the victims were going to include all the free and prosperous peoples of the world. Hitler had his Reichstag fire. Today's transnational left had its global warming fraud. The political goal was exactly the same: maximum power through maximum fear."....James Lewis
Sat 28 Nov 09 (02:42pm)
Andrew Bolt: "Of course, it cuts both ways. If the world resumes warming with a vengeance, and if the world's big emitters do indeed set real targets for cuts, then the sceptics will be forced by the evidence to give in."
No, it doesn't.
The whole argument began thus...the climate is changing, we may be going through a warming phase, but there is no evidence that it is man-made.
Thus if it begins "warming with a vengeance" we still have to establish a cause.
And we best not rely on the "science" next time unless it is wide open to argument from ALL scientists, not a self-selected few.
Interesting, that Bolt now does not now allow comments.
Sort of "this is it, the argument is settled, no need to comment, move on, move on."
Uhh, wasn't that one of the serious gripes about Hadley CRU et al??
Sat 28 Nov 09 (02:55pm)
Sat 28 Nov 09 (04:01pm)
The whole argument began thus...the climate is changing, we may be going through a warming phase, but there is no evidence that it is man-made.
Thus if it begins "warming with a vengeance" we still have to establish a cause.
The claim that the warming trend since the mid-19th century (the end of the Little Ice Age) and particularly the warming between the late 1970s and late 1990s was something "extraordinary" or "unprecedented" therefore can only be "man-made" was entirely based on what we now know is the very dodgy science of "dendroclimatology" - that tree rings were any kind of reliable temperature proxy - has completely fallen apart. Whether the global mean temperature goes up or down in the next 10 or 20 years cannot revive it.
Sat 28 Nov 09 (07:13pm)
Thus if it begins "warming with a vengeance" we still have to establish a cause.
Sounds like throwing a lifeline to the charlatans to reform and continue their work…
Sun 29 Nov 09 (11:40am)
Now hold on there a minute partner.
GISS HADCrut3 and NOAA temperature series have 90 to 95% overlap. That is to say they use the same data set collected from the same stations.
If one of them is called into question, they all are suspect…
We have to rely exclusively on the satellite data. But that was "corrected" about two years ago to bring it more in line with the surface station records.
We are in the strange situation that we don't know what the world temperature is.
We probably never did.
Sun 29 Nov 09 (01:52pm)
We have to rely exclusively on the satellite data. But that was "corrected" about two years ago to bring it more in line with the surface station records.
Corrected to what? To already-"corrected" surface temperature readings. They claim to have compensated for the "urban heat island effect", but how much, or how little, we'll never know, because all of the original "uncorrected" data is conveniently gone…
Commenting for this article is no longer available, try one of the articles below for more from the Tim Blair blog.
|Latest Articles
|Recently Popular
Latest Articles
View Entries by Date
Monthly Archives
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
Most Recent Comments
(Mon 30 Nov 09 at 06:10am)
(Sun 29 Nov 09 at 08:47am)
(Sun 29 Nov 09 at 08:01am)
(Sun 29 Nov 09 at 07:29am)
(Sun 29 Nov 09 at 06:19am)
(Sat 28 Nov 09 at 06:22pm)
(Sat 28 Nov 09 at 05:00pm)
Related Links
Email a friend
To email this article to a friend, fill in the form below
close x
Daily Telegraph Blogs – Talk to your journalists
From around the News Blog Network


text:
Waller's skills as panegyrist, addressing poems in praise, successively, of Charles I, Cromwell, Charles II, and James II, have frequently led later writers to see him as a Vicar of Bray. Samuel Johnson, for example, writes disapprovingly:Waller, by Nature for the Bayes design'd,
With force, and fire, and fancy unconfin'd,
In Panigericks does Excell Mankind:
He best can turne, enforce, and soften things,
To praise great Conqu'rours, or to flatter Kings.
Neither Cromwell nor Charles could value his testimony as the effect of conviction, or receive his praises as effusions of reverence; they could consider them but as the labour of invention and the tribute of dependence … He that has flattery ready for all whom the vicissitudes of the world happen to exalt must be scorned as a prostituted mind that may retain the glitter of wit, but has lost the dignity of virtue. (Johnson, Poets, 1.271)Yet the view of Waller's poems, in the 1630s and later, as merely offering servile support to the king in verse, underestimates the complexity of the political stance in a number of the poems, tuned precisely to a particular audience, context, and persuasive purpose.
To the King on his Navy (1636) again turns its elegant praise to a concrete political end, arguing for a maintenance of a strong navy used for pacific aims rather than being involved in the wars of continental Europe. In responding to the pressure of opposing views of royal power and its uses, these poems rely much more on comely grace than on the cut and thrust of polemic, presenting a bloodlesse conquest as the best of all.grand design
To frame no new Church but the old refine.
for let the Commonwealth flourish and then, he that hath the Soveraignty can never want or doe amisse so as he governes not according to the interest of others, but goe the shortest and safest wayes to his owne and the Common good. (ibid., 3, 4)In the Short Parliament and the early stages of the Long Parliament, Waller was sufficiently trusted by his colleagues to manage the impeachment of the ship-money judge Sir Francis Crawley, and the evil counsellors he inveighs against in speeches in 1640 and 1641 include clerical and lay exponents of absolutism.
I look upon Episcopacy, as a Counter-scar[p], or outwork, which if it be taken by this assault of the people, and withall this Mysterie once revealed, that we must deny them nothing when they aske it thus in troopes, we may in the next place, have as hard a taske to defend our propriety, as we have lately had to recover it from the prerogative. (Speech Concerning Episcopacie, 45)In the months that followed, Waller and his allies among the constitutional moderates were more and more forced to choose sides, as partisan bitterness increased in the House of Commons, and by October 1641 Waller was listed in a letter by Sir Edward Nicholas to the king as prominent among the Champions in maynten'nce of your Prerogative (Poems, ed. Thorn-Drury, 1.xxxvi). As late as July 1642, according to D'Ewes, Waller was urging an accommodation to be had with his majesty and that a civil war might be avoided, though the fiery spirits in the house would not hear of it (V. Snow and A. Steele Young, eds., Private Journals of the Long Parliament, 1992, 264).
It came from Mr. Waller under this notion, that if we could make a moderate party here in London, to stand betwixt the gappe, and in the gappe, to unite the King and the Parliament, it would be a very acceptable work, for now the three Kingdomes lay a bleeding, and unlesse that were done there was no hopes to unite them. (Challenor, 4)But the peace plan quickly turned to war: in its final form, the plot apparently called for an armed rising and seizure of the key points of the City in order to let the king's army in. When Pym, in a highly dramatic speech, revealed the alleged plot to the House of Commons, he placed particular emphasis on the contrast between the pretences of peace and the actuality of blood and violencesuch a combustion, as to have your swords imbrued in one anothers bloud (Discovery, sigs. A2, A3). Even if Waller cannot be held fully responsible for the plot's final formin his speech before the House of Commons pleading for his life, he claimed to have utterly rejected … the Propositions of letting in part of the Kings Army (Mr Waller's Speech, 3)the readiness with which the plot and one of its chief actors were diverted from their course is an index to their fundamental weakness.
In elegant quatrains, the poem deploys a series of classical and biblical analogies to present England as the seat of Empire and Cromwell as a new Augustus:Your drooping Countrey torn with Civill Hate,
Restor'd by you, is made a Glorious State.
The Panegyrick thus concerns itself with the most important political issue of the 1650s, the settlement of the state, the transformation of the rule of the sword into the rule of law.As the vext world to finde repose at last
It self into Augustus Arms did cast;
So England now, doth with like toyle opprest
Her weary head upon your bosome rest.
Yet the great Acts singled out for praise, here as in Waller's poems addressed to Cromwell, are open to conflicting interpretations. The longest and most ambitious of his heroic panegyrics, Instructions to a painter, for the drawing of the posture and progress of his majesties forces at sea, under the command of his highness-royal; together with the battel and victory obtained over the Dutch (1666), turns the inconclusive battle of Lowestoft into a second Actium and the duke of York into a peerless hero of romance. As earlier with the Panegyrick to my Lord Protector, Waller's poem gave rise to a whole series of parodies and refutations, portraying similar events in unflattering terms, as exemplifying cowardice and greed. Marvell's Last Instructions to a Painter, written a year later, is representative of these anti-court satires in the way it makes the events it describes indicative not of England's glory but of England's shame.Well sounding verses are the Charm we use,
Heroick thoughts, and vertue to infuse.
He died at his house in St James's Street, London, on 21 October 1687, and was buried five days later in Beaconsfield.The Soul's dark Cottage, batter'd and decay'd
Lets in new Light thro' chinks that time has made.
Waller's love poems tend to be relatively formal, decorous, and impersonal, as compared to the colloquial tone and jaunty cynicism of his fellow Caroline poet Suckling. His advice in one poem (To Flavia) is to dissemble well: unobtrusive wit, poise, and attention to nuance characterize such lyrics as Go Lovely Rose, To a Lady in Retirement, and On a Girdle. His poetical courtship of Lady Dorothy Sidney, daughter of the earl of Leicester, as Sacharissa is tactful rather than passionate, and the same graceful and elegant praise can be found in a congratulatory letter on her marriage in 1639 (Poems, ed. Thorn-Drury, 1.xxviiixxx) as in the poems for which she provided the occasion. As The Story of Phoebus and Daphne Apply'd wittily suggests, even if the poet loves in vain, he is more than amply compensated by the applause of his coterie audience: He catcht at love, and fill'd his arm with bayes.Our lines reform'd, and not compos'd in haste,
Polisht like Marble, would like Marble last.(Prologue to The Maid's Tragedy Altered, 1690)
The poems of Edmund Waller, ed. G. Thorn-Drury, 2 vols. (1905) · P. Beal and others, Index of English literary manuscripts, ed. P. J. Croft and others, [4 vols. in 11 pts] (1980), vol. 2, pt 2 · Life, E. Waller, Poems &c. written upon several occasions and to several persons, 8th edn (1711) · The life of Edward, earl of Clarendon … written by himself, 2 vols. (1857) · Clarendon, Hist. rebellion · Aubrey's Brief lives, ed. O. L. Dick (1949); repr. (1962) · S. Johnson, Lives of the English poets, ed. G. B. Hill [new edn], 3 vols. (1905) · Bishop Burnet's History · A. Grey, ed., Debates of the House of Commons, from the year 1667 to the year 1694, 10 vols. (1763) · W. Chernaik, The poetry of limitation: a study of Edmund Waller (1968) · D. Norbrook, Writing the English republic: poetry, rhetoric and politics, 16271660 (1999) · private information (2004) [John Safford] · E. Waller, Poems (1645) · The second part of Mr Waller's poems (1690) · Fifth report, HMC, 4 (1876) · Sixth report, HMC, 5 (18778) · HoP, Commons, 166090 · P. Hardacre, A letter from Edmund Waller to Thomas Hobbes, Huntington Library Quarterly, 11 (19478), 4313 · P. Wikelund, Edmund Waller's fitt of versifying, Philological Quarterly, 49 (1970), 6891 · P. R. Wikelund, Thus I passe my time in this place; an unpublished letter of Thomas Hobbes, English Language Notes, 6 (19689), 2638 · M. Stocker and T. Raylor, A new Marvell manuscript: Cromwellian patronage and politics, English Literary Renaissance, 20 (1990), 10662 · The works of Edmund Waller, esq., in verse and prose: published by Mr Fenton (1729) · Mr Waller [E. Waller], A worthy speech (1641) [Thomason tract E 198(11)] · A speech made by Master Waller … concerning episcopacie (1641) [Thomason tract E 198(30)] · Mr Wallers speech … being brought to the barre (1643) [Thomason tract E 60(11)] · Mr Challenor: his confession and speech made upon the ladder before his execution (1643) [Thomason tract E 59(7)] · A discovery of the great plot for the utter ruine of the city of London … as it was at large made known by John Pym esq. on Thursday, being the eighth of June, 1643 (1643) [Thomason tract E 105(21)] · S. D'Ewes, parliamentary diary, BL, Harley MS 165 · Henry Lawes, settings of poems by Waller, BL, Add. MS 53723 · letters from Waller to Jane Middleton, BL, Egerton MS 922 · T. Corns, The poetry of the Caroline court, British Academy Warton Lecture on English Poetry, 1997 · G. Hammond, Fleeting things: English poets and poems, 16161660 (1990) · Venn, Alum. Cant. · T. Raylor, Moseley, Walkley, and the 1645 editions of Waller, The Library, 7th ser., 2 (2001), 23665
Morgan L., Latin notebook · priv. coll., family papers | BL, corresp. with John Evelyn, JEA 16 · BL, Sir Simonds D'Ewes, parliamentary diary, Harley MS 165 · BL, Henry Lawes MS, Add. MS 53723 · BL, letters to Jane Middleton, Egerton MS 922
C. Johnson, oils, 1629 (aged twenty-three), priv. coll. · P. Oliver, miniature, c.1635, Welbeck Abbey, Nottinghamshire · A. Van Dyck, oils, c.1638 (possibly of Waller); photograph, NPG · attrib. I. Fuller, oils, c.16401650, Rousham House, Oxfordshire · P. Lely, oils, c.1665, priv. coll.; on loan to Plymouth Art Gallery, Clarendon collection · J. Riley, oils, 1682, priv. coll.; copies at NPG, Hall Barn, Buckinghamshire · P. Vanderbank, engraving, c.1682 (aged seventy-six; after J. Riley, 1682), BM, NPG; repro. in E. Waller, Poems (1682) · P. Vanderbank, line engraving, c.1682 (aged twenty-three; after portrait by C. Johnson, 1629), BM, NPG · G. Kneller, oils, 1684, priv. coll. · D. Loggan, graphite on vellum drawing, 1685, NPG [see illus.] · G. White, graphite on vellum drawing, c.1710, BM · G. Vertue, line engraving, 1727 (after G. Kneller), BM, NPG · M. Rysbrack, marble bust, 1728, Hall Barn, Buckinghamshire · W. Bromley, line engraving (aged twenty-three; after C. Johnson), BM, NPG; repro. in B. W. Procter, Effiges poeticae (1824) · oils (after J. Riley, c.1685), NPG
£40,000: estimate by John Safford, based on will and various financial transactions involving Waller
|© Oxford University Press 2004–16
All rights reserved: see legal notice
Warren Chernaik, Waller, Edmund (16061687), Oxford Dictionary of National Biography, Oxford University Press, 2004 [http://www.oxforddnb.com/view/article/28556, accessed ]
Edmund Waller (16061687):
|Site credits

subset: commoncrawl


text:
See Jennifer Aniston With a Baby Bump!
It's the baby bump the whole world has been waiting for: Jennifer Aniston's!
Alas, the 43-year-old "Wanderlust" star -- set to wed beau Justin Theroux -- isn't with child just yet. But Aniston straps on a convincing pregnant belly in a hilarious new viral video for smartwater.
PHOTOS: Jen shows off bikini bod on vacation with fiance Justin Theroux
With cameos by Ryan Seacrest and Jimmy Kimmel, the video reveals so-called "security tapes" starring the beloved star (and smartwater spokeswoman) -- who crashes a sports car, fills her swimming pool with smart water and sports a bowling-ball sized baby bump.
Another pseudo-shocker caught by security cameras? Aniston's world-famous hair is a wig!
See a "pregnant" Jennifer Aniston reveal her "real" hair and much more in this clip!
This article originally appeared on Usmagazine.com: See Jennifer Aniston With a Baby Bump!
Jennifer Aniston Proposal Details: The Ring, the Scene, the Future
We Recommend
- Aug. 24, 2016 Anna Duggar says she and Josh Duggar are in a good place
- Aug. 23, 2016 Jessa Duggar Seewald is pregnant with her second child


text:
4202 Commercial Avenue
Bullseye specializes in the sale of new Brunswick pool tables and all billiard related accessories. Bullseye also carries Tornado foosball tables, Brunswick Air Hockey, Champion shuffleboards, dart boards, poker tables, ping pong, new & used video games & pinball games along with all the accessories needed to play any game. Give us a call or stop by to find out how we can help you with all your rec room needs. We sell fun!
Share your experience!


text:
Shared Data Plans Arrive Next Year Says Verizon CEO
On Wednesday Verizon Communications CEO Lowell McAdam said that he expects to see some form of shared data plans being offered on Verizon Wireless by sometime next year. This is definitely good news to Verizon customers who typically shell out $30 per month for a data plan on each phone. Shared data would essentially allow family members to use one pool of data for one monthly price, mimicking Verizon's current shared minutes plans.
"I think in 2012 we'll see it," McAdam said. "We've been working on this for a couple of years, frankly."
He also pointed out that some customers have four or five devices on one individual plan, and that neither the customer nor Verizon wants to keep up with individual data accounts, especially those who have switched over to 2 GB, 5 GB and 10 GB monthly plans. "It drives them crazy and it would raise our costs a lot," he added. "Getting to one bill and having account-level pricing is the right way to go."
In addition to shared data, he also talked about the possible decline in revenue stemming from a drop in SMS use. Now that consumers are relying heavily on third-party voice and data-messaging applications, they're doing less texting and picture sending. It hasn't become a major concern at this point, but he noted that a decline "has already started to happen in some European countries."
"We haven't seen as much of it on our side, frankly, but I think it is going to come," McAdam said. "It's kind of like long distance and the other stuff you saw fade away."
He also predicts a continual shift away from feature phones and into smartphones. High-end devices with prices higher than the $199 entry-level iPhone 4S price point will likely remain in Verizon's horizon given that they're actually selling quite well..
"To me, the issue is 'are we going to have the applications that justify it?' And if we do, then I think we will be fine," he said.
getrealThe FCC should step in here and put a stop to the thieving these telcos do on data plans.
A user with a 2GB plan could use 400MB of data and have 1.6GB left for usage, but if another user on the family plan also has 2GB and uses 2.1GB, you get charged an overage, despite the cumulative family plan paying for 4GB, and your cumulative usage being 2.5GB. So you pay for 4, use 2.5, and get charged an overage...seems like it should be illegal.
This happens to me every month, by the way.
win7guruI'm all for this change as I have a family plan. I mainly use WiFi on my phone to get my data and don't really use much. It will be really nice for those people that get good discounts on their plans too. Verizon you may keep us sheeple satisfied for awhile longer if you go through with this.
beoza@getreal I think I see where you're confused about the pricing. You're paying for data plans on each phone they are not added together but counted as separate data plans, therefore if one person goes over their data limit you do get an overage. What this Verizon guy is talking about is exactly what you think it should be, one total amount of data shared between all devices on your acct. You'd be paying for 4GB across all phones on your plan and not have separate data plans for each phone. Which is a good thing. This is at least what I got out of the article, you'r view point may differ from mine.
I'm not confused at all. I am in favor of shared data plans. I know why I get charged, I just find it dumb that I can't have a single 4GB plan that covers both of my lines; they essentially just steal an extra ten bucks a month from me this way, but I didn't see this as being an issue when I signed the contract, so I can't really complain.
When I'm out of contract in a few months, I can review my options.
cknobmanCant wait!!!!!! Next year instead of $30 for 2GB it will be $50 for 3GB because its "shared" LOL
Thieving fracking basterds!!!!
Im gonna ride the Sprint "unlimited" wave until its gone, I can live with my WiMax unlimited for now. Sure its not 15-30Mbps but Im fine with 3-10 for now especially when I gulp down 3-5Gb per week!!!!!
maddadI pay $15 for 200mb a month, I probably only use about 50mb month. I primarily use wireless to connect if I need to download something. Also to Verizion, ATT, Sprint, Tmobile, "txt" is "data" , Pictures are "data" there should not be a separate charge for txting as it should be covered under our "data" plans. FCC please take note!!!
oxxfatelostxxoQuote:As long as I can share my grandfathered unlimited plan, then great!
Your supposed grandfathered unlimited plan is basically capped at 5gb a month, at which point they throttle your connection so much that internet usage is basically like dial up.
Next time read the fine print. =)
JermsMalibuIt would be nice to share my unlimited data....if it doesn't cost an arm and a leg.
And actually, they don't throttle it right when you go over 5gb.....however, their service at my house IS essentially dial-up (varies between -95 dbm to -120 dbm, regularly at -111dbm, so I get anywhere from 0kbps to 130kbps). And I only live ~1 mile from a tower. And at my work, I get a good signal (regularly -66dbm) and I still only get 600-900kbps. So I call BS on their "best coverage everywhere" marketing. And their only solution is for me to buy a cell repeater from them or a new phone with dual attenas. I live in a normal city, I shouldn't have to pay for a work-around to fix their network for them.


text:
The use of chemical weapons in conflict represents a breach of international law as well as a grave violation of human rights. Investigating allegations of their use often is difficult. A basic tool is the survey interview. Experience has shown that a rigorous epidemiologic approach should be taken. A primary emphasis should be designing the study so that consistency of responses can be analyzed to judge the validity of the testimony. Only when the testimony can withstand this scrutiny is it possible to surmise the possible identity of agents employed. Securing samples of the putative agent is of obvious importance. Two recent investigations are discussed herein, one conducted by US Army medical researchers on allegations of chemical weapons use against the Hmong in Laos and another mounted by us on allegations of poison-gas attack against the Iraqi Kurds.
Some tools below are only available to our subscribers or users with an online account.
Download citation file:
Customize your page view by dragging & repositioning the boxes below.
More Listings atJAMACareerCenter.com >
Enter your username and email address. We'll send you a link to reset your password.
Enter your username and email address. We'll send instructions on how to reset your password to the email address we have on record.
Need assistance?
Athens and Shibboleth are access management services that provide single sign-on to protected resources. They replace the multiple user names and passwords necessary to access subscription-based content with a single user name and password that can be entered once per session. It operates independently of a user's location or IP address. If your institution uses Athens or Shibboleth authentication, please contact your site administrator to receive your user name and password.


text:
Bob Blaskiewicz's article "Engineering Truth" was published in the magazine, Skeptical Inquirer, in September 2011. An expanded version, "You Can't Handle the Truthiness: A Night Out with the 9/11 Truth Community" appears on their website. Also read Bob's new regular column — "The Conspiracy Guy" — for Skeptical Inquirer's website.
Shed some light on conspiracies!
Bookmark the permalink.


text:
Writers@Grinnell: Richard Russo
Pulitzer-Prize winning novelist Richard Russo, the upcoming author in Writers@Grinnell, will be on campus for two events on Thursday, November 12:
- Reading at 8 p.m. in Rosenfield Center, Room 101
- Roundtable at 4:15 p.m. in Rosenfield Center, Room 209
Russo received the Pulitzer Prize in Fiction in 2002 for his novel "Empire Falls," which was later made into an HBO mini-series starring Philip Seymour Hoffman. Russo co-authored the script for the miniseries and was nominated for the 2005 Emmy for Outstanding Writing for a Miniseries.
Russo also co-authored the screen adaption of his acclaimed novel, "Nobody's Fool," starring Paul Newman, with Academy Award-winning screenplay writer Robert Benton. Russo has written several other acclaimed books and screenplays, including "Mohawk," "Straight Man" and his memoir, "Elsewhere."
Russo has received many honors and fellowships throughout his career, including the 1990 Guggenheim Fellowship for Creative Arts and 2002 Ambassador Book Award for Fiction. A gifted teacher, Russo is retired from Colby College and the Warren Wilson Master of Fine Arts Program for Writers. He lives with his wife in coastal Maine.
Grinnell welcomes and encourages the participation of people with disabilities. Accommodation requests may be made to the event sponsor or Conference Operations and Events.


text:
Orlando Parks & Lakes: Baby Sand Pipe's Mermai LbNA # 32654 (ARCHIVED)
|Placed Date
|Jul 6 2007
|Orlando, FL
Downtown Orlando has many parks and lakes sprinkled throughout. Lake Cherokee Park is a lovely little patch of green in the Delaney Park neighborhood, just south of downtown proper.
Visit Lake Cherokee Park where Summerlin Ave meets Lake Cherokee Drive. Facing the park from the eastern side, find a small area enclosed by a low brick wall. Two large trees sit on the west side of this clearing. You'll have to pick the right one, and then root around to find this letterbox. As always, please hide it better than you found it.
***This special letterbox has a thermometer inside. When you leave your mark, also note the temperature on the day of your visit.***


text:
I recently went through the process of setting up a new development environment on Windows which included installing Git for Windows. At one point in the course of tweaking my environment, I found myself trying to determine which config file a particular setting originated. The command 'git config –list' showed the setting, but 'git config –list –system', 'git config –list –global', and 'git config –list –local' all failed to reflect the setting. Looking at the options for config, I discovered you can add a '–show-origin' which led to a discovery: Git for Windows has an additional location from which it derives your configuration.
It turns out, since the last time I installed git on Windows, a change was made for the purposes of sharing git configuration across different git projects (namely, libgit2 and Git for Windows) where a Windows-specific location is now used as the lowest setting precedence (i.e. the default settings). This is the file: C:\ProgramData\Git\config. It doesn't appear git added a way to list or edit this file as a well-known location (e.g. 'git config –list windows'), so it's not particularly discoverable aside from knowing about the '–show-origin' switch.
So the order in which Git for Windows sources configuration information is as follows:
- C:\ProgramData\Git\config
- system config (e.g. C:\Program Files\Git\mingw64\etc\gitconfig)
- global config (%HOMEPATH%\.gitconfig
- local config (repository-specific .git/config)
Perhaps this article might help the next soul who finds themselves trying to figure out from where some seemingly magical git setting is originating.
I've always had an interest in application build processes. From the start of my career, I've generally been in the position of establishing the solution architecture for the projects I've participated in and this has usually involved establishing a baseline build process.
My career began as a Unix C developer while still in college where much of my responsibilities required writing tools in both C and various Unix shell scripting languages which were deployed to other workstations throughout the country. From there, I moved on to Unix C-CGI Web development and worked a number of years with Make files. With the advent of Java, I begin using tools like Ant and Maven for several more years before switching to the .Net platform where I used open source build tools like NAnt until Microsoft introduced MSBuild with its 2.0 release. Upon moving to the Austin, TX area, I was greatly influenced by what was the early seat of the Alt.Net movement. It was there where I abandoned what in hindsight has always been a ridiculous idea … trying to script a build using XML. For the next 4-5 years, I used Rake to define all of my builds. Starting last year, I began using Gulp and associated tooling on the Node platform for authoring .Net builds.
Throughout this journey of working with various build technologies, I've formed a few opinions along the way. One of these opinions is that the Build process shouldn't be coupled to the Continuous Integration process.
A project should have a build process which exists and can be executed independent of the particular continuous integration tool one chooses. This allows builds to be created and maintained on the developer's local machine. The particular build steps involved in building a given application are inherently part of its ontology. What compilers and preprocessors need to be used, how dependencies are obtained and published, when and how configuration values are supplied for different environments, how and where automated test suites are run, how the application distribution is created … all of these are concerns whose definition and orchestration are particular to a given project. Such concerns should be encapsulated in a build script which lives with the rest of the application source, not as discrete build steps defined within your CI tool.
Ideally, builds should never break, but when they do it's important to resolve the issue as quickly as possible. Not being able to run a build locally means potentially having to repeatedly introduce changes until the build is fixed. This tends to pollute the source code commit history with comments like: "Fixing the build", "Fixing the build for realz this time", and "Please let this be it … I'm ready to go home". Of course, there are times when a build can break because of environmental issues that may not be mirrored locally (e.g. lack of disk space, network related issues, 3rd-party software dependencies, etc.), but encapsulating as much of your build as possible goes a long way to keeping builds running along smoothly. Anyone on your team should be able to clone/check-out the project, issue a single command from the command line (e.g. gulp, rake, psake, etc.) and watch the full build process execute including any pre-processing steps, compilation, distribution packaging and even deployment to a target environment.
Aside from being able to run a build locally, decoupling the build from the CI process allows the technologies used by each to vary independently. Switching from one CI tool to another should ideally just require installing the software, pointing it to your source control, defining the single step to issue the build, and defining the triggers that initiate the process.
The creation of a project distribution and the scheduling mechanism for how often this happens are separate concerns. Just because a CI tool allows you to script out your build steps doesn't mean you should.
Earlier this year I joined a development team which chose Entity Framework for the persistence needs of a new greenfield project. While I've worked on a few projects which used Entity Framework here and there over the years, the bulk of my experience has been with NHibernate and, more recently, Dapper.Net. As a result, there hasn't been all that much occasion for me to explore it in any level of depth until this year.
One area I recently took some time to research is how the Unit of Work pattern is best implemented within the context of using Entity Framework. While the topic is still relatively fresh on my mind, I thought I'd use this as an opportunity to create a catalog of various approaches I've encountered and include some thoughts about each approach.
Unit of Work
To start, it may be helpful to give a basic definition of the Unit of Work pattern. A Unit of Work can be defined as a collection of operations that succeed or fail as a single unit. Given a series of operations which need to be executed in response to some interaction with an application, it's often necessary to ensure that none of the operations cause side-effects if any one of them fails. This is accomplished by having participating operations respond to either a commit or rollback message indicating whether the operation performed should be completed or reverted.
A Unit of Work can consist of different types of operations such as Web Service calls, Database operations, or even in-memory operations, however, the focus of this article will be on approaches to facilitating the Unit of Work pattern with Entity Framework.
With that out of the way, let's take a look at various approaches to facilitating the Unit of Work pattern with Entity Framework.
Implicit Transactions
The first approach to achieving a Unit of Work around a series of Entity Framework operations is to simply create an instance of a DbContext class, make changes to one or more DbSet
Here's an example:
public Customer CreateCustomer(CreateCustomerRequest request) { Customer customer = null; using (var context = new MyStoreContext()) { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; context.Customers.Add(customer); context.SaveChanges(); return customer; } }
The benefit of this approach is that a transaction is created only when necessary and is kept alive only for the duration of the SaveChanges() call. Some drawbacks to this approach, however, are that it leads to opaque dependencies and adds a bit of repetitive infrastructure code to each of your applications services.
If you prefer to work directly with Entity Framework then this approach may be fine for simple needs.
Another approach is to use the System.Transactions.TransactionScope class provided by the .Net framework. When any of the Entity Framework operations are used which cause a connection to be opened (e.g. SaveChanges()), the connection will enlist in the ambient transaction defined by the TransactionScope class and close the transaction once the TransactionScope is successfully completed. Here's an example of this approach:
public Customer CreateCustomer(CreateCustomerRequest request) { Customer customer = null; using (var transaction = new TransactionScope()) { using (var context = new MyStoreContext()) { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; context.Customers.Add(customer); context.SaveChanges(); transaction.Complete(); } return customer; } }
In general, I find using TransactionScope to be a good general-purpose solution for defining a Unit of Work around Entity Framework operations as it works with ADO.Net, all versions of Entity Framework, and other ORMs which provides the ability to use multiple libraries if needed. Additionally, it provides a foundation for building a more comprehensive Unit of Work pattern which would allow other types of operations to enlist in the Unit of Work.
Caution should be exercised when using TransactionScope, however, as certain operations can implicitly escalate the transaction to a distributed transaction causing undesired overhead. For those choosing solutions involving TransactionScope, I would recommend educating yourself on how and when transactions are escalated.
While I find using the TransactionScope class to be a good general-purpose solution, using it directly does couple your services to a specific strategy and adds a bit of noise to your code. While it's a viable choice, I would recommend inverting the concerns of managing the Unit of Work boundary as shown in approaches we'll look at later.
ADO.Net Transactions
This approach involves creating an instance of DbTransaction and instructing the participating DbContext instance to use the existing transaction:
public Customer CreateCustomer(CreateCustomerRequest request) { Customer customer = null; var connectionString = ConfigurationManager.ConnectionStrings["MyStoreContext"].ConnectionString; using (var connection = new SqlConnection(connectionString)) { connection.Open(); using (var transaction = connection.BeginTransaction()) { using (var context = new MyStoreContext(connection)) { context.Database.UseTransaction(transaction); try { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; context.Customers.Add(customer); context.SaveChanges(); } catch (Exception e) { transaction.Rollback(); throw; } } transaction.Commit(); return customer; } }
As can be seen from the example, this approach adds quite a bit of infrastructure noise to your code. While not something I'd recommend standardizing upon, this approach provides another avenue for sharing transactions between Entity Framework and straight ADO.Net code which might prove useful in certain situations. In general, I wouldn't recommend such an approach.
Entity Framework Transactions
The relative new-comer to the mix is the new transaction API introduced with Entity Framework 6. Here's a basic example of it's use:
public Customer CreateCustomer(CreateCustomerRequest request) { Customer customer = null; using (var context = new MyStoreContext()) { using (var transaction = context.Database.BeginTransaction()) { try { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; context.Customers.Add(customer); context.SaveChanges(); transaction.Commit(); } catch (Exception e) { transaction.Rollback(); throw; } } } return customer; }
This is the approach recommended by Microsoft for achieving transactions with Entity Framework going forward. If you're deploying applications with Entity Framework 6 and beyond, this will be your safest choice for Unit of Work implementations which only require database operation participation. Similar to a couple of the previous approaches we've already considered, the drawbacks of using this directly are that it creates opaque dependencies and adds repetitive infrastructure code to all of your application services. This is also a viable option, but I would recommend coupling this with other approaches we'll look at later to improve the readability and maintainability of your application services.
Unit of Work Repository Manager
The first approach I encountered when researching how others were facilitating the Unit of Work pattern with Entity Framework was a strategy set forth by Microsoft's guidance on the topic here. This strategy involves creating a UnitOfWork class which encapsulates an instance of the DbContext and exposes each repository as a property. Clients of repositories take a dependency upon an instance of UnitOfWork and access each repository as needed through properties on the UnitOfWork instance. The UnitOfWork type exposes a SaveChanges() method to be used when all the changes made through the repositories are to be persisted to the database. Here is an example of this approach:
public interface IUnitOfWork { ICustomerRepository CustomerRepository { get; } IOrderRepository OrderRepository { get; } void Save(); } public class UnitOfWork : IDisposable, IUnitOfWork { readonly MyContext _context = new MyContext(); ICustomerRepository _customerRepository; IOrderRepository _orderRepository; public ICustomerRepository CustomerRepository { get { return _customerRepository ?? (_customerRepository = new CustomerRepository(_context)); } } public IOrderRepository OrderRepository { get { return _orderRepository ?? (_orderRepository = new OrderRepository(_context)); } } public void Dispose() { if (_context != null) { _context.Dispose(); } } public void Save() { _context.SaveChanges(); } } public class CustomerService : ICustomerService { readonly IUnitOfWork _unitOfWork; public CustomerService(IUnitOfWork unitOfWork) { _unitOfWork = unitOfWork; } public void CreateCustomer(CreateCustomerRequest request) { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; _unitOfWork.CustomerRepository.Add(customer); _unitOfWork.Save(); } }
It isn't hard to imagine how this approach was conceived given it closely mirrors the typical implementation of the DbContext instance you find in Entity Framework guidance where public instances of DbSet
First, this approach leads to opaque dependencies. Due to the fact that classes interact with repositories through the UnitOfWork instance, the client interface doesn't clearly express the inherent business-level collaborators it depends upon (i.e. any aggregate root collections).
Second, this violates the Open/Closed Principle. To add new aggregate roots to the system requires modifying the UnitOfWork each time.
Third, this violates the Single Responsibility Principle. The single responsibility of a Unit of Work implementation should be to encapsulate the behavior necessary to commit or rollback an set of operations atomically. The instantiation and management of repositories or any other component which may wish to enlist in a unit of work is a separate concern.
Lastly, this results in a nominal abstraction which is semantically coupled with Entity Framework. The example code for this approach sets forth an interface to the UnitOfWork implementation which isn't the approach used in the aforementioned Microsoft article. Whether you take a dependency upon the interface or the implementation directly, however, the presumption of such an abstraction is to decouple the application from using Entity Framework directly. While such an abstraction might provide some benefits, it reflects Entity Framework usage semantics and as such doesn't really decouple you from the particular persistence technology you're using. While you could use this approach with another ORM (e.g. NHibernate), this approach is more of a reflection of Entity Framework operations (e.g. it's flushing model) and usage patterns. As such, you probably wouldn't arrive at this same abstraction were you to have started by defining the abstraction in terms of the behavior required by your application prior to choosing a specific ORM (i.e. following The Dependency Inversion Principle). You might even find yourself violating the Liskof Substitution Principle if you actually attempted to provide an alternate ORM implementation. Given these issues, I would advise people to avoid this approach.
Injected Unit of Work and Repositories
For those inclined to make all dependencies transparent while maintaining an abstraction from Entity Framework, the next strategy may seem the natural next step. This strategy involves creating an abstraction around the call to DbContext.SaveChanges() and requires sharing a single instance of DbContext among all the components whose operations need to participate within the underlying SaveChanges() call as a single transaction.
Here is an example:
public class CustomerService : ICustomerService { readonly IUnitOfWork _unitOfWork; readonly ICustomerRepository _customerRepository; public CustomerService(IUnitOfWork unitOfWork, ICustomerRepository customerRepository) { _unitOfWork = unitOfWork; _customerRepository = customerRepository; } public void CreateCustomer(CreateCustomerRequest request) { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; _customerRepository.Add(customer); _unitOfWork.Save(); } }
While this approach improves upon the opaque design of the Repository Manager, there are several issues I find with this approach as well.
Similar to the first example, this UnitOfWork implementation is still semantically coupled to how Entity Framework is urging you to think about things. Entity Framework wants you to call SaveChanges() whenever you're ready to flush any INSERT, UPDATE, or DELETE operations you've issued against the database and this abstraction basically surfaces this behavior. If you were to use an alternate framework that supported a different flushing model (e.g. NHibernate), you likely wouldn't end up with the same abstraction.
Moreover, this approach has no definitive Unit of Work boundary. With this approach, you aren't defining a logical Unit of Work, but are merely injecting a UnitOfWork you can participate within. When you invoke the underlying DBContext.SaveChanges() method, it isn't explicit what work will be committed.
While this approach corrects a few design issues I find with the Repository Manager, overall I like this approach even less. At least with the Repository Manager approach you have a defined Unit of Work boundary which is kind of the whole point. My recommendation would be to avoid this approach as well.
Repository SaveChanges Method
The next strategy is basically a variation on the previous one. Rather than injecting a separate type whose sole purpose is to provide an indirect way to call the SaveChanges() method, some merely expose this through the Repository:
public class CustomerService : ICustomerService { readonly ICustomerRepository _customerRepository; public CustomerService(ICustomerRepository customerRepository) { _customerRepository = customerRepository; } public void CreateCustomer(CreateCustomerRequest request) { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; _customerRepository.Add(customer); _customerRepository.SaveChanges(); } }
This approach shares many of the same issues with the previous one. While it reduces a bit of infrastructure noise, it's still semantically coupled to Entity Framework's approach and still lacks a defined Unit of Work boundary. Additionally, it lacks clarity as to what happens when you call the SaveChanges() method. Given the Repository pattern is intended to be a virtual collection of all the entities within your system of a given type, one might suppose a method named "SaveChanges" means that you are somehow persisting any changes made to the particular entities represented by the repository (setting aside the fact that doing so is really a subversion of the pattern's purpose). On the contrary, it really means "save all the changes made to any entities tracked by the underlying DbContext". I would also recommend avoiding this approach.
Unit of Work Per Request
A pattern I'm a bit embarrassed to admit has been characteristic of many projects I've worked on in the past (though not with EF) is to create a Unit of Work implementation which is scoped to a Web Application's Request lifetime. Using this approach, whatever method is used to facilitate a Unit of Work is configured with a DI container using a Per-HttpRequest lifetime scope and the Unit of Work boundary is opened by the first component being injected by the UnitOfWork and committed/rolled-back when the HttpRequest is disposed by the container.
There are a few different manifestations of this approach depending upon the particular framework and strategy you're using, but here's a pseudo-code example of how configuring this might look for Entity Framework with the Autofac DI container:
() .As () .InstancePerRequest() .OnActivating(x => { // start a transaction }) .OnRelease(context => { try { // commit or rollback the transaction } catch (Exception e) { // log the exception throw; } }); public class SomeService : ISomeService { public void DoSomething() { // do some work } }
While this approach eliminates the need for your services to be concerned with the Unit of Work infrastructure, the biggest issue with this is when an error happens to occur. When the application can't successfully commit a transaction for whatever reason, the rollback occurs AFTER you've typically relinquished control of the request (e.g. You've already returned results from a controller). When this occurs, you may end up telling your customer that something happened when it actually didn't and your client state may end up out of sync with the actual persisted state of the application.
While I used this strategy without incident for some time with NHibernate, I eventually ran into a problem and concluded that the concern of transaction boundary management inherently belongs to the application-level entry point for a particular interaction with the system. This is another approach I'd recommend avoiding.
Instantiated Unit of Work
The next strategy involves instantiating a UnitOfWork implemented using either the .Net framework TransactionScope class or the transaction API introduced by Entity Framework 6 to define a transaction boundary within the application service. Here's an example:
public class CustomerService : ICustomerService { readonly ICustomerRepository _customerRepository; public CustomerService(ICustomerRepository customerRepository) { _customerRepository = customerRepository; } public void CreateCustomer(CreateCustomerRequest request) { using (var unitOfWork = new UnitOfWork()) { try { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; _customerRepository.Add(customer); unitOfWork.Commit(); } catch (Exception ex) { unitOfWork.Rollback(); } } } }
Functionally, this is a viable approach to facilitating a Unit of Work boundary with Entity Framework. A few drawbacks, however, are that the dependency upon the Unit Of Work implementation is opaque and that it's coupled to a specific implementation. While this isn't a terrible approach, I would recommend other approaches discussed here which either surface any dependencies being taken on the Unit of Work infrastructure or invert the concerns of transaction management completely.
Injected Unit of Work Factory
This strategy is similar to the one presented in the Instantiated Unit of Work example, but makes its dependence upon the Unit of Work infrastructure transparent and provides a point of abstraction which allows for an alternate implementation to be provided by the factory:
public class CustomerService : ICustomerService { readonly ICustomerRepository _customerRepository; readonly IUnitOfWorkFactory _unitOfWorkFactory; public CustomerService(IUnitOfWorkFactory unitOfWorkFactory, ICustomerRepository customerRepository) { _customerRepository = customerRepository; _unitOfWorkFactory = unitOfWorkFactory; } public void CreateCustomer(CreateCustomerRequest request) { using (var unitOfWork = _unitOfWorkFactory.Create()) { try { customer = new Customer { FirstName = request.FirstName, LastName = request.LastName }; _customerRepository.Add(customer); unitOfWork.Commit(); } catch (Exception ex) { unitOfWork.Rollback(); } } } }
While I personally prefer to invert such concerns, I consider this to be a sound approach.
As a side note, if you decide to use this approach, you might also consider utilizing your DI Container to just inject a Func
Unit of Work ActionFilterAttribute
For those who prefer to invert the Unit of Work concerns as I do, the following approach provides an easy to implement solution for those using ASP.Net MVC and/or Web API. This technique involves creating a custom Action filter which can be used to control the boundary of a Unit of Work at the Controller action level. The particular implementation may vary, but here's a general template:
public class UnitOfWorkFilter : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { // begin transaction } public override void OnActionExecuted(ActionExecutedContext filterContext) { // commit/rollback transaction } }
The benefits of this approach are that it's easy to implement and that it eliminates the need for introducing repetitive infrastructure code into your application services. This attribute can be registered with the global action filters, or for the more discriminant, only placed on actions resulting in state changes to the database. Overall, this would be my recommended approach for Web applications. It's easy to implement, simple, and keeps your code clean.
Unit of Work Decorator
A similar approach to the use of a custom ActionFilterAttribute is the creation of a custom decorator. This approach can be accomplished by utilizing a DI container to automatically decorate specific application service interfaces with a class which implements a Unit of Work boundary.
Here is a pseudo-code example of how configuring this might look for Entity Framework with the Autofac DI container which presumes that some form of command/command-handler pattern is being utilized (e.g. frameworks like MediatR , ShortBus, etc.):
// DI Registration builder.RegisterGenericDecorator( typeof(TransactionRequestHandler<,>), // the decorator instance typeof(IRequestHandler<,>), // the types to decorate "requestHandler", // the name of the key to decorate null); // the name of the key to this decorator public class TransactionRequestHandler
: IRequestHandler where TResponse : ApplicationResponse { readonly DbContext _context; readonly IRequestHandler _decorated; public TransactionRequestHandler(IRequestHandler decorated, DbContext context) { _decorated = decorated; _context = context; } public TResponse Handle(TRequest request) { TResponse response; // Open transaction here try { response = _decorated.Handle(request); // commit transaction } catch (Exception e) { //rollback transaction throw; } return response; } } public class SomeRequestHandler : IRequestHandler { public ApplicationResponse Handle() { // do some work return new SuccessResponse(); } }
While this approach requires a bit of setup, it provides an alternate means of facilitating the Unit of Work pattern through a decorator which can be used by other consumers of the application layer aside from just ASP.Net (i.e. Windows services, CLI, etc.) It also provides the ability to move the Unit of Work boundary closer to the point of need for those who would rather provide any error handling prior to returning control to the application service client (e.g. the Controller actions) as well as giving more control over the types of operations decorated (e.g. IQueryHandler vs. ICommandHandler). For Web applications, I'd recommend trying the custom Action Filter approach first, as it's easier to implement and doesn't presume upon the design of your application layer, but this is certainly a good approach if it fits your needs.
Out of the approaches I've evaluated, there are several that I see as sound approaches which maintain some minimum adherence to good design practices. Of course, which approach is best for your application will be dependent upon the context of what you're doing and to some extent the design values of your team.
I recently started working with a new team that uses NUnit as their testing framework. While I think NUnit is a solid framework, I don't think the default API and style lead to effective tests.
As an advocate of Test-Driven Development, I've always appreciated how context/specification-style frameworks such as Machine.Specifications (MSpec) allow for the expression of executable specifications which model how a system is expected to be used rather than the typical unit-test style of testing which tends to obscure the overall purpose of the system.
To facilitate a context/specification-style API, I created a base class which makes use of the hooks provided by the NUnit testing framework to emulate MSpec. I've published this code under the project name NUnit.Specifications.
The following is an example NUnit test written using the ContextSpecification based class from NUnit.Specifications using the Should assertion library:
One nice benefit of building on top of NUnit is the wide-spread tool support available. Here is the test as seen through various test runners:
Resharper Test Runner:
TestDriven.Net: (see notes below)
NUnit Test Runner:
NUnit Test Adaptor for Visual Studio:
One caveat I discovered with the TestDriven.Net runner is it's failure to recognize tests without the specification referencing types from the NUnit.Framework namespace (e.g. TestFixtureAttribute, CategoryAttribute, use of Assert, etc.). That is to say, it didn't seem to be enough that the spec inherited from a base type with NUnit attributes, but something in the derived class had to reference a type from the NUnit.Framework namespace for the test to be recognized. Therefore, the TestDriven.Net results shown above were actually achieved by annotating the class with [Category("component")] explicitly.
Other Stuff
As a convenience, NUnit.Specifications also provides attributes for denoting categories of Unit, Component, Integration, Acceptance, and Subcutaneous as well as a Catch class (as provided by the MSpec library) for working with exceptions.
You can obtain the NUnit.Specifications from NuGet or grab the source from github.
When the term "agile" is used in reference to one's development processes, it more often than not seems to be used in a monolithic way. It isn't that many aren't cognizant of the fact that people tend to use a subset, combination, or modified form of the main agile processes marketed today, but even in this recognition there seems to be a tendency to think about each variation in monolithic terms.
Which Process Do You Use?
If you've ever attended a local agile user group to hear various processes compared, you may have encountered the speaker asking for a show of hands to find out what various processes people are using. If you've been to one of these meetings, it might have gone a little like this:
Let's see a show of hands of those in the room who are using Scrum. That's quite a few of you. How about Scrum-ban? Nice. Now let see a show of hands for people using Extreme Programming or XP. Not as many of you guys here. Who's using the Rational Unified Process or RUP? Anyone? Who isn't currently using an agile process, but came here today to learn more about agile? Glad to have you guys here! I hope this session will be informative. So, is anyone using any other process we haven't mentioned? Yes, you sir. What is your group using?
Um, we'll, we use a process we call 'Scrum-but'. We use Scrum, but we leave out some things. [a chuckle is heard from a few individuals].
While such a meeting generally turns to discussing the various attributes of different processes, usually hitting major highlights of Scrum such as iterations, stand-ups, planning meetings, user stories, retrospectives, etc., it still does so in terms of the attributes of different monolithic processes. The deficiency in this line of thinking is that it trains people to think in terms of what percentage of a name-brand agile process their team is adhering to, or should seek to adopt, rather than thinking about what problems these processes individually have evolved to solve. "Which Process Do You Use" is the wrong question.
Are you Agile?
Many teams like to say "We're an agile development shop". Now to be fair, when we want to convey to someone which common group of practices we follow, it can be useful to use labels such as Scrum, XP, Scrum-ban, etc. That said, there seems to be an awful lot of shops that say they are agile when what they mean is that they do "stand-ups" (i.e. a daily status meetings for keeping their managers informed about what their up to) and "iterate" (i.e. chunky waterfall) their way to a deadline that's been handed down by upper management or a sales department.
What is Agile?
If you ask what agile is in a typical development shop today, you'll more than likely find yourself in a conversation about Scrum or some other process than to talk about the actual meaning of the word. Let's actually go back and look at the definition:
ag·ile - adjective \ˈa-jəl, -ˌjī(-ə)l\
1: marked by ready ability to move with quick easy grace <an agile dancer>
2: having a quick resourceful and adaptable character <an agile mind>
Based on this definition from Merriam-Webster's dictionary, being agile is "an ability to change, or adapt to change, quickly". While communicating that you adhere to a given agile process may have it's usefulness at times, thinking of your process in this monolithic way doesn't promote the kind of thinking that leads to continuous improvement. Rather than thinking in terms of which process we use, we should think in terms of what aspects of change our processes help us adapt to.
Toward An Agile View of Process
It seems that many team's first foray into agile processes is the selection of Scrum by their management. They've heard about this Scrum and how it can save them money, so they've sent the managers and Business Analysts off to Scrum Master training to outfit them with their Scrum-capes and Scrum-tights.
Introducing a process like Scrum (or whatever portions of Scrum a company's existing process will tolerate) will sometimes improve upon matters, but only insofar as one's cargo-cult emulation of the prescribed practices happen to match up with the problems for which they were conceived. Unfortunately this approach to adopting agile processes often seems to lead to a bunch of people going through the motions without really understanding what the purpose is. Worse, when the local Scrum training consultants sell them on the fact that they don't really have to give up things like deadlines, using business analysts to gather all the requirements, or otherwise restructuring their organization, they generally end up with some empty shell of a process which is really nothing more than their old waterfall process with more micro-management.
A better approach is to first learn about the types of issues different agile practices seek to address and then consider how your team's existing process can improve if each practice were applied individually. Rather than thinking of your team as "agile" or "not agile", consider asking the following types of questions:
Is my team agile WITH RESPECT TO …
changes to the product's desired features?
changes to the product's code base?
changes to the team's understanding of the domain?
changes to the team's understanding of the technologies used?
changes to team member's hours of availability?
changes to individuals on the team?
changes to skillsets within the team?
changes to the cost of materials and resources?
changes to the compatibility or availability of 3rd-party software?
Different agile practices address different kinds of problems, but to really become an agile team you need to learn how to identify problems and solutions on an ongoing basis, not just implement processes. Let's stop thinking of ourselves as agile or not agile and start asking the question "What are we agile at?"
ExpectedObjects is a testing library I developed a few years ago to facilitate using the Expected Objects pattern within my specifications to avoid obscure tests. You can find the original introduction to the library here.
As of version 1.1.0, the ExpectedObjects library has been updated to include a feature called Custom Comparisons. The standard behavior of the library is to traverse a strategy chain (which is itself configurable) to determine which comparison strategy is to be used for each type of object encountered within the object graph. The Custom Comparisons feature allows you to override this behavior for specific properties.
For example, let's say we're writing a end-to-end test which validates a Receipt class as follows:
public class Receipt { public string Name { get; set; } public DateTime TransactionDate { get; set; } public string VerificationCode { get; set; } }
Given the following class, the VerificationCode property would probably not be a value you could anticipate. In such a case, while you can't verify that the property has a specific value, you may care that it at least has some value. This is where the Custom Comparisons feature can help. We can verify that the actual Receipt received matches the expected receipt structure using the following expected object configuration:
var expected = new { Name = "John Doe", DateTime = DateTime.Today, VerificationCode = Expect.NotNull() }.ToExpectedObject(); var actual = new Receipt { Name = "John Doe", DateTime = DateTime.Today, VerificationCode = "ABC123" }; expected.ShouldMatch(actual);
In the event that the VerificationCode property is null, the library will raise an exception with the following message:
For Receipt.VerificationCode, expected a non-null value but found [null].
The ExpectedObjects library currently provides a static Expect class which includes convenience methods to check for null, not null, and an Any<T> comparison for checking that an object is of a specific type (e.g. Expect.Any<Receipt>()). To supply your own comparisons, simply implement the IComparsion interface which defines the custom comparison and the text to include within any exception messages raised (e.g. "For SomeType.SomeProperty, expected [text you supply here] but found "42").
This is the first article in a new sporadic series I'll contribute to from time to time wherein I'll discuss some noteworthy issues I've wrestled with. In this installment, I'll be discussing an NHibernate issue which took me some time to work through. So, let's dive into the story …
The Context
In an application I was recently working on, a need arose to modify a section of code involving two entities which should have been modeled using a parent/child relationship but which only had a loose association in the database. The primary table in the database schema for what needed to be the parent object in the domain only contained a unenforced foreign key column which matched up with a candidate key on the table used for what needed to be the child object. In the section of code I needed to modify, a View Model was being created by first retrieving data for the parent object and subsequently for the child object. I'm not exactly sure what lead to this path, but I think it had something to do with the original developer's attempt at using a surrogate key strategy for all the tables and later attempts by others to pull the data into a domain model with NHibernate.
At any rate, while I wasn't in a position to revamp the whole design, I knew there was a way to express many-to-one mappings in NHibernate using non-primary keys, so after a little searching and some trial-and-error I got the parent entity referencing the child entity with a Fluent NHibernate Auto-Mapping configuration similar to the following:
return AutoMap.AssemblyOf
(new AutomappingConfiguration()) .Override (map => map.References(p => p.Child, "ParentColumnChildKeyName").PropertyRef("ChildCandidateKeyColumnName") .Fetch.Join());
Part of the changes required to make this work was some refactoring of an import job used to populate the database which relied upon the domain model and mappings to populate the parent and child data. After changing the parent entity to reference the child entity instead of just a candidate key to the child entity, I needed to modify the import job to persist the relationship between the parent and the child. To do this, I injected a pre-existing ChildRepository to query for existing instances of the child entities (which had its own separate import process) so I could associate it with the parent entity upon saving. All of the changes worked as expected for the client portion of the application, but the changes broke some acceptance tests for the import job. The error I started receiving in the tests was as follows:
null id in "MyEntityType" entry (don't flush the Session after an exception occurs)
In this case the "MyEntityType" was another entity which had a many-to-one mapping with the aforementioned parent entity. After looking over the code and scratching my head for a bit, I decided to do a search on this particular error and read a few articles which at first didn't seem to speak to my particular scenario. The advice I read basically boiled down to "Don't try to do stuff with the session after you receive an error". That certainly made sense, but upon stepping through the code I couldn't see anywhere I was catching an error and proceeding to do something further with the session. I then decided to add a try/catch around the offending code and suddenly I saw the issue: trying to save an entity associated with one open session with an entity from another open session.
The Solution
Ultimately, the reason I couldn't see the error was due to an issue with a manifestation of some common infrastructure code my team uses when working working with NHibernate. We use Autofac for dependency injection, and to facilitate transactions we use Autofac's OnActivating() and OnRelease() methods to begin an NHibernate transaction and to handle the rollback or commit of the transaction when complete. Here was the offending code:
builder.Register(c => c.ResolveNamed
(RegistrationKey).OpenSession()) .As () .OnActivating(x => x.Instance.BeginTransaction()) .OnRelease(session => { try { if (!session.Transaction.WasRolledBack && session.Transaction.IsActive) { session.Transaction.Commit(); } } finally { session.Close(); session.Dispose(); } });
When used within the context of our Web applications, this code would contain a call to register the ISession with an HTTP Request lifetime scope, but this import job didn't require a shared ISession prior to my changes. To fix the problem, I added a call to register the ISession as InstancePerLifetimeScope() which causes the same lifetime scope used to resolve the job to be used for resolving any instances of ISession. Additionally, I added a try/catch/throw around the session to at least provide some logging of similar issues should this ever come up again.
What Is It?
RabbitBus is a .Net client API for use with RabbitMQ. RabbitBus was designed to make working with RabbitMQ easy by providing a fluent-interface which places a focus on discoverability and by providing commonly needed constructs not provided through the official RabbitMQ .Net client API.
How Do I Use It?
The RabbitBus library was designed to allow for the centralization of all RabbitMQ configuration at application startup, separating the concerns of routing, serialization, and error handling from the central concerns of publishing and consuming messages.
RabbitBus works with object-based messages. For example, if you have an application from which you would like to publish status update messages, you might model your message using the following class:
[Serializable] public class StatusUpdate { public StatusUpdate(string status) { Status = status; } public string Status { get; set; } }
After configuring how messages are to be handled, you'll then use an instance of a Bus type to publish or subscribe to each message.
Configuration of the Bus is handled through a BusBuilder. The BusBuilder type provides an API for specifying how serialization, publication, consumption, and other concerns will be handled by the Bus.
If you're already familiar with RabbitMQ concepts then you should find working with RabbitBus to be fairly easy. The following demonstrates some of the basic usage scenarios:
Message Publication
To configure a producer application to publish messages of type StatusUpdate to a direct exchange named "status-update-exchange" on localhost, you would then use the following configuration:
Bus bus = new BusBuilder() .Configure(ctx => ctx.Publish<StatusUpdate>() .WithExchange("status-update-exchange")) .Build(); bus.Connect();
To publish a StatusUpdate message, you would then make the following invocation:
bus.Publish(new StatusUpdate("OK"));
Message Subscription
To configure a consumer application to subscribe to StatusUpdate messages on localhost, you would use the following configuration:
Bus bus = new BusBuilder() .Configure(ctx => ctx.Consume<StatusUpdate>() .WithExchange("status-update-exchange") .WithQueue("status-update-queue")) .Build();
To subscribe to StatusUpdate messages, you would then make the following invocation:
bus.Subscribe<StatusUpdate>(messageContext => { /* handle message */ });
What Other Features Are Provided?
RabbitBus provides the following features:
- support of all AMQP 0.9.1 exchange types (i.e. direct, fanout, topic, and headers)
- remote procedure calls (RPC)
- deadletter queue support
- convention based auto-subscription
- RabbitMQ push and pull API support
- extensible serialization (Binary serialization by default, Json serialization provided by RabbitBus.Serialization.Json)
- customizable error handling
- RabbitMQ server restart recovery
- configurable offline queuing support
- logging
Where Can I Learn More?
You can find more information about how to use RabbitBus on the RabbitBus Wiki. Additionally, RabbitBus was developed using Test-Driven Development and care was taken in the implementation of its executable specification suite to maximize demonstration of the API's intended use.
Where Do I Get It?
RabbitBus is available as a NuGet package and the source is available on Github.
This is the eighth and final installment to the series: RabbitMQ for Windows. In the last installment, we walked through creating a topic exchange example. As the last installment, we'll walk through a headers exchange example.
Headers exchanges examine the message headers to determine which queues a message should be routed to. As discussed earlier in this series, headers exchanges are similar to topic exchanges in that they allow you to specify multiple criteria, but offer a bit more flexibility in that the headers can be constructed using a wider range of data types (1).
To subscribe to receive messages from a headers exchange, a dictionary of headers is specified as part of the binding arguments. In addition to the headers, a key of "x-match" is also included in the dictionary with a value of "all", specifying that messages must be published with all the specified headers in order to match, or "any", specifying that the message needs to only have one of the specified headers specified.
As our final example, we'll create a Producer application which publishes the message "Hello, World!" using a headers exchange. Here's our Producer code:
using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Threading; using RabbitMQ.Client; using RabbitMQ.Client.Framing.v0_9_1; namespace Producer { class Program { const string ExchangeName = "header-exchange-example"; static void Main(string[] args) { var connectionFactory = new ConnectionFactory(); connectionFactory.HostName = "localhost"; IConnection connection = connectionFactory.CreateConnection(); IModel channel = connection.CreateModel(); channel.ExchangeDeclare(ExchangeName, ExchangeType.Headers, false, true, null); byte[] message = Encoding.UTF8.GetBytes("Hello, World!"); var properties = new BasicProperties(); properties.Headers = new Dictionary<string, object>(); properties.Headers.Add("key1", "12345"); TimeSpan time = TimeSpan.FromSeconds(10); var stopwatch = new Stopwatch(); Console.WriteLine("Running for {0} seconds", time.ToString("ss")); stopwatch.Start(); var messageCount = 0; while (stopwatch.Elapsed < time) { channel.BasicPublish(ExchangeName, "", properties, message); messageCount++; Console.Write("Time to complete: {0} seconds - Messages published: {1}\r", (time - stopwatch.Elapsed).ToString("ss"), messageCount); Thread.Sleep(1000); } Console.Write(new string(' ', 70) + "\r"); Console.WriteLine("Press any key to exit"); Console.ReadKey(); message = Encoding.UTF8.GetBytes("quit"); channel.BasicPublish(ExchangeName, "", properties, message); connection.Close(); } } }
In the Producer, we've used a generic dictionary of type Dictionary<string, object> and added a single key "key1" with a value of "12345". As with our previous example, we're using a stopwatch as a way to publish messages continually for 10 seconds.
For our Consumer application, we can use an "x-match" argument of "all" with the single key/value pair specified by the Producer, or we can use an "x-match" argument of "any" which includes the key/value pair specified by the Producer along with other potential matches. We'll use the latter for our example. Here's our Consumer code:
using System; using System.Collections; using System.Collections.Generic; using System.Text; using RabbitMQ.Client; using RabbitMQ.Client.Events; namespace Consumer { class Program { const string QueueName = "header-exchange-example"; const string ExchangeName = "header-exchange-example"; static void Main(string[] args) { var connectionFactory = new ConnectionFactory(); connectionFactory.HostName = "localhost"; IConnection connection = connectionFactory.CreateConnection(); IModel channel = connection.CreateModel(); channel.ExchangeDeclare(ExchangeName, ExchangeType.Headers, false, true, null); channel.QueueDeclare(QueueName, false, false, true, null); IDictionary specs = new Dictionary
(); specs.Add("x-match", "any"); specs.Add("key1", "12345"); specs.Add("key2", "123455"); channel.QueueBind(QueueName, ExchangeName, string.Empty, specs); channel.StartConsume(QueueName, MessageHandler); connection.Close(); } public static void MessageHandler(IModel channel, DefaultBasicConsumer consumer, BasicDeliverEventArgs eventArgs) { string message = Encoding.UTF8.GetString(eventArgs.Body); Console.WriteLine("Message received: " + message); foreach (object headerKey in eventArgs.BasicProperties.Headers.Keys) { Console.WriteLine(headerKey + ": " + eventArgs.BasicProperties.Headers[headerKey]); } if (message == "quit") channel.BasicCancel(consumer.ConsumerTag); } } }
Rather than handling our messages inline as we've done in previous examples, this example uses an extension method named StartConsume() which accepts a callback to be invoked each time a message is received. Here's the extension method used by our example:
using System; using System.IO; using System.Threading; using RabbitMQ.Client; using RabbitMQ.Client.Events; namespace Consumer { public static class ChannelExtensions { public static void StartConsume(this IModel channel, string queueName, Action<IModel, DefaultBasicConsumer, BasicDeliverEventArgs> callback) { var consumer = new QueueingBasicConsumer(channel); channel.BasicConsume(queueName, true, consumer); while (true) { try { var eventArgs = (BasicDeliverEventArgs)consumer.Queue.Dequeue(); new Thread(() => callback(channel, consumer, eventArgs)).Start(); } catch (EndOfStreamException) { // The consumer was cancelled, the model closed, or the connection went away. break; } } } } }
Setting our solution to run both the Producer and Consumer applications upon startup, running our example produces output similar to the following:
Running for 10 seconds Time to complete: 08 seconds - Messages published: 2
Message received: Hello, World! key1: 12345 Message received: Hello, World! key1: 12345
That concludes our headers exchange example as well as the RabbitMQ for Windows series. For more information on working with RabbitMQ, see the documentation at http://www.rabbitmq.com or the purchase the book RabbitMQ in Action by Alvaro Videla and Jason Williams. I hope you enjoyed the series.
1 – See http://www.rabbitmq.com/amqp-0-9-1-errata.html#section_3 and http://hg.rabbitmq.com/rabbitmq-dotnet-client/diff/4def852523e2/projects/client/RabbitMQ.Client/src/client/impl/WireFormatting.cs for supported field types.


text:
- Soil Association
- Better Food
- Our Campaigns
Campaign for Change
We campaign for change on issues at the heart of healthy food and farming.
It all begins with the soil, as does most of life on earth! But our work reaches much farther than that. We campaign for healthy soils, farmland, and countryside; farming practices that are ecologically friendly and socially responsible and healthy food, especially for those that need it most.
We believe that organic farming is better for people, better for animals, and better for the environment. And that everyone should have access to good, healthy food.
So if you feel as passionate as we do about good food, we believe you'll find a campaign of ours that reflects the things that matter to you.
Get involved and be at the heart of the good food movement.
Ban Neonics
Neonicotinoid pesticides are contaminating our countryside and poisoning our wildlife. The Government's partial ban isn't enough.
Not in our Bread
The pesticide and probable carcinogen glyphosate is turning up in our bread. We want to put an end to the dangerous and unnecessary farming practices causing it.
Save our Soils
Healthy soils produce better food, support the environment, and can even help reduce climate change. We want the Government to commit to saving our soils.
Save our Antibiotics
Factory farms are abusing antibiotics, and putting people at risk of illness and death from antibiotic-resistant diseases. These unsustainable practices must stop.
Genetic Modification
GMOs have failed to deliver on their promises of greater yields, better nutrition, and reduced pesticide use. We need to look to other solutions.
Labelling Matters
Factory farms raise animals in cramped and unhealthy conditions. We want all animal product packaging to include clear labelling explaining how those animals were kept.
Out to Lunch
With the help of an army of 'secret diner' parents, we surveyed some of the UK's biggest and most popular chains on the food and service they are offering our children. This is what we found.
Organic farming is ethical by most descriptions, it is farming in a way that benefits the soil, ecosystem and ultimately the person who eats organic food.Jamie Carr Future Grower Abbey Home Farm, Cirencester
I'm incredibly proud that our kids' menu has reached the top spot on the Soil Association's [Out to Lunch campaign's] league table for the second time running. Over the last 12 months we've been working really hard to make sure that all the dishes are not only super-tasty and visually fantastic, but are nutritionally balanced, too.Jamie Oliver


text:
Love it, hate it, good story, bad story... the media are going to keep reporting on ME/CFS no matter what. But isn't it time that we saw that coverage as an opportunity?
Discuss the article on the Forums.
Mikowitz accused of manipulating XMRV paper
Discussion in 'General ME/CFS News' started by Valentijn, Oct 4, 2011.
Page 5 of 7
Page 5 of 7


text:
Buy Item $16.99 Retail:
Save 15% ($3.00)
Add To Cart
Add To Wishlist
Fully lined with zipper closure, two zip inner pockets, and magnetic snap closure; contrasting red double straps and polka dot back.
Believe John 3:16 with red polka dot tulip; 16.5" x 5" x 13.5" high; 8.5" handles From our Hidden in my Heart collection by Amylee Weeks.
|Format: Gift
Vendor: Dicksons
Publication Date: 2012
Availability: Expected to ship on or about 08/25/16.
Email me when this product is available.
|Email me when this product is available.


text:
It Must Be Spring, Time To "Raise The Roses", And Your Help Is Requested.
The City Of Duluth Parks And Maintenance staff is requesting your help at the annual "Raising Of The Roses" in the Rose Garden on London Road. Staff will be there to teach you the Minnesota way and offer tips for growing as you help make the Duluth landmark look good.