I have tried my luck on the collection-factory thing and have made changes to ojb to allow a collection-factory in the collection descriptor. I have tested with my own test cases and have run the ojb test suite (which gave the same results as before my changes).
I have added the use of the collection-factory in the same locations where the collection-class was used.
However, what I noticed is that the actual creation of the collection is a bit spread out, the PersistenceBroker, MtoNCollectionPrefetcher and CollectionPrefetcher each have their own createCollection method. Which basically do the same thing. Also the PersistanceBroker forwards the createCollection to a componentcontainer.
In different locations (in the above classes) a check is done if a field type is an array in which case the collection creation is also handled differently
To stay in line with the current approach I have added the collection-factory in all of the above locations.
But would it be an idea to put the create collection code in a more central location (CollectionDescriptor maybe?) and/or use a default CollectionFactoryImpl to also cover the current createCollection approach?
I also noticed another discussion between you and others about an issue with the collection creation (jira, OJB-19).
I am happy to send in my changes (as a patch) for the collection-factory but as you can see I am not sure if the changes should may be go a bit further.
--
With Regards, Martin Taal
Springsite Barchman Wuytierslaan 72b 3818 LK Amersfoort tel: +31 (0)33 462 02 07 fax: +31 (0)33 463 77 12 Mobile: +31 (0)6 288 48 943 email: [EMAIL PROTECTED] web: www.springsite.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
