Package org.jpox.exceptions

Examples of org.jpox.exceptions.JPOXUserException


     */
    protected void assertIsOpen()
    {
        if (isClosed())
        {
            throw new JPOXUserException(LOCALISER.msg("008002"));
        }
    }
View Full Code Here


            String level2ClassName = getOMFContext().getPluginManager().getAttributeValueForExtension("org.jpox.cache_level2",
                "name", level2Type, "class-name");
            if (level2ClassName == null)
            {
                // Plugin of this name not found
                throw new JPOXUserException(LOCALISER.msg("004000", level2Type)).setFatal();
            }

            try
            {
                // Create an instance of the L2 Cache
                Class level2CacheClass = Class.forName(level2ClassName);
                Class[] ctrArgsClasses = new Class[] {OMFContext.class};
                Object[] ctrArgs = new Object[] {omfContext};
                Constructor ctr = level2CacheClass.getConstructor(ctrArgsClasses);
                cache = (Level2Cache)ctr.newInstance(ctrArgs);
                if (JPOXLogger.CACHE.isDebugEnabled())
                {
                    JPOXLogger.CACHE.debug(LOCALISER.msg("004002", level2ClassName));
                }
            }
            catch (Exception e)
            {
                // Class name for this L2 cache plugin is not found!
                throw new JPOXUserException(LOCALISER.msg("004001", level2Type, level2ClassName), e).setFatal();
            }
        }
        else
        {
            cache = new NullLevel2Cache();
View Full Code Here

   
                    cmd = myOM.getMetaDataManager().getMetaDataForClass(pcClass, clr);
                }
                catch (ClassNotResolvedException e)
                {
                    throw new JPOXUserException(LOCALISER.msg("026015", pcClass.getName())).setFatal();
                }
            }
            if (cmd == null)
            {
                throw new JPOXUserException(LOCALISER.msg("026012", pcClass)).setFatal();
            }
        }
View Full Code Here

    public FetchGroup add(String fieldName)
    {
        Field fld = ClassUtils.getFieldForClass(cls, fieldName);
        if (fld == null)
        {
            throw new JPOXUserException(LOCALISER.msg("006004", fieldName, cls.getName()));
        }
        this.fieldNames.add(fieldName);
        notifyListeners();
        return this;
    }
View Full Code Here

                public void transactionPreCommit()
                {
                    if (mconn.isLocked())
                    {
                        // Enlisted connection that is locked so throw exception
                        throw new JPOXUserException(LOCALISER.msg("009000"));
                    }
                }

                public void transactionPreRollBack()
                {
                    if (mconn.isLocked())
                    {
                        // Enlisted connection that is locked so throw exception
                        throw new JPOXUserException(LOCALISER.msg("009000"));
                    }  
                }

                public void transactionFlushed()
                {
View Full Code Here

                if (mconn != null)
                {
                    if (mconn.isLocked())
                    {
                        // Enlisted connection that is locked so throw exception
                        throw new JPOXUserException(LOCALISER.msg("009000"));
                    }                       
                    // Already registered enlisted connection present so return it
                    return mconn;
                }
            }
View Full Code Here

    {
        super(parent);

        if (name == null)
        {
            throw new JPOXUserException(LOCALISER.msg("044041","name",getPackageName(),"class"));
        }
        if (StringUtils.isWhitespace(name))
        {
            throw new InvalidMetaDataException(LOCALISER,
                "044061",parent.name);
View Full Code Here

            }
            if (!validated)
            {
                // Why is this wrapping all exceptions into 1 single exception?
                // This needs coordinating with the test expectations in the enhancer unit tests.
                throw new JPOXUserException(LOCALISER_API.msg("019016", obj_cls.getName()),
                    (Throwable[]) errors.toArray(new Throwable[errors.size()]));
            }
        }
    }
View Full Code Here

                            }
                        }

                        public void onParameterMacro(MacroString.ParameterMacro pm)
                        {
                            throw new JPOXUserException("Parameter macros not allowed in view definitions: " + pm);
                        }
                    },clr);
            }

            orderedCMDs.add(this);
View Full Code Here

     */
    public void setIdentityType(IdentityType type)
    {
        if (isPopulated() || isInitialised())
        {
            throw new JPOXUserException("Already populated/initialised");
        }

        this.identityType = type;
    }
View Full Code Here

TOP

Related Classes of org.jpox.exceptions.JPOXUserException

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.