Package org.apache.ojb.broker.util.configuration

Examples of org.apache.ojb.broker.util.configuration.Configuration


        synchronized (AbstractLockStrategy.class)
        {
            if (lockMap == null)
            {
                lockMap = LockMapFactory.getLockMap();
                Configuration conf = OjbConfigurator.getInstance().getConfigurationFor(null);
                DEFAULT_LOCK_TIMEOUT = conf.getInteger("LockTimeout", 60000);
            }
        }
    }
View Full Code Here


        init();
    }

    private void init()
    {
        Configuration conf = OjbConfigurator.getInstance().getConfigurationFor(null);
        Class lockMapClass = conf.getClass("LockMapClass", Object.class);
        Class lockManagerClass = conf.getClass("LockManagerClass", null);
        if(lockManagerClass == null)
        {
            throw new OJBRuntimeException(buildErrorMsg(lockMapClass, lockManagerClass));
        }
        if(!lockMapClass.equals(Object.class))
View Full Code Here

    protected ImplementationImpl()
    {
        ojbTxManager = TxManagerFactory.instance();
        lockManager = LockManagerFactory.getLockManager();
        setConfigurator(PersistenceBrokerFactory.getConfigurator());
        Configuration conf = getConfigurator().getConfigurationFor(null);
        oqlCollectionClass = conf.getClass("OqlCollectionClass", ManageableArrayList.class);
        impliciteWriteLocks = (conf.getString("LockAssociations", "WRITE").equalsIgnoreCase("WRITE"));
        implicitLocking = conf.getBoolean("ImplicitLocking", true);
        ordering = conf.getBoolean("Ordering", true);
//        noteUserOrder = conf.getBoolean("NoteUserOrder", true);
        implicitLockingBackward = conf.getBoolean("ImplicitLockingBackward", false);
        if(log.isEnabledFor(Logger.INFO))
        {
            log.info("Settings: " + this.toString());
        }
    }
View Full Code Here

        if (log.isDebugEnabled()) log.debug("Instantiate PersistenceBrokerFactory");
        Class pbfClass = null;
        try
        {
            Configurator configurator = OjbConfigurator.getInstance();
            Configuration config = configurator.getConfigurationFor(null);
            pbfClass = config.getClass(PBF_KEY, null);
            if(pbfClass == null)
            {
                log.error("Creation of PersistenceBrokerFactory (PBF) instance failed, can't get PBF class object");
                throw new OJBRuntimeException("Property for key '" + PBF_KEY + "' can not be found in properties file");
            }
View Full Code Here

    public synchronized RowReader getRowReader()
    {
        if (m_rowReader == null)
        {
            Configurator configurator = OjbConfigurator.getInstance();
            Configuration config = configurator.getConfigurationFor(null);
            Class rrClass = config.getClass("RowReaderDefaultClass", RowReaderDefaultImpl.class);

            setRowReader(rrClass.getName());
        }
        return m_rowReader;
    }
View Full Code Here

        DescriptorRepository result;
        if (useSerializedRepository)
        // use serialized repository
        {
            // build File object pointing to serialized repository location
            Configuration config = OjbConfigurator.getInstance().getConfigurationFor(null);
            String pathPrefix = config.getString(SERIALIZED_REPOSITORY_PATH, ".");
            File serFile = new File(pathPrefix + File.separator + filename + "." + SER_FILE_SUFFIX);

            if (serFile.exists() && serFile.length() > 0)
            // if file exists load serialized version of repository
            {
View Full Code Here

        if (log.isDebugEnabled()) log.debug("Instantiate PersistenceBrokerFactory");
        Class pbfClass = null;
        try
        {
            Configurator configurator = OjbConfigurator.getInstance();
            Configuration config = configurator.getConfigurationFor(null);
            pbfClass = config.getClass(PBF_KEY, null);
            if(pbfClass == null)
            {
                log.error("Creation of PersistenceBrokerFactory (PBF) instance failed, can't get PBF class object");
                throw new OJBRuntimeException("Property for key '" + PBF_KEY + "' can not be found in properties file");
            }
View Full Code Here

    protected ImplementationImpl()
    {
        ojbTxManager = TxManagerFactory.instance();
        lockManager = LockManagerFactory.getLockManager();
        setConfigurator(PersistenceBrokerFactory.getConfigurator());
        Configuration conf = getConfigurator().getConfigurationFor(null);
        // read settings for cascading delete behavior
        cascadingDeleteOnetoOne = conf.getBoolean("cascadingDeleteOneToOne", false);
        cascadingDeleteOnetoN = conf.getBoolean("cascadingDeleteOneToN", false);
        cascadingDeleteMtoN = conf.getBoolean("cascadingDeleteMToN", false);
        oqlCollectionClass = conf.getClass("OqlCollectionClass", ManageableArrayList.class);
        impliciteWriteLocks = ((OdmgConfiguration)conf).lockAssociationAsWrites();
        implicitLocking = ((OdmgConfiguration)conf).useImplicitLocking();
    }
View Full Code Here

        DescriptorRepository result;
        if (useSerializedRepository)
        // use serialized repository
        {
            // build File object pointing to serialized repository location
            Configuration config = OjbConfigurator.getInstance().getConfigurationFor(null);
            String pathPrefix = config.getString(SERIALIZED_REPOSITORY_PATH, ".");
            File serFile = new File(pathPrefix + File.separator + filename + "." + SER_FILE_SUFFIX);

            if (serFile.exists() && serFile.length() > 0)
            // if file exists load serialized version of repository
            {
View Full Code Here

    public synchronized RowReader getRowReader()
    {
        if (m_rowReader == null)
        {
            Configurator configurator = OjbConfigurator.getInstance();
            Configuration config = configurator.getConfigurationFor(null);
            Class rrClass = config.getClass("RowReaderDefaultClass", RowReaderDefaultImpl.class);

            setRowReader(rrClass.getName());
        }
        return m_rowReader;
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.util.configuration.Configuration

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.