Pencils Down

This weblog is about my experiences in software development

Browsing Posts published in June, 2009

We have several wizards in the application we are developing under JBoss/icefaces/Spring.  We had decided some time ago to provide long running sessions to allow the user to move between wizard screens and then finalize (commit) later in time.

This all works pretty well until you get to a delete operation where there is some non-primary constraint involved.  The typical culprit is a unique ‘name’ for an object.  As you all know Hibernate takes all of the underlying SQL operations and lines them up in roughly the order of INSERT, UPDATE and then the DELETEs.  (There are a few other cases that do not apply here).

So, in a wizard if the user does something that boils down to add a thing called X, delete a thing called X and then add a thing called X again – your app will die.  Using the above Hibernate ordering you end up with INSERT X, INSERT X, and DELETE x throwing a constraint violation exception.

We have played with a few ideas here but none of them ‘feel’ like we are using Hibernate correctly:

  • Don’t delete, just mark the record – doesn’t solve the unique constraint
  • Cache deletes by hand – painful coding
  • Delete forces a flush – violates the whole point of the long transaction/session

Leaning towards the last one now, but client may want #2.

This lovely, intuitive message from icefaces means you are doing something interesting on the page in question.  In our case it was a simple redirect to another page based on state.

The solution is to use the push server from icefaces 1.8.  The servlet changes the mechanism used for communicating with the backend and indirectly fixes the above ‘error’.

I guess I never liked this.  I always thought your conscientious manager would evaluate your work and reward accordingly.  Now, I wonder if this has ever been the case.

In a large company even the lowliest manager is pulled constantly in other directions to the detriment of the project, priorities become fluid, interactions with the team and/or it’s product became less and less tangible.  So, in this case, there is no way anyone is noticed unless they whine.

Hence my working in smaller companies several times over the years.  This is a less obvious.  The manager in a small company is usually wearing many hats and is pulled in so many directions on a constant basis that you have the same level of indirect acquantance with how things really work or any individual’s achievements.

When someone is boasting it’s so blatantly obvious and putrid that you can’t help reach for the barf bag.  However, it appears to ‘work’.

Currently at the larger company there are several people (whom I know are at the top of the salary range) who are constantly boasting/bragging/complaining loudly about the most trivial aspects of their work load.  I think this behavior is being rewarded with regularity.  Hence their range and title.

I feel like I am trading my soul for a few pieces of silver.