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

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


    {
        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");
            }
            PersistenceBrokerFactoryIF result = (PersistenceBrokerFactoryIF) ClassHelper.newInstance(pbfClass);
            configurator.configure(result);
            log.info("PersistencebrokerFactory class instantiated: " + result);
            return result;
        }
        catch (Exception e)
        {
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

    {
        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");
            }
            PersistenceBrokerFactoryIF result = (PersistenceBrokerFactoryIF) ClassHelper.newInstance(pbfClass);
            configurator.configure(result);
            log.info("PersistencebrokerFactory class instantiated: " + result);
            return result;
        }
        catch (Exception e)
        {
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

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

    private static LockMap createNewLockMap()
    {
        try
        {
          Configurator configurator = PersistenceBrokerFactory.getConfigurator();
            LockingConfiguration config = (LockingConfiguration) configurator.getConfigurationFor(null);
            Class clazz = config.getLockMapClass();
            LockMap map = (LockMap) clazz.newInstance();
            configurator.configure(map);
            return map;
        }
        catch (Exception e)
        {
            return new InMemoryLockMapImpl();
View Full Code Here

TOP

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

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.