agave-monitors/monitors-core/src/main/java/org/iplantc/service/monitor/dao/MonitorCheckDao.java
/**
	 * Deletes a monitor
	 * 
	 * @param monitor
	 * @throws MonitorException
	 */
Deletes a monitor

@param monitor
@throws MonitorException
Deletes a monitor @param monitor @throws MonitorException
public void delete(MonitorCheck monitor) throws MonitorException
	{
		if (monitor == null)
			throw new MonitorException("MonitorCheck cannot be null");
		try
		{
			HibernateUtil.beginTransaction();
			Session session = HibernateUtil.getSession();
			session.clear();
			session.delete(monitor);
			session.getTransaction().commit();
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception ignored) {}
			throw new MonitorException("Failed to delete monitor check", ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception ignored) {}
		}
	}
public void delete ( MonitorCheck monitor ) throws MonitorException { if ( monitor == null ) throw new MonitorException ( "MonitorCheck cannot be null" ) ; try { HibernateUtil . beginTransaction ( ) ; Session session = HibernateUtil . getSession ( ) ; session . clear ( ) ; session . delete ( monitor ) ; session . getTransaction ( ) . commit ( ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception ignored ) { } throw new MonitorException ( "Failed to delete monitor check" , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception ignored ) { } } }
Deletes a monitor
Deletes a monitor