agave-common/common-core/src/main/java/org/iplantc/service/common/dao/DiscoveryServiceDao.java
/**
	 * Deletes a discoverableService from the db.
	 * @param discoverableService
	 * @throws ServiceDiscoveryException
	 */
Deletes a discoverableService from the db.
@param discoverableService
@throws ServiceDiscoveryException
Deletes a discoverableService from the db . @param discoverableService @throws ServiceDiscoveryException
public <T extends DiscoverableService> void delete(T discoverableService) throws ServiceDiscoveryException
	{
		if (discoverableService == null)
			throw new ServiceDiscoveryException("DiscoveryService cannot be null");
		try
		{
			Session session = getSession();
			session.clear();
			session.delete(discoverableService);
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Throwable e) {}
			throw new ServiceDiscoveryException(ex);
		}
		finally {
			try { HibernateUtil.commitTransaction();} catch (Exception e) {}
		}
	}
public < T extends DiscoverableService > void delete ( T discoverableService ) throws ServiceDiscoveryException { if ( discoverableService == null ) throw new ServiceDiscoveryException ( "DiscoveryService cannot be null" ) ; try { Session session = getSession ( ) ; session . clear ( ) ; session . delete ( discoverableService ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Throwable e ) { } throw new ServiceDiscoveryException ( ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Deletes a discoverableService from the db.
Deletes a discoverableService from the db .