Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CriadorDeSession {
- public static Session getSession() throws HibernateException {
- AnnotationConfiguration configuration = new AnnotationConfiguration();
- configuration.configure();
- SessionFactory factory = configuration.buildSessionFactory();
- Session session = factory.openSession();
- return session;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement