Archive

Archive for November, 2008

Calling an Oracle Stored Procedure from Hibernate

November 26th, 2008

After looking at several posts on the Internet that had various degrees of correctness we finally got this to work. So I thought it would be good to share. In the specific case we were using a stored procedure to access a sequence number (yes, it is outside of Hibernate’s cachable domain).

First, we place the stored procedure definitions inside of a new mapping file:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<sql-query name="getNextSequence" callable="true">
<return-scalar column="NextVal" type="integer"/>
{ call get_next_sequence(?,:tableName) }
</sql-query>
</hibernate-mapping>

Notes:
- the first argument of the stored procedure is actually an OUT parameter from Oracle.
- the actual name of the output ‘column’ must be specified in the return-scalar field

Then the Java code becomes pretty standard:

Session session = TestHibernateSessionFactory.getSession();
Query query = session.getNamedQuery("getNextSequence");
query.setString("tableName", "Table_X");
Object result = query.uniqueResult();
System.out.print(result);

Uncategorized

bannar design with flash effacts

November 25th, 2008

bannar design with flash effacts by EnjazTech
http://www.getafreelancer.com/projects/xxxx
Hello , We need a flash bannar with our logo. Our logo must be with perfect and profissional flash effact with new idea. The bannar should be related to the high tech , because we are related to hosting , programming and sms comunecations… (Budget: $30-250, Jobs: Flash, Graphic Design, Photoshop)
Tue, 25 Nov 2008 03:16:47 -0500
GetAFreelancer.com_project_xxxxx
Flash
Graphic Design
Photoshop

—-

After dealing with this company you then get a whole $30 for your efforts, most of the work sounds like teaching them to speak English.

Uncategorized

We’re a Rational Shop

November 24th, 2008

We are well into a coding phase.  The plan had been to get CruiseControl.  We definitely need some tool to automate the build, regression, unit test process.  Surprise, we aren’t getting CruiseControl, we are going to use Rational Build Forge.  Appears to be an pretty good product.  Lots of features, runs everywhere, etc…

My only qualm is we have been using ClearCase, another Rational product, for version control.  This has been less than stellar to the extreme issues of Blue Screens of Death during regular use.  Again, the Rational product versus Subversion, which I think the rest of the industry has been using without a hitch for years.

Just out of curiosity I poked at the pricing for Build Forge: $165,000 for the server and additional fees for groups of user licenses!

I was always curious how software tool companies have survived in this era of open source.  I think in most cases there is a good alternative free tool that probably works better (svn vs. clearcase, cruise control vs build forge, …)  Now it is clear:  The larger shops have bought into the commercial products over a period of many years and like anything else, are loathe to change the way they do business even though everyone involved probably agrees it would be a good idea to change.

Uncategorized

Which is worse?

November 20th, 2008

I heard about a big software project that took a couple of dozen developers a few years to build.  The project had difficult security requirements that ended up having a login take over an hour to accomplish due to all of the verification between systems that had to occur.

The team went into a client review cycle knowing this was a big problem.  The client sat through the entire presentation and demonstration without a question.  Always a bad sign.

As the meeting was closing and everyone was gathering up their things one of the developers asked if the login time was a high priority or not.  (Duh!)

The client lead, while still gathering their things and not even looking up, said, “No.  We have a contract.  We will pay you for the software.  But, we are going to use something else anyway.”

Uncategorized ,

I Don’t Have an Ego

November 7th, 2008

Microsoft CEO Steve Ballmer said emphatically that his company will not make a renewed bid for Yahoo. His comments come after Yahoo CEO Jerry Yang said yesterday that Yahoo, which spent months dodging Microsoft’s bid, is now their best option.

Yang said he remains open to selling Yahoo at the right price, adding “people who know me know I don’t have an ego about remaining independent versus not remaining independent.” Ballmer left room open for future partnerships based on the two companies’ search engines, but was definitive on the point that Microsoft does not plan to acquire Yahoo.

With no Microsoft bid in sight and its Google partnership dead on arrival, Yahoo has reached what many analysts conclude is a strategic dead-end.

Why are Yahoo shareholders so in love with this guy?

Uncategorized ,

Did you hear me?

November 6th, 2008

Another contractor I know has been having a hard time.  Lots of experience in a team with very little experience.  Ok. Project lead has little experience and gets annoyed at the developer for proposing solutions or changes.  Not Ok.

I know there are lots of openings where he is working so suggested moving to another project.

He took the advice, waited for a milestone, and said something like “We are at a good breaking point.  I don’t think my contributions have been inline with the team.  Maybe it’s time for me to move on?”.  They said thank you for your idea.  Get back to work (not really).

Next day, team management calls him in and says “We would like you to take over architecture for the product.  This will entail much detailed interaction with the team lead.”

WTF?

Uncategorized

Why do New things break Old things?

November 5th, 2008

For one of my clients a certain feature was broken that had been working fine for months.  My initial reaction was that the front-end changed.  Upon testing I tracked it down to a session variable no longer being set during login.  It turns out in the conversion from username/password to SSO a number of session variables were no longer being set.

For another situation a database job that had been running for some time on the first of the month apparently stopped working.  Upon investigation, the job had been completely removed from the system.  This was done when another client’s data was moved onto the database server.

In both cases New things, that are good ideas, were implemented in such a slipshod manner that existing, functional aspects were trashed.

Thinking about this some it seems like this is a very common occurrence: the developer of the New thing has the priority of getting the New thing done.  Old things take a distant second in anyones mind - developer, pm, client - anyone.

I know you can use a regression test suite to verify you didn’t break something, but this is an afterthought.  It is not in the developer’s frame of mind to determine what else might be affected by the New thing.  From my own experience if you happen to think of side effects you get looked at with squinted eye, not a team player, naysayer, problem child.

Further, fixing the broken Old thing after the fact is also looked at as a good thing.  “Yes, we fixed the Old thing.  It turns out the New thing broke it.”  Everyone is happy that the Old thing got fixed.  No one asks why this wasn’t discovered beforehand.

You can see this on software developer web sites.  Everyone can develop something New for you.  Or even more interesting they can debug your code or evaluate your system performance.  No one is advertising they will maintain your current system.  System maintenance is not valued.

Maybe this is just a trickle-down of the quarterly hockey stick affect working into how things get coded.  Imagine that, developers modeling their behavior after sales people.

Uncategorized