DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Another Java Disaster: Jobs

Another Java Disaster: Jobs

Rob Williams user avatar by
Rob Williams
·
Mar. 21, 11 · Java Zone · Interview
Like (0)
Save
Tweet
7.27K Views

Join the DZone community and get the full member experience.

Join For Free

I‘ve blogged before about my low opinion of Quartz. Ok, for everyone who loves to make the argument that we live in the land of choice, and the ‘boy, I‘m not going to end up trapped in a walled garden, I‘m going to have choices.‘ 15 years on, we have one job engine that if you showed it to someone serious (and they didn‘t know what it was) they would guess it was in the pupal stage. It‘s anemic feature set is a complete joke. And yet, it‘s been adopted by Spring and Seam. Why? Welcome to the choicest monoculture around: Java.

Now here‘s the surprise in today‘s post: starting from this scabbed puss pocket, Seam somehow found a way to make it even worse.

First off, I defy anyone to read the documentation to the Quartz wrapper in Seam and not develop a stage 4 migraine. It‘s like ‘wait, how do I get something to run at a given time?‘ You‘d think there would be a simple answer. Instead, a clown car of insanity seeps out that makes that old Belushi skit on SNL about the watch that‘s so complex you have to flag someone down in the street to help you get the time from it look kind of staid. Why is it so confusing? Because you can use annotations. But you still have to configure it in components.xml, then the method itself has a return value of the QuartzTriggerHandle, but forget that, it can be null. (In other words: senselessness is the dominant quality.)

People used to mock C++ as the wrapper language. At least their wrappers did stuff!! Java is so full of wrappers that actually decrease functionality it‘s whacked. That‘s what happens here: promise: augmentation, reality: diminishment (some musical theory humor).

So after the API/approach has rolled off you like a spattering of mercury, and you start to use the thing, that‘s when it gets really dark. So I wanted to add some retry logic. How hard could that be in a job engine that‘s been around for 15 years? Apparently no one ever thought of that on the team, because there is no support. So I found an example, that was kind of nice: terse, clear, on Github. Saw that the dude extended SimpleTrigger and just overloaded executionComplete. Perfect. This is going to take no time at all. [Extra credit: guess which design pattern came to mind?... A: the same one that the layout managers in Swing use.]

So then, I go back to the QuartzTriggerHandle, thinking ‘this must extend or Decorate the trigger.‘ Nope. Then it must let me inject it. Nope. Drilled around a bit and found, to my horror, it makes the trigger, by violating the first commandment of DI: thou shalt not new!! Seriously, Guys? I mean, really?

Some people would say this platform has bred mediocrity. Um, I‘m dying to find something mediocre. For all the shortcomings of the C++ community (and there were plenty) it makes Java look like a goat rodeo.

 

From http://www.jroller.com/robwilliams/entry/another_java_disaster_jobs

Java (programming language) career

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Datafaker: An Alternative to Using Production Data
  • Troubleshooting Memory Leaks With Heap Profilers
  • Composable Architecture
  • How to Determine if Microservices Architecture Is Right for Your Business

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo