Package javax.jdo

Examples of javax.jdo.JDOFatalException


                //catch Throwable, so it is compatible with latest BCEL changes in methods signature.
                //It nows raises ClassNotFoundException. In order to be able to compible this code
                //with bcel-5.1 or bcel-5.1+, we catch as throwable
                String msg = LOCALISER_ENH.msg("Enhancer.ClassNotFound",fieldClassName,ex);
                JPOXLogger.ENHANCER.error(msg);
                throw new JDOFatalException(msg);
            }
        }

        return capable;
    }
View Full Code Here


        {
            //catch Throwable, so it is compatible with latest BCEL changes in methods signature.
            //It nows raises ClassNotFoundException. In order to be able to compible this code
            //with bcel-5.1 or bcel-5.1+, we catch as throwable
            JPOXLogger.ENHANCER.error(LOCALISER.msg("Enhancer.ClassNotFound",ex));
            throw new JDOFatalException(LOCALISER.msg("Enhancer.ClassNotFound",ex));
        }
      
        return null;
    }
View Full Code Here

                //catch Throwable, so it is compatible with latest BCEL changes in methods signature.
                //It nows raises ClassNotFoundException. In order to be able to compible this code
                //with bcel-5.1 or bcel-5.1+, we catch as throwable
                String msg = LOCALISER_ENH.msg("Enhancer.ClassNotFound",fieldClassName,ex);
                JPOXLogger.ENHANCER.error(msg);
                throw new JDOFatalException(msg);
            }
        }

        return capable;
    }
View Full Code Here

            //catch Throwable, so it is compatible with latest BCEL changes in methods signature.
            //It nows raises ClassNotFoundException. In order to be able to compible this code
            //with bcel-5.1 or bcel-5.1+, we catch as throwable
            String msg = LOCALISER_ENH.msg("Enhancer.ClassNotFound", fullName, ex);
            JPOXLogger.ENHANCER.error(msg);
            throw new JDOFatalException(msg, ex);
        }
        if (enhanceClass == null)
        {
            String msg = LOCALISER_ENH.msg("Enhancer.ClassNotFound", fullName, "");
            JPOXLogger.ENHANCER.error(msg);
            throw new JDOFatalException(msg);
        }

        classGen = new ClassGen(this.enhanceClass);
    }
View Full Code Here

                {
                    // catch Throwable, so it is compatible with latest BCEL changes in methods signature.
                    // It nows raises ClassNotFoundException. In order to be able to compible this code
                    // with bcel-5.1 or bcel-5.1+, we catch as throwable
                    JPOXLogger.ENHANCER.error(LOCALISER.msg("Enhancer.ClassNotFound", utfClassNameString, ex));
                    throw new JDOFatalException(LOCALISER.msg("Enhancer.ClassNotFound", utfClassNameString, ex));
                }
                if (fieldJavaClass == null)
                {
                    throw new JDOFatalException(LOCALISER.msg("Enhancer.ClassNotFound", utfClassNameString,
                        new NullPointerException()));
                }

                f = BCELUtils.getFieldByName(field.getName(constantPoolGen), fieldJavaClass);
                if (f == null)
View Full Code Here

        TupleCollection queryResult = null;
        try {
            queryResult = evaluator.evaluate(pos, connRess, null);
        } catch (EvaluationException e) {
            throw new JDOFatalException(
                "Impossible to evaluate the query: ",
                ExceptionHelper.getNested(e)
            );
        }
        return new JDOQueryResultUnique(
View Full Code Here

        logger.log(BasicLevel.DEBUG,
               "xac.status= " + xac.status
               + "xac.xid= " + xac.xid);
      }
      if (xac.status != SpeedoXAContext.STARTED) {
        throw new JDOFatalException(
            "XA context should have been started here: xac.status= "
            + xac.status + "xac.xid= " + xac.xid);
      }
      if (xac.pm == null) {
        synchronized(xac) {
          if (xac.pm == null) {
            xac.pm = (POManagerItf) mcf.pmf.getPOManager();
            if (Debug.ON && logger != null && logger.isLoggable(BasicLevel.DEBUG)) {
              logger.log(BasicLevel.DEBUG,
                  "Creates a PersistenceManager (" + xac.pm
                  + ") associated to the XID: " + xac.xid);
            }
          }
        }
      }
      if (!xac.synchroRegistred) {
        //Register the PersistenceManager on the first use
        try {
          registerSynchronization();
        } catch (XAException ex) {
            JDOFatalException e = new JDOFatalException(
               "Problem while registering a synchronization.", ex);
                    if (logger != null) {
                        logger.log(BasicLevel.ERROR, e.getMessage(), ex);
                    }
          throw e;
        }
      }
      return xac.pm;
View Full Code Here

      if (managedEnv) {
        logger.log(BasicLevel.INFO, ".");
        String tmName = ((JDOPOManagerItf) pm).getPersistenceManagerFactory().getProperties()
            .getProperty(SpeedoProperties.TM_NAME);
        if (tmName == null) {
          return new JDOFatalException("No transaction manager jndi name found in initialisation properties");
        }
        try {
          Object o = new InitialContext().lookup(tmName);
          if (o == null) {
            String msg = "The transaction must be marked as rollbackOnly: JNDI retrieves a null transaction manager for the name '" + tmName + "'.";
            logger.log(BasicLevel.ERROR, msg);
            return new JDOFatalException(msg);
          }
          if (!(o instanceof TransactionManager)) {
            String msg = "The transaction must be marked as rollbackOnly: JNDI retrieves an object which is not a javax.transaction.TransactionManager (JNDI name: " + tmName + "): " + o;
            logger.log(BasicLevel.ERROR, msg);
            return new JDOFatalException(msg);
          }
          javax.transaction.Transaction t = ((TransactionManager) o).getTransaction();
          if (t == null) {
            String msg = "Impossible to rollback an unexisting transaction (TM.getTransaction()=null)";
            logger.log(BasicLevel.ERROR, msg);
            return new JDOFatalException(msg);
          }
          t.setRollbackOnly();
        } catch (Exception e) {
          String msg = "The transaction must be marked as rollbackOnly: Error when lookup the transaction manager in JNDI with the name '"
              + tmName + "'";
          logger.log(BasicLevel.ERROR, msg, e);
          return new JDOFatalException(msg);
        }
      } else {
        rollback();
      }
      return new JDOFatalException("The current transaction has been rolledback, please retry", ie);
    } else {
      return new JDOFatalException("The current working set occrurs an error, please retry", ie);
    }
  }
View Full Code Here

        } catch (SpeedoRuntimeException e) {
            if (e.causes != null && e.causes.length == 1
                    && e.causes[0] instanceof JDOException) {
                throw (JDOException) e.causes[0];
            }
            throw new JDOFatalException(e.getMessage(), e);
        }
    }
View Full Code Here

    public Class getUserRuntimeExceptionClass() {
      return JDOUserException.class;
    }
 
    public RuntimeException newFatalRuntimeException() {
      return new JDOFatalException();
    }
View Full Code Here

TOP

Related Classes of javax.jdo.JDOFatalException

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.