stò implementando un programma vekkio k aveva un database (mysql) e usava le factory in hibernate cn le varie librerie (org.hibernate.ecc)....adesso qst stesso programma avrebbe un database in derby però per le sessioni e factory varie non riesco a trovare la maniera o i file per implementare qst metodi nella piattaforma di eclipse (3.3)


un pezzo di codice è qst (in rosso sn gli errori) :

package azienda.dao.hibernate;

import org.hibernate.Session ;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;

/**
*
* @author user
*/
public class HibernateUtils {
private static SessionFactory factory =
new AnnotationConfiguration().configure("hibernate.cfg.xml").
buildSessionFactory();

public static Session openSession()
{
return factory.openSession();
}

}