deixei o servidor do banco não inicializado
e chamei uma rotina pra acesso ao banco
e verifiquei que demorou 3 minutos pra retornar o erro …
Minha duvida demora mesmo assim ??? ou estou fazendo algo errado ???
se alguém puer me ajudar …
abs
Inico ...testCount() .. 20/01/2009 18:28:03
18:29:07,516 WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@23f1bb -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
18:31:09,479 ERROR JDBCExceptionReporter:78 - Connections could not be acquired from the underlying database!
Erro testCount() =20/01/2009 18:31:09 Erro= javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
[code}
public static EntityManagerFactory create() {
try{
if (emf == null)
emf = Persistence.createEntityManagerFactory("banco");
}catch(Exception e){
System.out.println("Não conseguiu acessar o Banco no metodo create() "+e);
}
return emf;
}
public EntityManager getManager() {
try{
emf = create();
em = emf.createEntityManager();
}catch(Exception e){
System.out.println("Não conseguiu acessar o Banco no metodo getManager() "+e);
}
return em;
}
[/code]