Package org.apache.torque

Examples of org.apache.torque.TorqueException


                    cache.remove(key);
                }
            }
            catch (CacheException ce)
            {
                throw new TorqueException
                    ("Could not remove from cache due to internal JCS error",
                     ce);
            }
        }
        return oldOm;
View Full Code Here


    protected Persistent putInstanceImpl(Serializable key, Persistent om)
        throws TorqueException
    {
        if (getOMClass() != null && !getOMClass().isInstance(om))
        {
            throw new TorqueException(om + "; class=" + om.getClass().getName()
                + "; id=" + om.getPrimaryKey() + " cannot be cached with "
                + getOMClass().getName() + " objects");
        }

        Persistent oldOm = null;
        if (cache != null)
        {
            try
            {
                synchronized (this)
                {
                    oldOm = (Persistent) cache.get(key);
                    cache.put(key, om);
                }
            }
            catch (CacheException ce)
            {
                throw new TorqueException
                    ("Could not cache due to internal JCS error", ce);
            }
        }
        return oldOm;
    }
View Full Code Here

                mrCache = new NoOpMethodResultCache(cache);
            }
        }
        catch (Exception e)
        {
            throw new TorqueException("Cache could not be initialized", e);
        }
        if (cache == null)
        {
            log.info("Cache could not be initialized for region: " + v);
        }
View Full Code Here

                jcsCache.remove();
                groups.clear();
            }
            catch (CacheException ce)
            {
                log.error(new TorqueException(
                    "Could not clear cache due to internal JCS error.", ce));
            }
        }
    }
View Full Code Here

                    jcsCache.putInGroup(key, group, value);
                }
            }
            catch (CacheException ce)
            {
                throw new TorqueException
                    ("Could not cache due to internal JCS error", ce);
            }
        }
        return old;
    }
View Full Code Here

                                queryFromClause,
                                leftTableName))
                    {
                        // We cannot add an explicit join if both tables
                        // are alredy present in the from clause
                        throw new TorqueException(
                                "Unable to create a " + joinType
                                + "because both table names "
                                + leftTableName + " and " + rightTableName
                                + " are already in use. "
                                + "Try to create an(other) alias.");
View Full Code Here

                }
            }
            catch (Exception e)
            {
                log.error(e);
                throw new TorqueException(e);
            }
        }
    }
View Full Code Here

    public void initialize(Configuration configuration)
        throws TorqueException
    {
        if (configuration == null)
        {
            throw new TorqueException(
                "Torque cannot be initialized without "
                    + "a valid configuration. Please check the log files "
                    + "for further details.");
        }
View Full Code Here

        Record record = (Record) result.get(0);
        try {
            return record.getValue(1).asInt();
        }
        catch (DataSetException e) {
            throw new TorqueException(e);
        }
    }
View Full Code Here

                ds = ((DataSource) ctx.lookup(path));
                lastLookup = time;
            }
            catch (Exception e)
            {
                throw new TorqueException(e);
            }
        }

        return ds;
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.TorqueException

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.