text
stringlengths
1
330k
// this is a programming / environment error
// throw as unchecked exception
throw new RuntimeException(ex);
Of course the downside of this approach is that is more work. The upside is that you have explicitly stated in code which are the "expected" circumstances and which ones should not happen ever.
share|improve this answer
add comment
Yes, the exceptions should be handled, but in Spring design, on higher level then the each DAO method. In fact the design where in every method there is SQLException handling is unclean copy-paste design, and when you change something, you must apply the change in every place.
There are various demands, and various places where you handle unchecked exceptions. One of these are aspects, where you can for example convert Spring's exceptions to your exceptions (uncatched exceptions need not be declared in method signature, so this convertion is very elegant). In REST method you can add generic handler that will return the error responce to the caller, and you write exception handling in only one place. In JSF/JSP based technologies you can add own error page whenever error occures.
share|improve this answer
You don't need to handle it in the DAO, you could just declare your DAO interface as throws SQLException (or whatever exception you want your DAOs to raise). –  gpeche Jan 15 '12 at 20:05
Yes, but still you have to handle it somewhere. And even if you handle it in aspect, still throws declaration stays and you must handle exception you never get... –  Łukasz 웃 L ツ Jan 15 '12 at 20:56
Well you always have to handle exceptions, except in development. Otherwise your program terminates in a uncontrolled way. –  gpeche Jan 15 '12 at 21:55
Yes, but you can do it in aspect, or in task dispatcher, or in queue, or anywhere else where the tasks are called. –  Łukasz 웃 L ツ Jan 16 '12 at 8:11
add comment
The benefit is not being forced to catch or declare them.
I'm not convinced that not finding data during user searches is exceptional, particularly at the SQL level. Turning that into a checked exception amounts to using exceptions for generalized flow control. I would consider that an anti-pattern to be avoided; YMMV.
Many SQL-related errors are code-related; IMO it's better to fail fast--during development.
share|improve this answer
add comment
Your Answer
Presidential candidates debate marriage for gay couples
BY admin
October 15 2004 12:00 AM ET
During the last of three presidential debates on Wednesday evening, an unprecedented discussion on homosexuality and gay rights highlighted the two candidates' concurring and differing views on the issue. It started when George Bush was asked by moderator Bob Schieffer if he believes homosexuality is a choice. "You know, Bob, I don't know. I just don't know," Bush said. "I do know that we have a choice to make in America, and that is to treat people with tolerance and respect and dignity. It's important that we do that. I also know, in a free society, people, consenting adults, can live the way they want to live. And that's to be honored."
"But as we respect someone's rights and as we profess tolerance, we shouldn't change, or have to change, our basic views on the sanctity of marriage," Bush continued. "I believe in the sanctity of marriage. I think it's very important that we protect marriage as an institution between a man and a woman. I proposed a constitutional amendment. The reason I did so was because I was worried that activist judges are actually defining the definition of marriage. And the surest way to protect marriage between a man and woman is to amend the Constitution. It has also the benefit of allowing citizens to participate in the process. After all, when you amend the Constitution, state legislatures must participate in the ratification of the Constitution."
"I'm deeply concerned that judges are making those decisions, and not the citizenry of the United States," Bush continued. "You know, Congress passed a law called DOMA, the Defense of Marriage Act--my opponent was against it--it basically protected states from the action of one state to another. It also defined marriage as between a man and a woman. But I'm concerned that that will get overturned, and if it gets overturned, then we'll end up with marriage being defined by courts. And I don't think that's in our nation's interest."
In his response, John Kerry talked about Vice President Dick Cheney's daughter Mary. "We're all God's children, Bob, and I think if you were to talk to Dick Cheney's daughter, who is a lesbian, she would tell you that she's being who she was, she's being who she was born as. I think if you talk to anybody, it's not a choice. I've met people who've struggled with this for years, people who were in a marriage because they were living a sort of convention, and they struggled with it. And I've met wives who are supportive of their husbands, or vice versa, when they finally sort of broke out and allowed themselves to live who they were, who they felt God had made them. I think we have to respect that."
"The president and I share the belief that marriage is between a man and a woman. I believe that," Kerry continued. "I believe marriage is between a man and a woman. But I also believe that because we are the United States of America, we're a country with a great, unbelievable Constitution, with rights that we afford people, that you can't discriminate in the workplace, you can't discriminate in the rights that you afford people. You can't disallow someone the right to visit their partner in a hospital. You have to allow people to transfer property, which is why I'm for partnership rights and so forth. Now, with respect to DOMA and the marriage laws, the states have always been able to manage those laws, and they're proving today, every state, that they can manage them adequately."
Kerry's comment about Mary Cheney drew criticism from a number of conservative sources, including Mary's mother, Lynne. During a debate-watching party in the Pittsburgh suburb of Coraopolis, Lynne Cheney accused the Massachusetts senator of pulling a "cheap and tawdry political trick" for invoking her daughter's sexuality. "Now, you know, I did have a chance to assess John Kerry once more, and now the only thing I could conclude: This is not a good man," she said. "Of course, I am speaking as a mom, and a pretty indignant mom." The vice president did not raise the matter in his remarks at the same party.
In his earlier debate with John Edwards, the vice president expressed no objection when the Democrat brought up his daughter Mary. Edwards expressed "respect for the fact that they're willing to talk about the fact that they have a gay daughter, the fact that they embrace her. It's a wonderful thing."
In response to Lynne Cheney's rebuke, Human Rights Campaign executive director Cheryl Jacques said, "President Bush missed one more chance to denounce discrimination last night, so it is bewildering that Lynne Cheney instead attacked Senator Kerry. Senator Kerry made clear that gay Americans should have the same basic rights, responsibilities, and protections as every other American. Vice President Cheney first discussed his own daughter in the context of this issue two months ago, and it is not surprising that Senator Kerry mentioned her experience as emblematic of millions of gay Americans. Senator Kerry was speaking to millions of American families who have hardworking, taxpaying gay friends and family members."
Shortly after the debate, the gay political group Log Cabin Republicans issued a statement on Kerry's comments. "Senator Kerry could have made his point about gay and lesbian Americans without mentioning the vice president's daughter," it read. "However, this shouldn't distract us from the fact that President Bush, Karl Rove, and other Republicans have been using gay and lesbian families as a political wedge issue in this campaign. Log Cabin Republicans have a message for both campaigns. For Senator Kerry and Senator Edwards, you do not need to talk about the vice president's daughter in order to discuss your positions on gay and lesbian issues. For President Bush and Karl Rove, you have a moral obligation to stop using gay and lesbian families as a political wedge issue. Our country and our party deserve better."
Tags: World
Hicksville, New York Jobs Forum
Get new comments by email
You can cancel email alerts at anytime.
Current Discussions (12) - Start a Discussion
Best companies to work for in Hicksville?
What companies are fueling growth in Hicksville? Why are they a great employer?
Up and coming jobs in Hicksville
What jobs are on the rise in Hicksville?
What are the best neigborhoods in Hicksville?
Where is the good life? For families? Singles?
Best schools in Hicksville?
Where are the best schools or school districts in Hicksville?
Weather in Hicksville
What are the seasons like in Hicksville? How do Hicksville dwellers cope?
Hicksville culture
Food, entertainment, shopping, local traditions - where is it all happening in Hicksville?
Hicksville activities
What are the opportunities for recreation, vacation, and just plain fun around Hicksville?
Newcomer's guide to Hicksville?
What do newcomers need to know to settle in and enjoy Hicksville? Car registration, pet laws, city services, more...
Commuting in Hicksville
When, where and how to travel.
Moving to Hicksville - how did you get here?
Hicksville causes and charities
What causes do people in Hicksville care about. Where are the volunteer opportunities?
Job search in Hicksville?
What are the best local job boards, job clubs, recruiters and temp agencies available in Hicksville?
RSS Feed Icon Subscribe to this forum as an RSS feed.
» Sign in or create an account to start a discussion.
Rosemary Cabelo uses a computer at a public library to access the Affordable Health Care Act website on Dec. 11, 2013, in San Antonio.
The Scariest Graph the CBO Released Today
A new CBO report has partisans up in arms, but anyone can agree the job market isn’t looking great.
The Congressional Budget Office estimates that Obamacare could mean fewer people searching for jobs.
Today, while it was telling us that Obamacare could mean fewer workers and a slowing economy would push deficits up, the Congressional Budget Office also put out a report about the labor market's slow recovery (cleverly titled "The Slow Recovery of the Labor Market"). Here is a look at exactly how messed up the labor market has become, all packed into one chart:
[READ: CBO: Deficit to Shrink, Recovery to Slow, Obamacare to Mean Fewer Jobs]
(Congressional Budget Office)
It’s not a simple up-and-down plotting of the jobless rate over time, but it displays one crucial point about the job market: It’s just not what it used to be. The chart at left is the Beveridge curve, a plot of the share of unemployed Americans versus how many jobs are open.
Barring any major economic shifts, the labor market generally travels up and down the curve, but the curve itself does not move. It’s painful when the jobless rate gets higher under these circumstances, but it also tends to mean that demand is simply low for goods and services.
But as the above curve shows, there was a big shift outward after July 2009 – meaning that even though the current job vacancy numbers are similar to only a few years ago, the unemployment rate is now higher.
[ALSO: Alongside Income Gap, Internet Gap Remains Wide]
All sorts of reasons could contribute to this, according to the CBO: The stigma of long-term unemployment, for example, could be keeping some would-be workers out of all those vacancies. Likewise, the long-term unemployed could be losing valuable job skills as they sit idle. In addition, a skills mismatch may be at work. And as some have suggested, employers – sensing they have their pick of plenty of qualified candidates – are taking their time sifting through the stacks of resumes. 
It also could be possible that extensions of jobless benefits helped push the unemployment rate up, the CBO says, as people continued applying for jobs in order to stay in the labor force and continue collecting benefits. However, those effects started tapering off in 2013, as people began exhausting their benefits, according to the CBO.
What it means is that getting the job market back to where it once was will be a matter that involves far more than boosting growth and, therefore, demand. The jobless rate, at 6.7 percent, is roughly 2 full points higher than it was at the end of 2007. According to the CBO, structural factors – things like a broad skills mismatch that is unrelated to the business cycle – account for half that.
Those structural factors, unfortunately, are tricky to solve. It could mean job training, and it could mean pushing employers to hire the long-term unemployed, as President Barack Obama is attempting to do. But they could take years to solve – the CBO predicts that the problems affecting the long-term unemployed won't start to disappear until after 2017.
Tea-Fueled Republican Resistance Compels Barack Obama To Keep Running
In 2012, Paul Ryan declared that the election would “determine” American policy. But in 2013, Republicans aren’t accepting the result, writes, Robert Shrum.
As President Obama is discovering, election, or more particularly reelection, can be a waning mandate. Yes, he won his top rate tax increases in January—but less because Republicans accepted the verdict of last November than that they feared the blame in November 2014 if they conspicuously shattered the credit-worthiness and economic stability of the United States. And now we are at a point where Obama himself suggests that the differences are just "too wide" to achieve a "grand bargain" on America's fiscal future. The president says he won't yield if the GOP position is "we can only do revenue if we gut Medicare ... Social Security ... or education."
Well, although they wouldn't put it in those words, that is exactly the Republican position: voucherize Medicare, mow down Medicaid, and, no surprise, slash tax rates for the wealthy and corporations to 25 percent. From White House officials to Congressional Democrats to liberal commentators like Rachel Maddow, there has been a common reaction: doesn't Ryan know that he and Mitt were beaten, and pretty soundly? To reinforce her point—and Ryan's hypocrisy—Maddow went to the videotape of last summer, when Ryan promised, "[w]hoever wins this election is going to determine what all this"—from entitlements to tax policy—"looks like next year."
In reality, things don't work out that way—and they certainly aren't now. In fact, the Tea-fueled Republican resistance to Obama's approach is both consistent with history, and dangerously ahistorical.
First, the consistency: political parties don't surrender core positions just because their presidential nominee finished behind, sometimes far behind, in the electoral college.
After Richard Nixon carried 49 states in 1972, Democrats continued to press for a definitive end to the Vietnam War—and Congress ultimately defied the impeached and disgraced president's successor Gerald Ford and their mutual secretary of State, Henry Kissinger, by refusing a request for last-minute arms and air cover for the South Vietnamese regime. Senator Jacob Javits, a Republican but a long time doubter about the war, was blunt: Congress would "provide large sums for evacuation, but not one nickel for military aid." A conflict that never should've been fought was finally over.
The examples here are legion, for both Democratic and Republican presidents, and whether their elections were close calls or landslides. John F. Kennedy ran on Medicare in 1960—it was a central difference between him and Nixon—and then against fierce opposition, lost the bill in the Senate by four votes. In 1994, Bill Clinton's health-care reform, a hallmark promise of his campaign, never even reached the floor of either house of Congress. George W. Bush claimed a mandate after 2004, and then promptly saw Democrats decimate his proposal to privatize Social Security. After Hurricane Katrina, he couldn't pass a single major piece of legislation or stem the tide of hostility to the Iraq War—that became a driving force of the campaign of the young senator who would succeed him.
Ronald Reagan, another 49-state winner, did secure sweeping tax reform; but it was a Democratic as much as a Republican plan, embodying ideas Ted Kennedy had pursued for years and shaped as much by Democrats like Dick Gephardt and Bill Bradley as by his administration. Reagan achieved comprehensive immigration reform, but it had to be negotiated with Kennedy and others on both sides of the aisle. Beyond this, he yielded his past opposition to the Voting Rights Act, which was renewed in 1985. And Democrats, and a fair number of Republicans, stood their ground and overrode his shameful veto of sanctions on apartheid, a measure which isolated the racist regime in South Africa and played a crucial role in its downfall.
Lyndon Johnson, who was first elected to the Senate in 1948 by 87 votes, derisively earning the nickname "Landslide Lyndon," redeemed his electoral status by capturing the highest share of the popular vote in history in the presidential contest of 1964. But he's the exception that proves the rule. He promptly passed Medicare and the rest of his "Great Society"—but only because his party had two-thirds majorities in the Senate and the House— and for only two years. Republicans fought back; LBJ was increasingly beleaguered by civil unrest at home and a domestic uprising against escalation in Vietnam. He didn't even dare to run again in 1968.
On a broad span of issues, from economic justice to the rights of women, Hispanics, other minorities, and gays and lesbians, the GOP is paddling against the tide of history.
So the resistance Obama faces today is not unusual, even if it is unusually bitter. What is fundamentally ahistorical is the GOP's utter unwillingness to compromise—and its willingness to threaten the underpinnings of both government and the economy. Even in the throes of the Watergate scandal, the two parties collaborated to keep the system whole, sound, and on track. Or think of 1997: after House Speaker Newt Gingrich had pioneered the apocalyptic tactic of shutting down the government, which brought a fierce political backlash, he worked with President Clinton to enact the measures that led to a balanced budget. It is perhaps Bill Clinton's greatest achievement—and hard as it is to say this, Gingrich's finest hour.
Newt had learned the lesson of the shutdown. And today’s House Republicans say that they have, too. They've just approved a bill to fund the government until the end of September. The prevailing assumption is that the Senate will remove some of the poison pills that are killing domestic programs—and the final product will actually make it to the president's desk.
A great country shouldn't be making fateful fiscal decisions month by month, but it's better than fiscal collapse. That doesn't obviate the prospect of a gradual, grinding economic slowdown. Aside from the human pain, inflicted not just on federal workers but on the poorest and most vulnerable, the sequester is likely to reduce economic growth by at least half a percentage point and trigger the loss of one million jobs.
In the customary dramaturgy of the Beltway, excessive attention has been paid to a sideshow orchestrated by the Washington Post's Bob Woodward —the discredited claim that the president "moved the goalposts" by insisting that revenue be part of an agreement to avert sequestration. But in 2011, the White House made clear that any solution had to include "revenue—raising tax reform."
What matters far more than this tempest in the media's self-reflective mirror is the Republicans' manic and politically convenient obsession with growth-retarding, job-ravaging austerity. Throughout Obama's first term, they blocked effort after effort to help strained state and local governments and to lift demand across the economy. The result, as Paul Krugman wrote, was an unemployment rate 1.5 percentage points higher than it otherwise would have been by March 2012. It was bad economics by Republicans—and as it turned out, bad politics too, as Obama reframed the election not as a referendum on the sluggish state of the recovery, but as a choice defined by a question to which Romney could never be the answer: Who stands up for the middle class? Who's on your side?
Now the GOP, impelled by ideology matched to calculation, is trying the same game again. And Republicans aren't deterred, but encouraged by the near-universal consensus—and the nearly universal proof from Europe to Asia and the Americas—that austerity is the road to economic malaise or recession. The obvious aim is to blame Obama and the Democrats and rerun the 2010 elections in 2014.
Bill Clinton signing budget reconciliation measure into law, Newt Gingrich pictured background center, August 5, 1997. (Douglas Graham/Getty)
I've argued here before that the president in effect has to run for a third term in the midterm campaign. Aside from marshaling the unparalleled competencies of his organization—and I don't care about the tut-tutting of goo-goo groups like Common Cause about his fundraising for this—unilateral disarmament is not a sufficient response to the Koch brothers and their ilk—the president has to pin the tail on the elephant. As the sequester erodes the recovery, he has to hold the GOP accountable, and he has to draw dividing lines on the budget and fiscal policy: growth now, deficit reduction over time; Social Security, Medicare, investment in the future, not tax windfalls for the wealthy.
On a broad span of issues, from economic justice to the rights of women, Hispanics, other minorities, and gays and lesbians, the GOP is paddling against the tide of history. They will do it less conspicuously now, as quietly as the base will let them. And in the meantime, in the name of a clichéd and miscarried fiscal discipline, they will block or weaken the recovery every step of the way—and hope no one notices. Obama can and must make sure everyone does.
The president has reached out, sought out middle ground, and repeatedly been rebuffed. His experience validates JFK's observation that you can't negotiate with those who say: "What's mine is mine and what's yours is negotiable." For the sake of the nation, I wish Obama had some of the luck of Clinton in 1997. So while I never thought I'd write this either, maybe we should bring back Newt Gingrich.
Security // Risk Management
10:38 AM