[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: db.createObject(...) and constructor with parameters - Now possible!
I´ve worked around this and changed ObjectSpace (using java.lang.reflection,
and passing a Vector containing any number of parameters).
It´s now possible to create objects with parameters in their constructor.
I´ll send the fix to anyone interested.
>On Wed, 26 Jan 2000, Lars Bergmann wrote:
>> aClass anObject = new aClass(param1, param2, param3);
>> How do you create objects with parameters in their constructor?
>Currently there is now way.
>The original ozone architecture assumes that obect do not leave the
>(server). So they also have to be created inside the server. The only way
>this is Class.newInstance() which does not invoke the constructor. So there
>also no way to pass parameters to the ctor.
>In ODMG objects are created by just calling "new ...". There is no
>special API for creating database objects. Therefore we plan to let the
>constructor create an instance of the (database) object and file this
>to the database. The proxies are generated code and so they do not need
>newInstance() to create an object.
>Falko Braeutigam mailto:email@example.com
>softwarebuero m&b (SMB) http://www.softwarebuero.de