开发者

Hibernate: memory issues? disadvantages?

Im working with Hibernate 3.6 and until today I couldnt find any disadvantages of using it. But today someone told me that applications using Hibernate will get memory problems when the project gets bigger. This would happen because there would be a lot of objects (hibernate-pojo-objects) which will need to be created and stored, compared to a application which doesnt use hibernate.

is that correct? and are there any more disadvantages of using hibernate? some also told me that working with the objects becomes confusing when the database is really big because of all the dependencies betw开发者_开发问答een the objects, but I cant really imagine it. has anybody some experiences with this?

thanks :-)


Some of them are :

  • Little or no capabilities for remote access and distributability.
  • Mapping schemas can be tedious and O/R mapping has its tricks like using lazy initialization, eager loading etc. What works for one may not work for another.
  • Limited clustering capabilities.
  • Large data sets can still cause memory issues.
  • Support for security at a database level only and no support for role based security without any add on APIs like Aspect Oriented Programming etc.

Some other people also think that there are disadvantages for Hibernate.


Whenever you add a layer of abstract it has to do extra work and use extra memory to do it. If it uses extra memory, you may need to increase your maximum heap size or buy extra memory which is usually cheap compared to the cost of developer even if those controlling the budgets don't see it that way. This may still cost you less than the development time it save you. Only you can decide if this is worth it.


You might find this presentation from PGCon interesting:

To ORM or not to ORM

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