Reputation: 251
I have an existing Java application which uses Hibernate with DB2. My application has 40-45 tables in DB2.
We are planning to replace DB2 with SAP-HANA. In that case I would like to know your opinion on the following items:
Is there Hibernate support with HANA? If yes, how stable is it for mid size Java application?
What all roadblocks/ risks one should consider in migration?
Any documentation or example for reference?
Please provide your recommendations.
Upvotes: 6
Views: 4850
Reputation: 484
Yes, it is supported. There is a Hibernate dialect for HANA available from version 4.3.0.CR1 (current stable is 4.3.5). From my personal experience, Hibernate and the dialect itself is stable, but you could have problems during the migration because some features are not supported by HANA, not by Hibernate. E.g., Auto increment is not supported, you are expected to use sequences instead. See optimise Hibernate Sequence ID generation.
Besides HANA specifics like lack of auto increments, you could have complications with low insert speed into HANA when using Hibernate. The speed could, however, be increased by tuning batch size in the persistance.xml, e.g.
<property name="hibernate.jdbc.batch_size" value="5000"/>
Documentation is available here: http://help.sap.com/hana_platform
As a general notice, I would say that SAP HANA became much more stable within last year or two. However, I would still have a data replica or backup in the other database, and use HANA mainly for very fast analytics and queries, that are really a very strong side of HANA.
The migration process depends on each particular case. It could be painful, or it could be very easy. Generally, I think that it is almost always possible to find a workaround for any migration problem.
Upvotes: 6