Package org.jasig.portal.concurrency

Examples of org.jasig.portal.concurrency.CachingException


* @param entity the entity to be added to the cache.
*/
public void add(IBasicEntity entity) throws CachingException
{
    if ( ! this.getEntityType().isAssignableFrom(entity.getEntityIdentifier().getType()) )
        { throw new CachingException("Problem adding " + entity + ": entity type is incompatible with cache.");}

    getCache().put(entity.getEntityIdentifier().getKey(), entity);
}
View Full Code Here


private void initializeEntityType(Class type) throws CachingException
{
    try
        { EntityTypes.addIfNecessary(type, "Added by ReferenceEntityCache"); }
    catch (Exception ex)
        { throw new CachingException("Problem adding entity type " + type, ex); }
}
View Full Code Here

          SequenceGenerator.instance().getNextInt(CACHE_ID_SEQUENCE);
    }
    catch (Exception ex)
    {
        log.error(ex.getMessage(), ex);
        throw new CachingException(ex);
    }
}
View Full Code Here

    if ( factoryName == null )
    {
        eMsg = "EntityCachingService.initialize(): No entry for org.jasig.portal.concurrency.caching.IEntityCachingServiceFactory in portal.properties.";
        log.error( eMsg);
        throw new CachingException(eMsg);
    }

    try
    {
        IEntityCachingServiceFactory cachingServiceFactory =
            (IEntityCachingServiceFactory)Class.forName(factoryName).newInstance();
        cache = cachingServiceFactory.newCachingService();
    }
    catch (Exception e)
    {
        eMsg = "EntityCachingService.initialize(): Problem creating entity caching service...";
        log.error( eMsg, e);
        throw new CachingException(eMsg, e);
    }
}
View Full Code Here

        else
            { primAdd(cachedEnt, conn); }
    }

    catch (SQLException sqle)
        { throw new CachingException("Problem adding " + cachedEnt, sqle); }

    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here

        }
        finally
            { if ( stmnt != null ) stmnt.close(); }
    }
    catch (SQLException sqle)
        { throw new CachingException("Problem deleting locks", sqle); }

    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here

        conn = RDBMServices.getConnection();
        primDeleteBefore(expiration, conn);
    }

    catch (SQLException sqle)
        { throw new CachingException("Problem deleting invalid entities", sqle); }
    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here

            int rc = ps.executeUpdate();
            if ( rc != 1 )
            {
                String errString = "Problem adding " + ent;
                log.error( errString);
                throw new CachingException(errString);
            }
        }
        finally
            { if ( ps != null ) ps.close(); }
    }
View Full Code Here

            { stmnt.close(); }
    }
    catch (SQLException sqle)
    {
        log.error(sqle, sqle);
        throw new CachingException("Problem retrieving Invalid Entities", sqle);
    }

    return ((CachedEntityInvalidation[])entities.toArray(new CachedEntityInvalidation[entities.size()]));
}
View Full Code Here

            int rc = ps.executeUpdate();
            if ( rc != 1 )
            {
                String errString = "Problem updating " + ent;
                log.error( errString);
                throw new CachingException(errString);
            }
        }
        finally
            { if ( ps != null ) ps.close(); }
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.concurrency.CachingException

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.