db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Malakov" <a...@transdecisions.com>
Subject RowReaderDefaultClass customization in OJB.properties
Date Wed, 14 Jan 2004 22:26:24 GMT
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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message