(good to hear from you again)
i've finally managed to get things moving again.
i've refactored the reading code so that the object creation is now delegated to a chain of bean creators. so, as well as being able to add a 'class' attribute to the .betwixt file it is possible to progammatic hook new implementations into the chain or even replace the chain completely.
this will allow some really cool stuff like object pools (which i hope to use later for scarab).
i've been thinking for a while about the best design for reading and i think that my next move is to convert the rule set to be a single rule that takes all elements under the root (that the bean is mapped to) and then users an internal state to work out what to do. i might post up some design documents about this if people are around and interested.
once this is done i want to start look at object pipelines. this means creating an callback API which will allow a stream of objects to be created by betwixt and then processed. i think that by combining this with object pooling, we might be able to scale betwixt to where scarab needs it to be. (100,000+ base elements.)
- robert
On Wednesday, August 27, 2003, at 02:58 PM, Martin van den Bemt wrote:
Creating beans from that will however still not work. If you have Interface I and class A and B implementing I, betwixt cannot figure out which class it was, unless we are actually putting the getClass().getName() into the xml now (please forgive me not looking at the code to check this), for the objects the be correctly recreated from xml..
Mvgr, Martin
Please keep in mind that betwixt cannot recreate the beans if they are based on an interface. (new Interface() just doesn't work :) ).
this is exactly what robert fixed/implemented last week. check the betwixt page and look at advanced reading. there is now a 'class' attribute in the <element> in the .betwixt file. i just tried it last night and it works fine. makes it so that you can map an interface at read-time to a concrete class that implements it.
cheers, gary.-- Martin van den Bemt <[EMAIL PROTECTED]> mvdb.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
