connection is closed in hibernate of jboss 7. - by gladiator67

Status : 


Sign in
to vote
ID 759691 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 8/26/2012 9:29:54 PM
Access Restriction Public


I developed Azure Cloud Service with JBoss 7 and Hibernate. In SQL Azure 'allowed IP' page I typed in the client ip of my pc and build was successful and there was no error in running on the azure emulator. But publishing the azure project on Windows Azure Cloud Services was failed. In the 'allowed IP' page I inserted the public virtual ip address and checked 'Allowed Windows Azure Services'. But connection to My SQL Azure was failed. The Exception message is
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: The connection is closed

I think this is bug of SQL Azure. It seems that SQL Server in SQL Azure closes arbitrarily the connection during the 30~40 minutes lasting deployment. So aftrer deploying, when the hibernate tries to connect to sql server, sql server throws the above exception. But another client having different ip can connect to the sql azure successfully.
Sign in to post a comment.
Posted by Microsoft on 4/4/2013 at 7:33 PM

In fact, Azure SQL Database closes active idle connections after 30 minutes, which explains the issue you are facing right now. Now, we have customers using JDBC to connect to SQL Database with no issues. From a Hibernate standpoint, I'm not aware of any issue, but we also do not know Hibernate in order to comment how it uses and configures the connection.

Since we do not know the internals of Hibernate, I'll close this issue as Not Repro. If you are blocked by this issue, feel free to reopen it or contact our support.


Luiz Santos
Sr. PM