This works great! Now we can change our configuration during run-time in a feasible manner without restrictions :-)
-- Ilkka
Armin Waibel wrote:
Hi Ilkka, I checked in new version of the MetadataManager with some new service methods among other things your proposed read methods.HTH regards, Armin ----- Original Message ----- From: "Ilkka Priha" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 2:42 PM Subject: Re: Repository descriptors, PBKey and OJB 0.9.9Hi Armin,-- cut -- Currently there are only methods to add ClassDescriptors, .... add runtime. I think to realize that functionality we need merge methods for DescriptorRepository and ConnectionRepository: MetadataManager.mergeDescriptorRepository(DescriptorRepository newRepository) Is this what you have intended? regards, ArminIn principle, yes, but starting from the descriptor file. So should something like this work and will it be supported in future releases: RepositoryPersistor rp = new RepositoryPersistor(); ConnectionRepository cr = rp.readConnectionRepository("mysql.xml"); DescriptorRepository dr = rp.readDescriptorRepository("mysql.xml"); List list = cr.getAllDescriptor(); ConnectionRepository metacr = MetadataManager.getInstance().connectionRepository(); for (Iterator i = list.iterator(); i.hasNext();) { metacr.addDescriptor((JdbcConnectionDescriptor) i.next()); } Map.Entry entry; Map map = dr.getDescriptorTable(); DescriptorRepository metadr = MetadataManager.getInstance().getRepository(); for (Iterator i = map.entrySet().iterator(); i.hasNext();) { entry = (Map.Entry) i.next(); metadr.put( (String) entry.getKey(), (ClassDescriptor) entry.getValue()); } It just doesn't seem to be flexible enough for us to define all descriptors in a property file during startup of a web service system supporting dynamically configurable applications, which are loaded and unloaded without shutdown. I think that OJB has all the capability needed for dynamic configuration, it's just difficult to figure out correct classes and methods to apply to use this potential. Of course the merge methods would make things easier, but even theabovecode would be fine if we just dare to use it in our application :-) Thanks, Ilkka --------------------------------------------------------------------- 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] .
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
