BriteSnow / snow

A Lightweight, Google Guice, Simple, and Powerful Web Application Framework that makes building modern Web Application a breeze! Fully open source, Apache V2 licensed.
http://britesnow.com/snow
29 stars 10 forks source link

Add the ability to use hibernate.cfg.xml rather than snow.properties #39

Open imranzahid01 opened 10 years ago

imranzahid01 commented 10 years ago

Rather than using snow.properties I have modified the code to use hibernate.cfg.xml This enables IDE (like IntelliJ IDEA) to understand the persistence use. Plus there is no need to define in multiple places the properties related to hibernate. Keeps both frameworks separate.

jeremychone commented 10 years ago

Hi, this is interesting I think it is a good idea to add such support, but I would like to use this opportunity to decouple Hibernate from Snow internals.

Originally I put Hibernate in Snow for convenience, but I think it is not very clean the way Hibernate is known from the internal. A while back, I added WebApplicationHook and WebRequestHook, which I was designed to be a clean way for the Hibernate "module" to hook itself into Snow.

So, for this requirement, I am offering to update the way the hibernate snow module integrate to Snow so that it is easier to customize without changing Snow source.

What do you think?