Example usage for org.hibernate.testing ServiceRegistryBuilder destroy

List of usage examples for org.hibernate.testing ServiceRegistryBuilder destroy

Introduction

In this page you can find the example usage for org.hibernate.testing ServiceRegistryBuilder destroy.

Prototype

public static void destroy(ServiceRegistry serviceRegistry) 

Source Link

Usage

From source file:org.infinispan.test.hibernate.cache.commons.tm.JBossStandaloneJtaExampleTest.java

License:LGPL

@After
public void tearDown() throws Exception {
    try {/*from   w  w w . ja va  2  s  . com*/
        unbind("UserTransaction", ctx);
        unbind("java:/TransactionManager", ctx);
        ctx.close();
        jndiServer.stop();
    } finally {
        if (serviceRegistry != null) {
            ServiceRegistryBuilder.destroy(serviceRegistry);
        }
    }
}