Re: [OJB-developers] Kill the mapping files
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-02-28 15:37:18
|
Hi again, Lasse Lindg=E5rd wrote: > Thomas, >=20 > I think your "cost-benefit" argument is a very valid one. >=20 > The idea I have might be a good one on a longer term. But the > up-front-cost for refactoring might turn out to be too heavy. > > Still refactoring the mapping files out would eliminate the task of > changing the mapping-file format. This is a good argument. Lasse, why not give it a try and provide a little prototype showing how=20 to persist the MetaData. For the time being we can keep things simple and ignore the bootstrap=20 issues. Simply write and read a complete DescriptorRepository to/from=20 the database. A DescriptorRepository should have a uinque Name like=20 "repository-Myapp-1.2-production" >=20 > Maybe the right approach is to hope and wait for a XML > PersistenceBrooker to come along and the refactor the metadata to use > that. That would make things much easier, indeed! (Any volunteers ? ;-) ) >=20 > How about using the mapping api directly instead of using XML files. Is > that possible as OJB is constructed now ? >=20 Yes, definitely. That's what I'm always talking about. You can assemble=20 the DescriptorRepository programmatically. There is even a Method in the=20 PersistenceBroker interface to add new (or change existing)=20 ClassDescriptors to the repository. The ojb.broker.metadata.RepositoryXmlHandler (A sax document handler)=20 shows how to use the metadata API to assemble a repository. cu, Thomas |