Javalobby logo image
Tuesday, October 17, 2006 

Low overhead clustering with standard JDK1.5

Terracotta

Terracotta Hear from a Terracotta co-founder and lead engineer how to build the Master-Worker pattern using standard JDK1.5. Learn how to cluster it at runtime using Terracotta DSO. Finally, become familiar with the production implications of operating and scaling this reliable work management framework.

Enroll in a webinar and learn to operate / scale this reliable work-management system.

 Perspective

The Ajax Experience


Be sure and
check out a
No Fluff Just Stuff
Java conference
coming your way!

10/20-10/22 Toronto
10/27-10/29 Dallas
11/03-11/05 Reston
11/10-11/12 Denver
11/17-11/19 Chicago

The Spring Experience

dzone Most-clicked links this week
 
 A Developer's Perspective
 Next section
Rick Ross is the founder of Javalobby. He is a frequent speaker at Java-related events and a well-known advocate for Java developer interests.

Rick Ross, JavaLobby FounderMy Unexpected Reward from Best Buy

(Please take a look at the new JL Expert Presentation on building killer web apps with Ajax and JSF. This Ajax stuff may be easier than you think.)

If you offer a rewards program to your customers, then it’s a good idea to try to make it rewarding! At the end of last week I received an email from electronics retail giant, Best Buy, that I had earned a modest amount of "My Rewards" credit from prior purchases, but my credit would expire in early November. On Sunday, Elizabeth and I were out with the kids and ended up near a Best Buy store, so we stopped there to use up my soon-to-expire store credits.

I walked through the store and found little of interest. If you've ever been to my place, then you know I have no right to complain about lacking anything in the realm of electronics. As a husband, however, and being the father of four daughters, I am never at a loss for ways to part with my money. Elizabeth and the girls browsed the movie section and found several DVDs they wanted, so we headed to the checkout counter with the DVDs and reward certificates in hand.

The woman at the counter totaled up our purchase, which came to $28.67. I handed her certificates for $30, and she looked blankly at me and said I couldn't use these. I asked why not, and she explained she could not give me change for purchases made with reward certificates. I told her that would not be a problem, and that Mr. BestBuy could simply keep the change. She explained further that the computer would not even allow her to apply the certificates unless the purchase amount actually exceeded the amount of the certificates.

Best Buy is a big company, and they don't give much latitude to employees on the floor, so I ask whether her manager might be able to do something about it? She shrugs and says that she cannot, in any case, so she calls up the manager. We wait for about five minutes or so, and I'm starting to feel like my rewards are less than perfectly rewarding. Policy-driven stupidity really gets my goat, but I want to see whether the manager can work it out. Meanwhile, he's stuck at the customer service counter with two clerks and a very determined customer who wants him to identify and order some unlabeled, microscopic repair part for a digital camcorder. We decide to walk over to the customer service desk and wait for him there.

Eventually the manager extricates himself from that situation and turns his focus our way, where a young man named Corby has begun ringing us up. Now the "3 DVDs for $20" special deal isn't appearing, so Corby tells us the total will be $40 or so. We point him to the weekly newspaper circular, and he calls someone back in the movie section and verifies that the price is indeed $20 for all three. Now the total is again $28.67, and we're back to square one, but finally the manager is involved. Corby and the manager are both scratching their heads about what to do with the reward certificates, so I say "Hey, you routinely do a manager's override to mark a price down when you need to. Why don't you just do a manager's override and mark UP the price of one of these DVDs by a buck or so? That should solve it."

Manager looks at me grimly and says, "I can't do that. I would almost certainly get fired for doing that." He is deadly serious, as if increasing Mr. BestBuy's profit would be crossing into territory that is seriously off limits. He can lower the price of his inventory any time, but he'd better not dare to increase it, even with the consent and urging of his customer! He is as constrained by the computer and by corporate policy as the cashier is, and he's got no latitude to solve this problem.

