agave-notifications/notifications-core/src/main/java/org/iplantc/service/notification/dao/NotificationDao.java
/**
	 * Saves or updates the {@link Notification}
	 * @param notification the notification to persist
	 * @throws NotificationException when an exception occurs
	 */
Saves or updates the  Notification
@param notification the notification to persist
@throws NotificationException when an exception occurs
Saves or updates the Notification @param notification the notification to persist @throws NotificationException when an exception occurs
public void persist(Notification notification) throws NotificationException
	{
		if (notification == null)
			throw new NotificationException("Notification cannot be null");
		try
		{	
			Session session = getSession();
			session.saveOrUpdate(notification);
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception ignored) {}
			throw new NotificationException("Failed to save notification", ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception e) {e.printStackTrace();}
		}
	}
public void persist ( Notification notification ) throws NotificationException { if ( notification == null ) throw new NotificationException ( "Notification cannot be null" ) ; try { Session session = getSession ( ) ; session . saveOrUpdate ( notification ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception ignored ) { } throw new NotificationException ( "Failed to save notification" , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }
Saves or updates the {@link Notification}
 @param notification the notification to persist
 @throws NotificationException when an exception occurs
Saves or updates the { @link Notification } @param notification the notification to persist @throws NotificationException when an exception occurs
//			session.clear();