Meaningless Drivel is fun!
The moose likes Object Relational Mapping and the fly likes Hibernate ORM with DB2/400 on AS/400 (iSeries) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate ORM with DB2/400 on AS/400 (iSeries)" Watch "Hibernate ORM with DB2/400 on AS/400 (iSeries)" New topic

Hibernate ORM with DB2/400 on AS/400 (iSeries)

Jeevan Sunkersett
Ranch Hand

Joined: Jul 03, 2007
Posts: 78

I want a bit of advice.

My current project involves a legacy modernization - the current app is developed on AS/400 (iSeries) using the DB2/400 database (operating system: OS/400)

My to-be system: A modern j2EE based application, with a browser based UI, utilizing jQuery, Spring MVC, coupled with Spring POJO and Hibernate ORM

However my client has made substantial investment in hardware and so wants to retain the AS/400 machine and wants the new modern application on the same DB2/400 database.

(the application server, would be: IBM WebSphere 6.x or whichever is latest)

I chanced across some old posts, in which the writer has expressed problems when using Hibernate with DB2/400 (which is normally non-journaled in production)

( )
( )

I had thought, Hibernate was database independent; simply change the dialect and it can work with "any" database.

But these posts have left me thinking -
* these posts are pretty old (5 year old), so does the same still hold true?
* given these findings, I have a serious doubt - should or should-I-not adopt Hibernate, for my migration project; if not what ORM can I use?

Please advise.


Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

I didn't go and read those posts because I assumed you were going to ask a direct question. So let me just say that yes, you do have to journal files on the IBM i if you want to access them via Hibernate. If they aren't journalled right now -- a likely situation for old systems -- then your first step is to start journalling them.

As for whether you should use Hibernate, that isn't a question that can be answered without a lot of inquiry into the background of the project. All we know is the environment you propose to run your application in. It is possible to use Hibernate on IBM i, I've seen it done and at any rate there wouldn't be an AS400Dialect if you couldn't.

However one of your mandates is to build a "modern" application. That implies that your database updates should use transactions, and that implies you'll have to journal the tables anyway.
Jeevan Sunkersett
Ranch Hand

Joined: Jul 03, 2007
Posts: 78
Thank you Paul.

My client reverted with a specific questions .... please can you help?

For Hibernate to work, do you need both before and after image for the journaled files?

Please can you help me answer that?

I agree. Here's the link:
subject: Hibernate ORM with DB2/400 on AS/400 (iSeries)
It's not a secret anymore!