- This topic has 2 replies, 3 voices, and was last updated 19 years ago by Brian Fernandes.
-
AuthorPosts
-
everbrightMemberHi,
I’m using MyEclipse 4.1 M1. I’m trying out the new Spring-Hibernate integration feature, when I encountered this possible bug:
Here’s what I did:
1. Added Spring capabilities to my web project.
2. Add Hibernate capabilities. I chose to use Hibernate configuration file, instead of the Spring one.The set-up was successful, except for one thing:
A Hibernate SessionFactory is generated (not sure why I need this for, since Spring will handle the session factory anyway?).
When I checked the source for this class, the CONFIG_FILE_LOCATION is set to the Spring configuration file location, instead of the hibernate one (hibernate.cfg.xml).Is this a bug, or am I mis-configuring something here?
Thanks!
P.S. I think this Spring-Hibernate integration feature is GREAT! 🙂 🙂
Riyad KallaMemberThank you for your feedback, I forwarded this off to one of the devs that worked on it to see if they can work with you on this.
Brian FernandesModeratoreverbright,
I assume you’re talking about the HibernateSessionFactory class that we generate at the last step of the hibernate capability wizard?
You make a good point about it not being required if you’re managing your project with spring – but perhaps a user might want to use hibernate without spring just for testing / debugging? That’s why we don’t enforce the generation of that class (you can choose not to generate it)Having said that, for the steps you outlined, CONFIG_FILE_LOCATION shoud certainly point to hibernate.cfg.xml and not your spring config fie. I tried this out and it worked for me – it pointed to the hibernate.cfg.xml file as expected. When you chose to use the hibernate configuration instead of Spring, did you create a new config file or point the wizard to an existing file? Also, can you check your project properties and see if the MyEclispe-Hibernate page indicates the hibernate.cfg.xml file and not the spring beans config as the Active Config File?
Finally, we’re really glad you like Spring-Hibernate so far. There is more to come but we we certainly welcome feedback from our users on how our exsisting support can be improved and we’re always on the lookout for new feature ideas in this area. If you have any suggestions on how a Spring-Hibernate feature will make your Spring-Hibernate coding easier, do let us know.
Best regards,
Brian. -
AuthorPosts