1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
package com.mycompany.hibernate;
import java.net.URL;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class HibernateUtil {
private static Log log = LogFactory.getLog(HibernateUtil.class);
private static final SessionFactory sessionFactory;
static URL url = HibernateListener.class.getResource("/hibernate.cfg.xml"); |