Package javax.jdo

Examples of javax.jdo.JDOUnsupportedOptionException


    /**
     * @todo implement
     */
  public void setRestoreValues(boolean b)
  {
        throw new JDOUnsupportedOptionException("Not Yet Implemented");
  }
View Full Code Here


    /**
     * @todo implement
     */
  public void setOptimistic(boolean b)
  {
        throw new JDOUnsupportedOptionException("Not yet implemented");
  }
View Full Code Here

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

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

        {
            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

     */
    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

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

        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

    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

  return optionsFlags.get(NONTRANSACTIONAL_READ);
    }

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

TOP

Related Classes of javax.jdo.JDOUnsupportedOptionException

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.