facebook

Problem with Spring-Hibernate configuration (ME 4.1 M1)

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #241275 Reply

    everbright
    Member

    Hi,

    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! 🙂 🙂

    #241322 Reply

    Riyad Kalla
    Member

    Thank 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.

    #241333 Reply

    Brian Fernandes
    Moderator

    everbright,

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Problem with Spring-Hibernate configuration (ME 4.1 M1)

You must be logged in to post in the forum log in