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.