public static void commitTransaction() throws RepositoryException {
// Boolean needed = (Boolean)commitNeeded.get();
// if (needed.booleanValue()){
Transaction tx = (Transaction) HibernateUtil.threadTransaction.get();
try {
if ( ( tx != null ) && !tx.wasCommitted() && !tx.wasRolledBack() ) {
if ( HibernateUtil.debug ) {
HibernateUtil.log.debug( Messages.getInstance().getString( "HIBUTIL.DEBUG_COMMIT_TRANS" ) ); //$NON-NLS-1$
}
tx.commit();
}