File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which tool to use

 
M Mehta
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are in the initial phase of creating a new java application. Confused on which tool to use for database interaction - Hibernate or iBatis. The application will be having some web services which will fetch data from a few huge databases and then after processing this data will return results.

I have seen a similar application working with a similar database using hibernate. Its deployed on WAS. The search queries usually fetch data with about 5000 or more rows. The queries often hang and time out. I have been asked to explore if using iBatis will increase the performance or not.

Thanks,
Me

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The queries often hang and time out

If I were seeing queries hang I'd be checking the database first.

iBatis and Hibernate are both ORMs. If your performance problem is not the database but memory, then swapping ORMs is unlikely to help at all. I'd recommend working out what is causing your performance problem first.
 
M Mehta
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul for the reply..

I have checked the query being generated by hibernate and tried to optimize it using SQL optimizer. But it seems that the query being generated is already the optimized one. The cause of low performance is that the tables being queried have huge amount of data and there are a lot of outer joins in the query which is due to functionality required. However, still the query takes lesser time when run directly on the database through sql developer.

To know the cause of more time taken through hibernate, I enabled the debug level for hibernate and found that while the query takes some time in running , more time goes in loading the value objects which mapped to the queried tables. So I am curious to know if using iBatis will improve the performance or not.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that's the problem then probably not. ORMs need to load data - they are not good choices for bulk operations, if that is what you are trying.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic