Package org.pentaho.cdf

Examples of org.pentaho.cdf.PluginHibernateException


        Thread.currentThread().setContextClassLoader( PluginHibernateUtil.class.getClassLoader() );
        PluginHibernateUtil.sessionFactory = PluginHibernateUtil.getConfiguration().buildSessionFactory();

      } catch ( Exception ex ) {
        logger.warn( "Error building session factory " + Util.getExceptionDescription( ex ) ); //$NON-NLS-1$
        throw new PluginHibernateException( "Error building session factory", ex ); //$NON-NLS-1$
      } finally {
        Thread.currentThread().setContextClassLoader( contextCL );
      }
    }
  }
View Full Code Here


      }
      PluginHibernateUtil.threadSession.set( s );

    } catch ( HibernateException ex ) {
      logger.warn( "Error creating session " + Util.getExceptionDescription( ex ) ); //$NON-NLS-1$
      throw new PluginHibernateException( "Error creating session", ex ); //$NON-NLS-1$
    }
    return s;
  }
View Full Code Here

    try {
      Session s = PluginHibernateUtil.getSession();
      s.flush();
    } catch ( HibernateException ex ) {
      logger.warn( "Error flushing session " + Util.getExceptionDescription( ex ) ); //$NON-NLS-1$
      throw new PluginHibernateException( "Error flushing session", ex ); //$NON-NLS-1$
    }
  }
View Full Code Here

      PluginHibernateUtil.threadTransaction.set( null );
    } catch ( HibernateException ex ) {
      PluginHibernateUtil.threadTransaction.set( null );

      logger.warn( "Error closing session " + Util.getExceptionDescription( ex ) ); //$NON-NLS-1$
      throw new PluginHibernateException( "Error closing session", ex ); //$NON-NLS-1$

    }

  }
View Full Code Here

      IBasicFile commentsHbmFile =
          CdfEngine.getEnvironment().getHibernateConfigurations().getCommentsConfigurationFile();

      if ( commentsHbmFile == null || commentsHbmFile.getContents() == null ) {
        logger.error( "Unable to find comments hbm file" );
        throw new PluginHibernateException( "Unable to find comments hbm file", null );
      }

      // Close session and rebuild
      PluginHibernateUtil.closeSession();
      PluginHibernateUtil.getConfiguration().addInputStream( commentsHbmFile.getContents() );
      PluginHibernateUtil.rebuildSessionFactory();

    } catch ( Exception e ) {
      logger.error( "Unable to initialize comments engine", e );
      throw new PluginHibernateException( "Unable to initialize comments engine", e );
    }
  }
View Full Code Here

      // Get storage hbm file
      IBasicFile storageHbmFile = CdfEngine.getEnvironment().getHibernateConfigurations().getStorageConfigurationFile();

      if ( storageHbmFile == null || storageHbmFile.getContents() == null ) {
        logger.error( "Unable to find storage hbm file" );
        throw new PluginHibernateException( "Unable to find storage hbm file", null );
      }

      // Close session and rebuild
      PluginHibernateUtil.closeSession();
      PluginHibernateUtil.getConfiguration().addInputStream( storageHbmFile.getContents() );
      PluginHibernateUtil.rebuildSessionFactory();

    } catch ( Exception e ) {
      logger.error( "Unable to initialize storage engine", e );
      throw new PluginHibernateException( "Unable to initialize storage engine", e );
    }
  }
View Full Code Here

        PluginHibernateUtil.sessionFactory = PluginHibernateUtil.getConfiguration().buildSessionFactory();
      }
      catch (Exception ex)
      {
        logger.warn("Error building session factory " + Util.getExceptionDescription(ex)); //$NON-NLS-1$
        throw new PluginHibernateException("Error building session factory", ex); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

    }
    catch (HibernateException ex)
    {
      logger.warn("Error creating session " + Util.getExceptionDescription(ex)); //$NON-NLS-1$
      throw new PluginHibernateException("Error creating session", ex); //$NON-NLS-1$
    }
    return s;
  }
View Full Code Here

      s.flush();
    }
    catch (HibernateException ex)
    {
      logger.warn("Error flushing session " + Util.getExceptionDescription(ex)); //$NON-NLS-1$
      throw new PluginHibernateException("Error flushing session", ex); //$NON-NLS-1$
    }
  }
View Full Code Here

    catch (HibernateException ex)
    {
      PluginHibernateUtil.threadTransaction.set(null);

      logger.warn("Error closing session " + Util.getExceptionDescription(ex)); //$NON-NLS-1$
      throw new PluginHibernateException("Error closing session", ex); //$NON-NLS-1$

    }


View Full Code Here

TOP

Related Classes of org.pentaho.cdf.PluginHibernateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.