You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Andy Malakov <an...@transdecisions.com> on 2004/01/14 23:26:24 UTC

RowReaderDefaultClass customization in OJB.properties

Hello All,

1. According to ClassDescriptor code, OJB.properties allows redefining default implementation of RowReader:

    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;
    }

OJB documentation does not mention this property. Is it going to become obsolete?

2. Class o.a.o.broker.accesslayer.RowReaderDefaultImpl mentions faster way of initializing object using specialized constructor: "... The persistent class defines a public constructor with arguments matching the persistent primitive attributes of the class. In this case we build an array args of arguments from rs and call Constructor.newInstance(args) to build an object."  This class even provides implementation of this strategy in method buildWithMultiArgsConstructor(Map, Constructor) which is not used anywhere. The missing piece - code that will find appropriate Constructor for each given class. I am wondering what is going on with this approach - is just unfinished or obsolete?

Thank you very much,
Andy

Re: RowReaderDefaultClass customization in OJB.properties

Posted by Andy Malakov <an...@transdecisions.com>.
Sorry, please let me know if such questions are more appropriate for ojb-user maillist.

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org