Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.OJBRuntimeException


            /*
            arminw:
            if no PBKey is set we throw an exception, because we don't
            know which PB (connection) should be used.
            */
            throw new OJBRuntimeException("Can't find associated PBKey. Need PBKey to obtain a valid" +
                                          "PersistenceBroker instance from intern resources.");
        }
        // first try to use the current threaded broker to avoid blocking
        broker = PersistenceBrokerThreadMapping.currentPersistenceBroker(getBrokerKey());
        // current broker not found, create a intern new one
View Full Code Here


            {
                clazz = ClassHelper.getClass(className, true);
            }
            catch (ClassNotFoundException e)
            {
                throw new OJBRuntimeException("Class, " + className + ", could not be found.", e);
            }
            result = discoverDescriptor(clazz);
         }
        return result;
    }
View Full Code Here

            return (Collection) query.execute();
        }
        catch (Exception e)
        {
            log.error("OQLQuery failed", e);
            throw new OJBRuntimeException("OQLQuery failed", e);
        }
    }
View Full Code Here

            tx.markDirty(object);
        }
        catch (LockNotGrantedException e)
        {
            log.error("Failure while storing object " + object, e);
            throw new OJBRuntimeException("Failure while storing object", e);
        }
        return object;
    }
View Full Code Here

            }
        }
        catch (LockNotGrantedException e)
        {
            log.error("Failure while storing objects " + objects, e);
            throw new OJBRuntimeException("Failure while storing objects", e);
        }
        return objects;
    }
View Full Code Here

            return (Collection) query.execute();
        }
        catch (Exception e)
        {
            log.error("OQLQuery failed", e);
            throw new OJBRuntimeException("OQLQuery failed", e);
        }
    }
View Full Code Here

        prepare();
    }

    public PersistenceBroker getBroker()
    {
        if(isIlleagal) throw new OJBRuntimeException("You could not reuse PBCapsule after destroy");
        return broker;
    }
View Full Code Here

        return broker;
    }

    private void prepare()
    {
        if(isIlleagal) throw new OJBRuntimeException("You could not reuse PBCapsule after destroy");
        // we allow queries even if no ODMG transaction is running.
        // thus we use direct access to PBF via the given PBKey to
        // get a PB instance
        if (tx == null)
        {
View Full Code Here

            }
        }
        catch (PBFactoryException e)
        {
            log.error("Could not obtain PB for PBKey " + pbKey, e);
            throw new OJBRuntimeException("Unexpected micro-kernel exception", e);
        }
        return _broker;
    }
View Full Code Here

        if(rtObject.isProxy())
        {
            IndirectionHandler handler = rtObject.getHandler();
            if(handler == null)
            {
                throw new OJBRuntimeException("Unexpected error, expect an proxy object as indicated: " + rtObject);
            }
            if (handler.alreadyMaterialized())
            {
                objectToRegister = handler.getRealSubject();
            }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.OJBRuntimeException

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.