/**
* HibernatePlugin
- * @version $Id: HibernatePlugin.java,v 1.2 2003/09/18 21:42:17 idfx Exp $
+ * @version $Id: HibernatePlugin.java,v 1.4 2003/12/20 20:27:09 idfx Exp $
* @author idefix
*/
public class HibernatePlugin implements PlugIn {
+ private SessionFactory factory;
/**
* @see org.apache.struts.action.PlugIn#destroy()
*/
public void destroy() {
+ if(factory != null){
+ try {
+ factory.close();
+ } catch (HibernateException e) {
+ e.printStackTrace();
+ }
+ }
}
/**
*/
public void init(ActionServlet actionServlet, ModuleConfig config)
throws ServletException {
- try {
+ //BasicConfigurator.configure();
+ try {
SessionFactory factory =
new Configuration().configure().buildSessionFactory();
actionServlet.getServletContext()