Friday, December 13, 2013

Retrieving external config properties from JNDI, environment shell, and/or system properties.

I need to deploy multiple instances of the same WAR in a single Tomcat instance. I've been reading external config properties from System properties (e.g. System.getProperty('ext.xyz')). That won't work when deploying multiple WAR instances. So I whipped this up to read from JNDI as well as System properties (and I threw in reading from environment vars as well).

Then in Config.groovy, I use it thus...

This way my config file doesn't care where the external property comes from. In dev, I can define it as a system property. In prod, I can define it as a JNDI env var.
For completeness, here's how I'm defining the context xml in Tomcat.

Thursday, November 28, 2013

Adding parameters to an existing link

I'm working on a project where the user selects a date and then clicks a link.  The date needs to be added as a parameter to the link's url.  The normal way to do this would be with a form.  But each link would then have to be a submit button.  I don't want them to look like submit buttons.  But I also don't want to restyle them to look like links.  So I set out to find a way to dynamically add the date to each link.

Turns out with jquery it's pretty easy.  Check it out...
Update: okay, another easy way to do this would be to leave the links as links but put the parameters, including the date, in a form, then trap the click event on the link and submit the form. But what's cool about that?

Tuesday, November 26, 2013

Still No Real Information on healthcare.gov

Walter Russell Mead thinks healthcare.gov will be working more or less well on December 1.  But he doesn't know for sure.  In fact, no one outside of government has any idea how well it will be running.  Why is that?  There must be dozens if not hundreds of technical staff working on this, not to mention all the government bureaucrats involved.  Why hasn't some enterprising journalist published an article with the inside scoop?  There are now less than five days, is the Obama admin that good at preventing leaks?

Saturday, November 23, 2013

Closing the Fence Gate after the Horse Has Left

Goldstein and Eilperin have been doing a great job at the Washington Post covering the problems with the ACA.  Yesterday they published another article chronicling the failure of healthcare.gov.  Apparently the lead contractor assured staff at HHS that the site would work, and of course it didn't.  From the article...

CGI staff huddled with government officials in the semicircular conference room at the headquarters of the federal Centers for Medicare and Medicaid Services (CMS), the agency overseeing the project. They combed through 15 pages of spreadsheets they had brought, which spelled out the company’s level of confidence — high, medium or low — that individual components would be ready.

By the time HealthCare.gov launched 51/2weeks later, many of those predictions proved wrong, according to internal documents obtained by The Washington Post and officials familiar with the project.

A final “pre-flight checklist” before the Web site’s Oct. 1 opening, compiled a week before by CMS, shows that 41 of 91 separate functions that CGI was responsible for finishing by the launch were still not working.
Here's my question: why is this only coming out now, almost two months after the healthcare.gov launch?  Why weren't reporters digging into these details before the rollout?  They didn't have any sources at HHS, CMS, or CGI?  No one wanted to know what CMS or its lead contractor thought was going to happen on Oct. 1? We're a long way from Woodward and Bernstein here.

Friday, November 22, 2013

Crazy Years

Looking at today's edition of Drudge Report, I am convinced: the Crazy Years are upon us.

Lowlights:
Here's my question: who's crazier?  The subjects of these articles, or the journalists who thought it would be interesting to cover them?  Or is it the people who actually read these articles?

Saturday, November 16, 2013

Republican Celebration

Ron Radosh reports Republicans are feeling pretty good at the moment.  One pundit, Michael Barone, even compared the current environment to that of the Fall of France in 1944.

These Republicans need to get real.  If Obamacare's failures were such a winning issue, why didn't Republicans use them to beat the Democrats back when the bill was being debated in 2009?  Did they not understand the bill's weaknesses? If they did, why didn't they make them the focal point of every speech, every media interview, and every campaign ad in 2010 and 2012?

Yes there's an opportunity here. But Republicans need to get serious about governing and start proposing some real alternatives (sorry, interstate insurance plans aren't going to cut it), or they're going to blow it again.

For starters, why aren't Republicans out front and center asking why the President and Harry Reid chose to shut down the government?  Plenty of people in Washington warned Obamacare was headed for a train wreck, long before the shut down occurred.  Republicans had the right policy.  Why aren't they making the case that Democrats shut down the government even though they knew Obamacare wasn't ready?

Guess they'd rather celebrate Democrats' failure than start working towards success in 2014.

Pelosi's Fix for Obamacare

On Thursday, House Minority Leader Nancy Pelosi promised her caucus would propose their own fix for Obamacare's IYLYPYCKI problem by Friday at the latest.  It would complement the President's so-called "administrative" fixes.

It's Saturday, and we're still waiting.  Add another broken promise to the Democrats' record.

Thousands of Doctors Dropped Because of Obamacare. Who's Happy About It?

News from Reuters is that UnitedHealth is dropping thousands of providers from its networks.  More evidence the plan was never meant to work the way the President and Democrats said it would.

Some on the right are enjoying a bit of schadenfreude at the President's and Democrats' plight.  I don't feel that way at all.  Rather the opposite.

Where were these fun-loving pundits back in 2009 when this awful bill was being debated?  All of this law's failures were foreseen.  How is it that the combined effort and energy of the entire Republican Party and conservative pundits couldn't stop this horrible legislation? Until Jonah Goldberg can answer that, he should stop smiling and get working.  A party that can't stop Obamacare in 2009 and can't regain the Senate in 2010 should be working its butt off to make it doesn't happen again in 2014.