Examples of JDOUnsupportedOptionException


Examples of javax.jdo.JDOUnsupportedOptionException

    /**
     * @todo figure out how to implement
     */
  public Synchronization getSynchronization()
  {
    throw new JDOUnsupportedOptionException("Not Yet Implemented");
  }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

        {
            return new JDODataStoreException(ne.getMessage(), ne);
        }
        else if (ne instanceof NucleusUnsupportedOptionException)
        {
            return new JDOUnsupportedOptionException(ne.getMessage(), ne);
        }
        else if (ne instanceof DatastoreReadOnlyException)
        {
            ClassLoaderResolver clr = ((DatastoreReadOnlyException)ne).getClassLoaderResolver();
            try
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

     */
    public void setDatastoreWriteTimeoutMillis(Integer timeout)
    {
        if (!om.getStoreManager().getSupportedOptions().contains("Datastore.Timeout"))
        {
            throw new JDOUnsupportedOptionException("This datastore doesn't support write timeouts");
        }
        om.setProperty(ObjectManager.PROP_WRITE_TIMEOUT, timeout);
    }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

                    setIsNotConfigurable();
                }
                catch (TransactionIsolationNotSupportedException inse)
                {
                    throw new JDOUnsupportedOptionException(inse.getMessage());
                }
                catch (NucleusException jpe)
                {
                    throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
                }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

        assertConfigurable();

        if (nucleusContext.getStoreManager() != null &&
            !nucleusContext.getStoreManager().getSupportedOptions().contains("TransactionIsolationLevel." + level))
        {
            throw new JDOUnsupportedOptionException("Isolation level \"" + level + "\" is not supported for this datastore");
        }

        // Reset to "read-committed" if passed in as null
        getConfiguration().setProperty("datanucleus.transactionIsolation", level != null ? level : "read-committed");
    }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

    public void setIsolationLevel(String level)
    {
        assertNotCommitting();
        if (tx.isActive() && !tx.getOptimistic())
        {
            throw new JDOUnsupportedOptionException("Cannot change the transaction isolation level while a datastore transaction is active");
        }

        PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
        if (!pmf.supportedOptions().contains("javax.jdo.option.TransactionIsolationLevel." + level))
        {
            throw new JDOUnsupportedOptionException("Isolation level \"" + level + "\" not supported by this datastore");
        }

        int isolationLevel = TransactionUtils.getTransactionIsolationLevelForName(level);
        tx.setOption(org.datanucleus.Transaction.TRANSACTION_ISOLATION_OPTION, isolationLevel);
    }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

  return optionsFlags.get(NONTRANSACTIONAL_READ);
    }

    public void setNontransactionalWrite(boolean nontransactionalWrite) {
  if (nontransactionalWrite) {
      throw new JDOUnsupportedOptionException();
  }
  optionsFlags.set(NONTRANSACTIONAL_WRITE, nontransactionalWrite);
    }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

  return optionsFlags.get(RETAIN_VALUES);
    }

    public void setOptimistic(boolean optimistic) {
  if (optimistic) {
      throw new JDOUnsupportedOptionException();
  }
  optionsFlags.set(OPTIMISTIC, optimistic);
    }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

  return optionsFlags.get(OPTIMISTIC);
    }

    public void setRestoreValues(boolean restoreValues) {
  if (restoreValues) {
      throw new JDOUnsupportedOptionException();
  }
  optionsFlags.set(RESTORE_VALUES, restoreValues);
    }
View Full Code Here

Examples of javax.jdo.JDOUnsupportedOptionException

     */
    public void setConnectionFactory(Object connectionFactory) {
    if (started) {
      throw new JDOUserException("It is forbidden to modify property after a getPersistenceManager() call");
    }
        throw new JDOUnsupportedOptionException("Cannot set a Connection Factory, use <> instead");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.