The eventual solution, of course, was painfully simple (suggested by the aforementioned Corby, who deserves to have a bright future in Mr. BestBuy's empire.) We just grabbed a Diet Coke and a Kit Kat Bar, added them to the purchase, handed over our certificates and about forty cents, and we were done. I didn't even know they sold soda and candy at the electronics store, but you learn something new every day. So, twenty or thirty minutes after trying to buy a few DVDs with my "reward certificates," I was finally able to leave the store with only a minor headache and most of my frustration dissipated. I don't suspect this is what the architects of the "My Rewards" program originally envisioned.

A growing number of businesses rely on software systems that aren't half as adaptable as a thinking person making informed choices. Over-reliance on such systems disenfranchises employees who might otherwise be motivated to think and act intelligently on behalf of their employers. Even worse, as the Best Buy manager stated, he could be fired for making a smart and profitable choice for his company. The money I was originally willing to walk away from was probably equal to a decent portion of Best Buy's average profit on a transaction of that size, but the manager might lose his job if he managed to capture that profit for his company.

Friends, we are the people making the software that makes our own lives so aggravating and stressful. Problems like this aren't exclusively Mr. BestBuy's fault, they are yours and mine, too. We need to speak up and tell the "management decision makers" of the world it is a bad idea to remove the human being from their systems. Instead, they should be placing more energy into trying to empower and support the human beings who use these systems. The computer is the last thing to blame, the fault lies with the people responsible for making the computer behave so stupidly. The fault lies with people like us.

My unexpected reward from Best Buy is increased clarity about the importance of making systems operate more adaptively. They need to allow humans to make choices which a computer cannot reasonably be expected to make. That is worth a lot more than $30, so maybe it was a good deal after all. Thanks, Best Buy!

Until next time,
Rick Ross
rick@javalobby.org
AIM or Yahoo Messenger: RickRossJL

 

RoguewaveFREE Download! HydraSDO™ for Databases

Roguewave Using a database in a SOA? Then you should be using Service Data Objects (SDO), the only industry standard API for database access in SOA. HydraSDO™ reverse engineers an entire database of any complexity in just a few minutes and produces everything you need for database access in a SOA.

Download HydraSDO for Databases

 News From the Front
 
 News from the Front
 Next section
 Back to top
Matthew Schmidt is the man behind the scenes at Javalobby. If you have questions or concerns, feel free to email him at matt@javalobby.org.

Matthew Schmidt, JavaLobby Lead DeveloperRecursion: Deceptively Complex?

Yesterday, I was working on a bit of code that required some recursion (well, two recursive methods actually).  When a problem can be solved by recursion, it usually takes me a bit of time before I can wrap my head around how simple the solution actually is.  Yes, I'm sure all you readers out there are thinking that I'm not truly l33t for not being able to whip out a recursive solution in 1.35 seconds.  Fortunately for me, I have an excuse - I've had the chance to use recursion perhaps 5 times in the last 5 years. 

Recursion can be a powerful solution, but I think for many people (myself included), it can take a little while to wrap your brain around just how it works.  For example, we had an outer loop that went through all the comments for a link at dzone.com.  That outer loop called a method which was designed to set the depth of the comment in the thread tree in relation to its ancestors.   This method that set the depth was actually a recursive method that set the current depth and then looped through the list again looking for the immediate child of the current comment and then calling itself again and again until it finished working through the links.  Now, I'll be the first to admit that this probably doesn't sound like the most efficient code the planet has ever seen, but it doesn’t overflow the stack and it gets the job done.  The whole thing (with the two loops and including comments) was about 12 lines of code.  As I said, the worst part about the whole thing was trying to understand that this mode of coding was actually going to work at all!

Exception Handling Styles
Late yesterday afternoon, an interesting post from Phil Swenson crossed the Javalobby moderation queue that we approved this morning.  Phil has been pondering the different styles that people use for handling exceptions - specifically when dealing with JDBC connections.   He has noticed that his style is much different, using a catch on the outside of all the DB opening and closing code instead of wrapping each of the individual close calls with try-catch statements.  His post has led to some interesting discussion on the different ways that people handle that particular type of code.  Many users have pointed out tools like DBUtils from Jakarta or using Spring.  Here at DeveloperZone, we've been primarily using Spring in combination with Hibernate or iBatis - which usually shields us from needing to catch all these exceptions.   I think that this type of checked exception is one of the primary reasons that people use Spring in conjunction with the various persistence layers - to hide from all this extra code bloat.   

Flat or Threaded: You Decide
As I discussed earlier in the column, I've been working with recursion the last day or so, specifically in the realm of giving users the choice of seeing the comments on the link in the context they were posted.  The problem we're having is that we're not in agreement over whether this should be the default view.  If you recall, we posed this same question to Javalobby members some months ago and eventually decided to go with a standard flat view.  What makes the decision more interesting at dzone though, is that two of the major competitors (digg and reddit) both use an indented threaded view for the comments.  In addition, both seem to take different roads.  Digg has gone with a single layer of comment threading, only letting you reply directly to top-level comments.  Reddit, on the other hand, lets you reply to each and every comment - much like a forum thread.  Personally, I feel like the threaded view is more informative when you're looking at the comments - it lets you see who has replied to whom.  What are your feelings?  When looking at a dzone link with comments (this one for example) do you like the way we have it or would you prefer it to default to the comments being threaded?  Obviously, we'll also make it be a user preference so that those who login can have it their way.  Would the flat view work better if we showed the parent message's id and gave a link to it from the child? If you have some ideas on how to improve the comments at dzone, feel free to drop me a line.

What Can You Get Done in 74 Seconds?
Since it's a bit of a rainy fall day here at DZ HQ, I thought I'd try to lighten things up with a fun little piece to end my column.  The other day, Mike Cannon-Brookes of Atlassian sent me this video link showing what a day in the life of the developers of Confluence is like.  It seems to me that more people need a "beer hour" during the day!  Watch the video, and then vote for it on dzone.

Until Next Time,
Matthew Schmidt
matt@javalobby.org
Yahoo IM: mattschmidtjl

 
 The Pulse
 
 The Pulse
 Next section
 Back to top
Erik C. Thauvin maintains a blog , as well as one of the web's first and most popular linkblogs, which he updates daily with the latest Java and technology news.

Erik C. ThauvinPicks of the Week:

Tip of the Week:

JavaScripting in Applets — Getting Out of the Sandbox

Tutorial of the Week:

Double-checked Locking and the Singleton Pattern

Notable Software Releases:

AgileWiki 3.5.0.9Apache Ant 1.7.0Beta3Aranea 1.0
Aspose.Slides for Java 1.6.13.0Aspose.Words for Java 1.0.5.0Big Faceless PDF Library 2.7.3
bluemarine 0.9.EA7.1292Coherence 3.2 Pre-Release (build 361)DBsight 1.3.3
DbVisualizer 5.1Digital Contract Project 1.4DPML Component Management SDK 1.0.3
Eclipse Google Code Search Plugin 1.0.0ESC/Java2 2.0b0GeoServer 1.4-M2-WCS
H2 Database Engine 1.0/2006-10-10Hibernate 3.2install4j 4.0.1
Jackrabbit 1.1Jagacy VT 1.0Jalopy 1.7
JAMES 2.3.0 RC5Java database PointBase 5.5Java Service Wrapper 3.2.2
Java.Inquisition 0.11JAXB 2.0.3JBoss AOP 2.0 alpha1
JBossIDE for Eclipse 2.0.0.Beta2JDatabaseImport 0.1Jdon 1.5
Jess 7.0RC3Jeti 0.7.6JGame 1.1.1
jGameBase 0.06DEV2006-10-15JNutrix 0.12JOpt.SDK Tour Solver 1.0.7
JRequire 2.0Json-lib 0.9JsTester 1.3
JTrac 2.0-RC3JyConsole 1.3MathEclipse Parser API 0.0.4
Mr. Persister 3.4.1ObjectLabKit 1.0.1OpenSign 1.5.1
PDFBox 0.7.3Penrose 1.1Powermanja alpha_3f
Ricebridge CSV Manager 1.1.11Sojo 0.1.0Sotacs 0.9
SQLiteJDBC 026Structure101 2Subversive 1.1.0 M6
Sundog Database Refactoring Tool 0.5Surface 1.8The Mango Library October 2006
The Sleep Scripting Project 2.1-b7VRaptor Eclipse Plugin 0.1.1VTD-XML 1.7
XINS 1.5.0-beta3Yet Another Freeware PDF-Composer 2.0YourKit Java Profiler 6.0-EAP-build1078
ztemplates 0.8.2

The Truth is Out There...
Erik C. Thauvin
erik@javalobby.org

 
 Popular at JL
 
 Popular at Javalobby
 Next section
 Back to top
A recap of some of the most popular and active Javalobby.org discussions this week.
Is Sun's Bug Fixing Policy a Failure or Success?

I think we all know that one of Sun's highest priorities regarding Java is compatibility and stability. Is this a strength or weakness? Click for an interesting example..

Full Discussion Posted By: Mikael Grev - (44 Replies)

Is Java Web Start under utilised ?

From a recent thread about distribution problems, I feel that many people fear using JWS. It might not be perfect but show me better ?

Full Discussion Posted By: Serge Bureau - (32 Replies)

String is not a good universal datatype

Peter Veentjer wants to make clear that using Strings as a datatype is terrible for design of objects. The development may be faster on the short run, but on the long run, a price has to be paid

Full Discussion Posted By: Matthew Schmidt - (29 Replies)

Does Groovy have any momentum?

After doing quite a bit of work with Ruby, I'm seeing a lot of the weaknesses in the traditional "Java" way of doing things. I'm curious, does Groovy have any momentum?

Full Discussion Posted By: phil swenson - (25 Replies)

Make formal parameters implicitly final

I Suggest to make the formal parameters of methods implicitly final. Ability to assign a new value to primitive or reference type formal parameter is in fact an ability to write unclear code.

Full Discussion Posted By: Nikolay Skachkov - (19 Replies)

 White Papers & Announcements
 
 White Papers
 Next section
 Back to top
Technical papers & research related to Java development.
Crystal Reports for Eclipse Developers

Crystal Reports for Eclipse is designed specifcally for Java application developers. It allows them to experience powerful, code-free reporting using a 100% pure Java report designer and engine. Developers can build new reports, access existing Crystal Reports documents, and deploy applications with Java reporting components or with the Business Objects business intelligence (BI) platform.

Download Full White Paper Posted by: Business Objects

 Product Announcements
 Next section
 Back to top
Product and service announcements for Java developers.
Java + Twain + Sane = all in Intel based MAC OS X

Morena Framework version 6.3.2 released Morena Framework - Image Acquisition Framework for Java™ Platform is able to scan images on MS Windows, MAC OS X(Power PC), MAC OS X(Intel), unix systems.

Full Announcement & Discussion Posted By: Martin Motovsky - (0 Replies)

[ANN] VTD-XML 1.7 released

The latest release of VTD-XML 1.7, the next generation XML parser that goes beyond DOM, SAX and Pull.

Full Announcement & Discussion Posted By: Jimmy Zhang - (0 Replies)

Crystal Reports for Eclipse Professional – Now Available!

Last week Business Objects launched Crystal Reports for Eclipse Professional. This release builds on the Crystal Reports for Eclipse Basic edition, available as a free download since August.

Full Announcement & Discussion Posted By: Sean Johnson - (0 Replies)

Sundog Database Refactoring Tool 0.5: Now LGPL

After several months of development, the Sundog Database Refactoring tool version 0.5 has been released. The most significant change is switching to an LGPL license

Full Announcement & Discussion Posted By: Nathan Voxland - (0 Replies)

ztemplates 0.8.2 - pojo web development

Released version 0.8.2 of ztemplates - a pojo web framework based on java 1.5 - supporting Apache Velocity, JSP and plain HttpServletResponse - data binding, form validation, security, i18n

Full Announcement & Discussion Posted By: Gerd Ziegler - (0 Replies)

Invoke JAXP with XML Hammer 1.0 beta-2

The XML Hammer application is a tool that simplifies elementary XML actions like checking for well-formedness, validation, transformation and xpath searches using any JAXP implementation.

Full Announcement & Discussion Posted By: Edwin Dankert - (0 Replies)

Can SOJO complement POJOs?

POJOs are very importend for the development. But what is with cases, where Java must communicate with "other worlds", where object orientation is not supported or is the best decision?

Full Announcement & Discussion Posted By: Linke - (2 Replies)

JTrac 2.0-RC3: Open Source issue tracker

JTrac is a highly customizable issue tracking web application written in Java using the Spring Framework, Spring WebFlow, Acegi and Hibernate. The latest release includes major feature additions.

Full Announcement & Discussion Posted By: Peter Thomas - (0 Replies)

Aspose.Cells for Java (Version: 1.7.2.0 Released)

Aspose.Cells is a Java component that supports: Importing data from JDBC ResultSet, Preserving Pictures, Charts, Macros, Formula settings, Pivot tables, Unicode, Hyperlinks, Range settings etc.

Full Announcement & Discussion Posted By: Usman - (-1 Replies)

Aspose.Words for Java (Version: 1.0.5.0 Released)

Aspose.Words is a Java component to Write, Modify and Read a Word document without using Microsoft Word.

Full Announcement & Discussion Posted By: Usman - (0 Replies)

Aspose.Pdf.Kit for Java (Version: 1.6.0.0 Released)

Aspose.Pdf.Kit is a Java component for Pdf document manipulation that allows developers to edit existing Pdf documents.

Full Announcement & Discussion Posted By: Usman - (-1 Replies)

Aspose.Pdf for Java

Aspose.Pdf is a Java Pdf component which enables you to write Pdf documents without using Adobe Acrobat.

Full Announcement & Discussion Posted By: Usman - (-1 Replies)

Aspose.Slides for Java (Version: 1.6.13.0 Released)

Aspose.Slides is a Java component to Read & Write a PowerPoint document without using MS PowerPoint.

Full Announcement & Discussion Posted By: Usman - (0 Replies)

Aspose.Metafiles for Java (Version: 1.1.3.0 Released)

Aspose.Metafiles is one of the Java components offered by Aspose for effectively managing metafiles.

Full Announcement & Discussion Posted By: Usman - (-1 Replies)

DPML Component Management SDK 1.0.3

The DPML SDK 1.0.3 (maintenance update) is available. The 1.0.3 release includes the resolution of a bug in the Transit artifact protocol handler related to the content handling implementation.

Full Announcement & Discussion Posted By: Stephen McConnell - (0 Replies)

Open Source Jdon Framework 1.5 final released

Jdon is a DDD(domain driven development) framework, we can easily and quickly develope a MDD software system. Jdon is a IOC/AOP framework, too.

Full Announcement & Discussion Posted By: banq - (0 Replies)

Non Profit 501 (c)(3) provides free secure K12 Wiki

Helping Students Education Corp., a non profit 501 (c)(3) is offering students, teachers and parents a free WIKI.

Full Announcement & Discussion Posted By: Michael Misovec - (-1 Replies)

Business-ready Java Template Toolkit for Eclipse

Component Templates for Assets and Artifacts is a Java-implemented Eclipse-based toolkit that allows developers to focus on business aspects of the development process instead of the technological.

Full Announcement & Discussion Posted By: Rebecca - (0 Replies)

Json-lib 0.9 Released

JSON-lib is a java library for transforming beans, maps and XML to JSON and back again to beans and DynaBeans. It is based on the work by Douglas Crockford in http://www.json.org/java.

Full Announcement & Discussion Posted By: Andres Almiray - (0 Replies)

Coherence 3.2 Release Candidate (build 361) is Now Available

Tangosol Coherence 3.2 Release Candidate (build 361) download is now posted. This Release Candidate build completes the Coherence 3.2 feature set and contains additional optimizations and fixes.

Full Announcement & Discussion Posted By: Michele DiSerio - (0 Replies)

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other Javalobby publications.
Manage your Javalobby membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editor@javalobby.org
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

Javalobby News is a service mark of DeveloperZone, Inc.
Copyright ©2001-2006 Javalobby, Inc.

Thank you for your continued support of Javalobby. If you prefer not to receive the Javalobby weekly newsletter, send an e-mail to unsubscribe-jlnews@javalobby.org and please ensure the actual email address to be removed is present.
Javalobby.org, 113 Legault Drive, Cary NC 27513 USA