Created
November 9, 2011 18:49
-
-
Save marasergio/1352494 to your computer and use it in GitHub Desktop.
Testando configuração - Hibernate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package configuracao; | |
import org.hibernate.Session; | |
/** | |
* | |
* @author Mara | |
*/ | |
public class TestaHibernate { | |
public static void main(String[] args) { | |
/* instancie um obejto do tipo session para receber a conexao aberta | |
* chamamos o metodo getSessionFactory da classe hibernateUtil | |
* e abrimos a sessão para manipular os dados | |
*/ | |
Session session = HibernateUtil.getSessionFactory().openSession(); | |
System.out.println("Iniciado com Sucesso"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment