• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When to use hibernate ?

 
James Clarke
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a few hundred lines of code which read messages from a messaging system that uses UDP protocol and is a high volume, low latency system.
The messages are parsed and the data persisted to a database using a single insert statement.

Is it worth using hibernate in this situation ? I personally do not think so since theres only one insert statement and the overhead of loading up all the libraries required by Hibernate itself will be a performance hit.

Any thoughts, ideas appreciated.

Thanks,

J.C
 
Bhagat Singh Rawat
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Clarke wrote:Hi all,

I have a few hundred lines of code which read messages from a messaging system that uses UDP protocol and is a high volume, low latency system.
The messages are parsed and the data persisted to a database using a single insert statement.

Is it worth using hibernate in this situation ? I personally do not think so since theres only one insert statement and the overhead of loading up all the libraries required by Hibernate itself will be a performance hit.

Any thoughts, ideas appreciated.

Thanks,

J.C


You think perfectly correct I would say. For only insert statement, hibernate wouldn't be good pick. Hibernate is basically to play around database through java objects like transactions, caching, mapping etc. Also to use the object oriented features on database side (For Example: Inheritance Mapping). From my point of view you should used JDBC API for simple insert instead Hibernate.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic