implemented most of the critical functions of the enrollment system : chose student major , list major core units , select unit , list student selected units
encounter some problems like trying to operate on persistence class after session closed. After some check on the internet find that the problem is that getHibernateTemplate().load() will close session after 1 conversion with the database , if we want to operate on the persistence class , we have to manually get the session and open/close tranction.
Also have a lazy initialiation problem , find 2 solutions
1, set lazy=”false”
2, explicitly initialize the associated persistence classes before load them
Advertisement