Java 类org.hibernate.service.spi.Stoppable 实例源码

项目:lams    文件:AbstractServiceRegistryImpl.java   
@Override
public <R extends Service> void stopService(ServiceBinding<R> binding) {
    final Service service = binding.getService();
    if ( Stoppable.class.isInstance( service ) ) {
        try {
            ( (Stoppable) service ).stop();
        }
        catch ( Exception e ) {
            log.unableToStopService( service.getClass(), e.toString() );
        }
    }
}
项目:lams    文件:BootstrapServiceRegistryImpl.java   
@Override
public <R extends Service> void stopService(ServiceBinding<R> binding) {
    final Service service = binding.getService();
    if ( Stoppable.class.isInstance( service ) ) {
        try {
            ( (Stoppable) service ).stop();
        }
        catch ( Exception e ) {
            LOG.unableToStopService( service.getClass(), e.toString() );
        }
    }
}